|
|
|
Rank: Starting Member
Groups: Registered
Joined: 3/5/2004 Posts: 1 Location: ,
|
I would like to know how to combine 2 options for donation onto one form. The customer is asked to choose one method or the other -- either check a box next to an amount to donate, or enter an amount in a text field.
---Option 1---
Check a box next to the amount you wish to donate.
i.e. <input type="checkbox" name="amount" value="20.00" /> 1¢ per mile ($20.00)
---Option 2---
Enter an amount to donate in a text field.
i.e. <input type="text" name="amount" size="6" />
When I add the text field to my form (Buy It Now type form), the checkboxes do not work. When I remove the text field, the boxes work. The text field, when in place, works fine, successfully passing the amount to PayPal.
What is the best way to give customers the options to select an amount to donate or enter an arbitrary amount? Thank you in advance for any help.
|
|
|
|
|
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 11/21/2003 Posts: 511 Location: ,
|
Hi rache23,
You will need to use some scripting help,such as JaVa Script or VB Script that capture what the customer selected and override the amount variable before you submit the form.
Paulam PayPal Tech Support Agent PayPal an eBay company
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 3/2/2005 Posts: 13 Location: ,
|
i am having the same issue and i was wondering if you were able to use java/vbscript to resolve it.
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Originally posted by rache23 [br]I would like to know how to combine 2 options for donation onto one form. The customer is asked to choose one method or the other -- either check a box next to an amount to donate, or enter an amount in a text field.
---Option 1--- Check a box next to the amount you wish to donate. i.e. <input type="checkbox" name="amount" value="20.00" /> 1¢ per mile ($20.00)
---Option 2--- Enter an amount to donate in a text field. i.e. <input type="text" name="amount" size="6" />
When I add the text field to my form (Buy It Now type form), the checkboxes do not work. When I remove the text field, the boxes work. The text field, when in place, works fine, successfully passing the amount to PayPal.
What is the best way to give customers the options to select an amount to donate or enter an arbitrary amount? Thank you in advance for any help. <hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 1/10/2003 Posts: 738 Location: ,
|
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 3/2/2005 Posts: 13 Location: ,
|
I am getting an 500 Internal Error when I try to run this script. http://www.partners-char...t/cgi-bin/paypalscr.cgi
This site is running on a Linux server. Does this make a difference? <blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"> Originally posted by Andrew Chang[br]view this http://paypaldev.org/topic.asp?TOPIC_ID=8146
Andrew Chang Script to sell downloads: http://itemseller.scorpionsystems.netWeb Design & Scripting: http://scorpionsystems.netWeb & Image Hosting includes global SSL: http://scorpionwebhosting.comPhotographer Gallery Software: http://Photo-Seller.comBecome an affiliate and make money http://worldannouncements.com/affiliates http://scorpionwebhosting.com/affiliate Free Web Traffic: http://www.trafficswarm.com/go.cgi?169137 , http://www.ts25.com/index.jsp?ref=ScorpionSystems
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 1/10/2003 Posts: 738 Location: ,
|
for the script you will need to 1 edit the #! usr/bin/perl line to the correct path to perl 2 make sure you use a editor such as notepad to edit the script 3 make sure you upload in ascii format 4 make sure permissions are set to 755 Andrew Chang Script to sell downloads: http://itemseller.scorpionsystems.netWeb Design & Scripting: http://scorpionsystems.netWeb & Image Hosting includes global SSL: http://scorpionwebhosting.comPhotographer Gallery Software: http://Photo-Seller.comBecome an affiliate and make money http://worldannouncements.com/affiliates http://scorpionwebhosting.com/affiliate Free Web Traffic: http://www.trafficswarm.com/go.cgi?169137 , http://www.ts25.com/index.jsp?ref=ScorpionSystems
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 3/2/2005 Posts: 13 Location: ,
|
i did these things and i still can't get it to work... help! <blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"> Originally posted by Andrew Chang[br]for the script you will need to 1 edit the #! usr/bin/perl line to the correct path to perl 2 make sure you use a editor such as notepad to edit the script 3 make sure you upload in ascii format 4 make sure permissions are set to 755 Andrew Chang Script to sell downloads: http://itemseller.scorpionsystems.netWeb Design & Scripting: http://scorpionsystems.netWeb & Image Hosting includes global SSL: http://scorpionwebhosting.comPhotographer Gallery Software: http://Photo-Seller.comBecome an affiliate and make money http://worldannouncements.com/affiliates http://scorpionwebhosting.com/affiliate Free Web Traffic: http://www.trafficswarm.com/go.cgi?169137 , http://www.ts25.com/index.jsp?ref=ScorpionSystems
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 3/2/2005 Posts: 13 Location: ,
|
ok, i can get it to work if i use: $browser = "https://www.paypal.com/xclick/business=Payment%40scorpionsystems.net&item_name=Test+2+Item&item_number=store+id+%23&amount=$in{'amount'}&no_shipping=0&no_note=1¤cy_code=USD"; print "Location: $browser\n\n"; but i can't get it to work if i edit this code. what info is editable and can i add a field (i.e. on0=) <blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"> Originally posted by Andrew Chang[br]for the script you will need to 1 edit the #! usr/bin/perl line to the correct path to perl 2 make sure you use a editor such as notepad to edit the script 3 make sure you upload in ascii format 4 make sure permissions are set to 755 Andrew Chang Script to sell downloads: http://itemseller.scorpionsystems.netWeb Design & Scripting: http://scorpionsystems.netWeb & Image Hosting includes global SSL: http://scorpionwebhosting.comPhotographer Gallery Software: http://Photo-Seller.comBecome an affiliate and make money http://worldannouncements.com/affiliates http://scorpionwebhosting.com/affiliate Free Web Traffic: http://www.trafficswarm.com/go.cgi?169137 , http://www.ts25.com/index.jsp?ref=ScorpionSystems
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 1/10/2003 Posts: 738 Location: ,
|
The whole line is editable to add on0 os0 add this to the line &on0=$in{'on0'}&os0=$in{'os0'} Andrew Chang Script to sell downloads: http://itemseller.scorpionsystems.netWeb Design & Scripting: http://scorpionsystems.netWeb & Image Hosting includes global SSL: http://scorpionwebhosting.comPhotographer Gallery Software: http://Photo-Seller.comBecome an affiliate and make money http://worldannouncements.com/affiliates http://scorpionwebhosting.com/affiliate Free Web Traffic: http://www.trafficswarm.com/go.cgi?169137 , http://www.ts25.com/index.jsp?ref=ScorpionSystems
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 3/2/2005 Posts: 13 Location: ,
|
the code is: $browser = "https://www.paypal.com/xclick/business=mgrimes@worcesterdiocese.org&item_name=Annual+Partners+In+Charity&item_number=store+id+&amount=&on0=City+Parish&os0=City+Parish&no_shipping=0&no_note=1¤cy_code=USD"; print "Location: $browser\n\n"; when i enter the url from this code in the address bar, it goes to the proper paypal page. but this code does not want to work in the cgi script itself. why would yours work, but not mine? <blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"> Originally posted by Andrew Chang[br]The whole line is editable to add on0 os0 add this to the line &on0=$in{'on0'}&os0=$in{'os0'} Andrew Chang Script to sell downloads: http://itemseller.scorpionsystems.netWeb Design & Scripting: http://scorpionsystems.netWeb & Image Hosting includes global SSL: http://scorpionwebhosting.comPhotographer Gallery Software: http://Photo-Seller.comBecome an affiliate and make money http://worldannouncements.com/affiliates http://scorpionwebhosting.com/affiliate Free Web Traffic: http://www.trafficswarm.com/go.cgi?169137 , http://www.ts25.com/index.jsp?ref=ScorpionSystems
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 1/10/2003 Posts: 738 Location: ,
|
It has to do with what you are using there are a few problems 1 you are using a hyperlink this is not what you need to use you only need to enter the web address 2 the @ symbol will not work in a cgi script because it will look for the @worcesterdiocese.org array which will be empty therefore sending only mgrimes use %40 or \@ I have posted the proper code below 3. If you plan on passing difrent values in the item_name,item_number, amount, on0 and os0 you can not hard coded values set them to $in{'fieldname'} fieldname would = the actual field name example. item_name=$in{'item_name'} this will alow the field to be filled in from the form information $browser = "https://www.paypal.com/xclick/business=mgrimes%40worcesterdiocese.org&item_name=Annual+Partners+In+Charity&item_number=store+id+&amount=&on0=City+Parish&os0=City+Parish&no_shipping=0&no_note=1¤cy_code=USD"; print "Location: $browser\n\n"; Do you see how the code works? Andrew Chang Script to sell downloads: http://itemseller.scorpionsystems.netWeb Design & Scripting: http://scorpionsystems.netWeb & Image Hosting includes global SSL: http://scorpionwebhosting.comPhotographer Gallery Software: http://Photo-Seller.comBecome an affiliate and make money http://worldannouncements.com/affiliates http://scorpionwebhosting.com/affiliate Free Web Traffic: http://www.trafficswarm.com/go.cgi?169137 , http://www.ts25.com/index.jsp?ref=ScorpionSystems
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 3/2/2005 Posts: 13 Location: ,
|
ok, i finally got this to work - now the problem is that it only seems to work when i use safari as my browser. i hav tried it in explorer and firefox and i get an error from paypal saying: The link you have used to enter the PayPal system contains an incorrectly formatted item amount. the script i am using is as follows: $browser = "https://www.paypal.com/xclick/business=mgrimes\@worcesterdiocese.org&item_name=$in{'item_name'}&item_number=$in{'item_name'}=&on0=$in{'on0'}&os0=$in{'os0'}&amount=$in{'amount'}&no_shipping=0&no_note=1¤cy_code=USD"; print "Location: $browser\n\n"; <blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"> Originally posted by Andrew Chang[br]It has to do with what you are using there are a few problems 1 you are using a hyperlink this is not what you need to use you only need to enter the web address 2 the @ symbol will not work in a cgi script because it will look for the @worcesterdiocese.org array which will be empty therefore sending only mgrimes use %40 or \@ I have posted the proper code below 3. If you plan on passing difrent values in the item_name,item_number, amount, on0 and os0 you can not hard coded values set them to $in{'fieldname'} fieldname would = the actual field name example. item_name=$in{'item_name'} this will alow the field to be filled in from the form information $browser = "https://www.paypal.com/xclick/business=mgrimes%40worcesterdiocese.org&item_name=Annual+Partners+In+Charity&item_number=store+id+&amount=&on0=City+Parish&os0=City+Parish&no_shipping=0&no_note=1¤cy_code=USD"; print "Location: $browser\n\n"; Do you see how the code works? Andrew Chang Script to sell downloads: http://itemseller.scorpionsystems.netWeb Design & Scripting: http://scorpionsystems.netWeb & Image Hosting includes global SSL: http://scorpionwebhosting.comPhotographer Gallery Software: http://Photo-Seller.comBecome an affiliate and make money http://worldannouncements.com/affiliates http://scorpionwebhosting.com/affiliate Free Web Traffic: http://www.trafficswarm.com/go.cgi?169137 , http://www.ts25.com/index.jsp?ref=ScorpionSystems
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 1/10/2003 Posts: 738 Location: ,
|
May I view the page you are using to test? Andrew Chang Script to sell downloads: http://itemseller.scorpionsystems.netWeb Design & Scripting: http://scorpionsystems.netWeb & Image Hosting includes global SSL: http://scorpionwebhosting.comPhotographer Gallery Software: http://Photo-Seller.comBecome an affiliate and make money http://worldannouncements.com/affiliates http://scorpionwebhosting.com/affiliate Free Web Traffic: http://www.trafficswarm.com/go.cgi?169137 , http://www.ts25.com/index.jsp?ref=ScorpionSystems
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 3/2/2005 Posts: 13 Location: ,
|
http://www.partners-charity.net/donate_new.html
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"> Originally posted by Andrew Chang[br]May I view the page you are using to test? Andrew Chang Script to sell downloads: http://itemseller.scorpionsystems.netWeb Design & Scripting: http://scorpionsystems.netWeb & Image Hosting includes global SSL: http://scorpionwebhosting.comPhotographer Gallery Software: http://Photo-Seller.comBecome an affiliate and make money http://worldannouncements.com/affiliates http://scorpionwebhosting.com/affiliate Free Web Traffic: http://www.trafficswarm.com/go.cgi?169137 , http://www.ts25.com/index.jsp?ref=ScorpionSystems
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 1/10/2003 Posts: 738 Location: ,
|
You are missing an important part of the script look at these lines in the script. if ($in{'amount'} eq "texta") { $in{'amount'} = $in{'texta'}; } if ($in{'amount'} eq "dropa") { $in{'amount'} = $in{'dropa'}; } Do you see the radio buttons next to the fields on my example form. This lets the user choose what kind of donation he/she wants to make if the user selects to enter their own amount the script sees this and fills in the amount field with the value from the text box. if the user selects a predefined value it sees this and fills it in with theat value. I would suggest going back to the example and looking at all the elements to figure out exactly what is going on and how it is working. http://paypaldev.org/topic.asp?TOPIC_ID=8146
the other problem is that , in your values 5,000.00 should be 5000.00 Andrew Chang Script to sell downloads: http://itemseller.scorpionsystems.netWeb Design & Scripting: http://scorpionsystems.netWeb & Image Hosting includes global SSL: http://scorpionwebhosting.comPhotographer Gallery Software: http://Photo-Seller.comBecome an affiliate and make money http://worldannouncements.com/affiliates http://scorpionwebhosting.com/affiliate Free Web Traffic: http://www.trafficswarm.com/go.cgi?169137 , http://www.ts25.com/index.jsp?ref=ScorpionSystems
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 3/2/2005 Posts: 13 Location: ,
|
this worked, thanks. is there a way for me to prepopulate shipping, name, email, phone info? <blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"> Originally posted by Andrew Chang[br]You are missing an important part of the script look at these lines in the script. if ($in{'amount'} eq "texta") { $in{'amount'} = $in{'texta'}; } if ($in{'amount'} eq "dropa") { $in{'amount'} = $in{'dropa'}; } Do you see the radio buttons next to the fields on my example form. This lets the user choose what kind of donation he/she wants to make if the user selects to enter their own amount the script sees this and fills in the amount field with the value from the text box. if the user selects a predefined value it sees this and fills it in with theat value. I would suggest going back to the example and looking at all the elements to figure out exactly what is going on and how it is working. http://paypaldev.org/topic.asp?TOPIC_ID=8146
the other problem is that , in your values 5,000.00 should be 5000.00 Andrew Chang Script to sell downloads: http://itemseller.scorpionsystems.netWeb Design & Scripting: http://scorpionsystems.netWeb & Image Hosting includes global SSL: http://scorpionwebhosting.comPhotographer Gallery Software: http://Photo-Seller.comBecome an affiliate and make money http://worldannouncements.com/affiliates http://scorpionwebhosting.com/affiliate Free Web Traffic: http://www.trafficswarm.com/go.cgi?169137 , http://www.ts25.com/index.jsp?ref=ScorpionSystems
<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote">
|
|
|
|
Guest (2)
|