Log in

View Full Version : I need help with an Order Form(PayPal), urgent, please help.



tilde
02-04-2008, 10:25 PM
Hi,

I am a new member over here, and I want some help guys. I am building a Order Form that will make payments to PayPal. The forms description is as follows:

1) It will have 3 Radio buttons. (Radio button values will be $10, $20, $30 Visitor can select only one at a time.

2) The product price is $50. (no radio buttons for this)

2) It will have a Drop Down list with some names in it (like State names).

3) And a BUY NOW button.

The validations I want is that:

1) That users when click the Button if the above mentioned fields are not filled it will give error. And if filled it will go to the PayPal section to allow the visitor to make the payment. If the user selects one of the Radio buttons, say $10, the total will be $60 ($50+$10). And the PayPal section will be displaying this.

Can anybody help me in this. I have tried doing this, but its not happening.

I will be waiting for some help.

Thanks.

jscheuer1
02-05-2008, 04:47 AM
Well, the typical product price in a PayPal form would be represented in the form, for $50.00 by:


<input type="hidden" name="amount" value="50.00">

Now, you say you want 3 radios to add 10, 20, or 30 to that, this could be represented like so (all still within the original form):


<input type="hidden" name="amount" value="50.00">
<input type="radio" name="amount" value="60.00">add $10<br>
<input type="radio" name="amount" value="70.00">add $20<br>
<input type="radio" name="amount" value="80.00">add $30<br>


Since all four of these inputs is named "amount", if no radio is selected, the price will be 50, if any one of the radio buttons are selected (since they all have the same name, only one can be selected), the price will be the value of the selected radio.

tilde
02-06-2008, 09:34 AM
What about the validations? Can you please give me the full code?

Waiting for your reply.

Thank you.

jscheuer1
02-06-2008, 05:34 PM
There really isn't any validation via javascript or HTML, and no - even if there were, I cannot give you the full code without all of your required form to work from, and without knowing what this mysterious:


Drop Down list with some names in it (like State names)

really is, and is used for. But the good news is, the amount field is hard coded on your end and is hidden, so doesn't need to be validated. It should probably be secured though. Information on this is available on the PayPal site, or instead, just require some kind of contact information like email, if the price entered isn't correct, contact your buyer about it.

Validation would have to take place on PayPal to have any meaning. You can set certain fields to be required, the buyer's mailing information is one. See:

https://www.paypal.com/IntegrationCenter/ic_std-variable-ref-buy-now.html

or download the PDF version (more complete - right click and choose save):

https://www.paypal.com/en_US/pdf/PP_WebsitePaymentsStandard_IntegrationGuide.pdf

or hire a certified developer:

http://www.paypal.com/Certification/dc_directory.html