www.uburst.com www.uburst.com

"Proposed Paypal Solution - Working!!!"

Go back to the LobbyClick here to Go Back to Main ListingClick here to see helpClick here to Search the Forum

Programmer Tips
Forum Type: Public
Moderator: edmunds
Time Zone: EST
Printer Friendly Format
Original Message
 
"Proposed Paypal Solution - Working!!!"
Posted by Brian Levine on Apr-05-02 at 10:34 AM (EST)
Okay, with a little effort, I managed to get this working, using the Custom Payment option. In order to get this working, I had to modify the following:

order_template.html
ushop.pl

(Note that for this example, I have to strip out brackets so that HTML tags show up.)

order_template.html changes:

For some reason, I cannot embed by paypal button inside the FORM block on the page (and I still don't understand why), so I had to create a new replacement string just above the FORM tag:

!-- The following tag will be replaced at runtime. --
PAYPAL BUTTON

FORM

(of course, remember those brackets in your code)

ushop.pl changes:

Just past the upshop instructions replacement section, I added the following:

# Replace the PAYPAL BUTTON.
if (($payment_method eq "custom_payment") && ($settings[52] =~ /yes/i))
{
$order_total = sprintf("%.2f", $totals_total);
$paypal_site = "https://www.paypal.com/cgi-bin/webscr";
$paypal_button = "FORM ACTION=\"" . $paypal_site . "\" METHOD=\"POST\"";
$paypal_button .= "INPUT TYPE=\"hidden\" NAME=\"cmd\" VALUE=\"_xclick\"";
$paypal_button .= "INPUT TYPE=\"hidden\" NAME=\"business\" VALUE=\"paypal\@mystore.com\"";
$paypal_button .= "INPUT TYPE=\"hidden\" NAME=\"item_name\" VALUE=\"My Store Order Total\"";
$paypal_button .= "INPUT TYPE=\"hidden\" NAME=\"item_number\" VALUE=\"$order_number\"";
$paypal_button .= "INPUT TYPE=\"hidden\" NAME=\"amount\" VALUE=\"$order_total\"";
$paypal_button .= "INPUT TYPE=\"image\" src=\"http://images.paypal.com/images/x-click-but01.gif\" border=\"0\" NAME=\"submit\" ALT=\"Click to Pay using Paypal\"";
$paypal_button .= "/FORM";
}
$order_form_html =~ s/PAYPAL BUTTON/$paypal_button/g;

Again, remember that I had to remove all of the brackets in order for this to display.

The end result of all of this is that this method displays a button at the top of the Receipts page that links to the Paypal payment login page, passing my paypal id, the order number and the order total. The customer need only log in and accept the sending of the payment.

I will make the actual code available (with brackets) to anyone that wants it.

Click to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents

 Table of Contents

RE: Proposed Paypal Solution - Work..., Bill Weiner, Apr-06-02, (1)
paypal solution, rich, Oct-02-02, (2)
RE: paypal solution, Bill Weiner, Oct-03-02, (3)

 

 
Click here to goto Click here to goto the Lobby
Messages in this discussion
 
1 . "RE: Proposed Paypal Solution - Working!!!"
Posted by Bill Weiner on Apr-06-02 at 01:01 PM (EST)
Great! Glad you go it working.
Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
2 . "paypal solution"
Posted by rich on Oct-02-02 at 02:46 PM (EST)
would you please send me a copy of the actual code (with brackets)?

i'm working on a major update to my company's website, and this may be the key i need to convince him to purchase ushop.

thanks,
rich

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
3 . "RE: paypal solution"
Posted by Bill Weiner on Oct-03-02 at 04:23 AM (EST)
We listed Brian's solution in our 3rd Party Developer's Corner:

http://www.uburst.com/uShop/developers.html

(See the 8/20/2002 Posting)

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents


Archive This Thread: Admin and Moderator OnlyRemove This Thread: Admin and Moderator Only
Click here to goto Click here to goto the Lobby

 

 

 

 

 

 

 

 

 

 

 

 
Questions or problems regarding this bulletin board should be directed to Webmaster
©1997-1999 by DCScripts. All rights reserved.