Reputation: 2877
I want my users to be able to choose the amount before clicking on the "pay now" PayPal button. On the page to build such button on PayPal website, one can add custom fields and call it "amount", but the value entered in this field will not be taken into account when users click the button: they are directed to PayPal website to validate payment, however the amount is zero.
How to create an amount field so that when the user enters a value X and clicks the button, this value X appears as the amount on PayPal payment page?
Upvotes: 0
Views: 1459
Reputation: 1945
The easiest way to allow your customers to choose the payment amount is to simply leave the amount field blank when creating the button in the button factory. No custom fields are necessary. The customer will be prompted to enter an "item Price on the hosted checkout page and that is what the customer will pay unless you have profile tax or shipping enabled.
Upvotes: 0
Reputation: 26036
If you post a sample of the button code you're working with I could adjust it for you accordingly. It sounds like you just need to set something like the following in your code.
<input type="text" name="amount" value="" />
That would make a text field display so the person could enter the amount they want, and since the name is amount, when posted to PayPal it would see it the same as if it were a hidden field.
Upvotes: 1