0
votes

I'm creating a PayPal buy now button which is not hosted (I've unchecked "Save button at PayPal") and changed the amount using the HTML form but it does not change here's the code

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----ENCRYPTION CODE HERE-----END PKCS7-----">
<input type="hidden" name="item_name" value="subscription">
<input type="hidden" name="amount" value="100.95">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">

and the test page url: http://mawk3y.net/pay.php when you click the buy now you will find out that the value is 0 so how can I change the amount value?

1

1 Answers

2
votes

_s_xclick is the secure (or saved) xclick command to which you submit an encrypted (or saved) button. But you cannot have plaintext fields in an encrypted button; you can only do that in a plain button (that's the point of encrypted buttons). You are mixing the two.

Either encrypt the button with the price inside the encrypted blob and submit to _s_xclick, or make the whole button in plain text fields (no encryption) and submit to _xclick.