Showing results for 
Search instead for 
Did you mean: 

What is wrong with this button API code:

New Community Member

What is wrong with this button API code:

Hello friends,


Please help me integrating amount to paypal:


See the code below:


<div align='center'>
        <form action=\"\" method=\"post\">
        <input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\">
        <input type=\"hidden\" name=\"currency_code\" value=\"USD\">
        <input type=\"hidden\" name=\"item_name\" value=\"Picture Purchase At\">
        <input type=\"hidden\" name=\"amount\" value=\"$imgprice\">
        <tr><td><input type=\"hidden\" name=\"on0\" value=\"Image ID:\">Image ID: <input type=\"text\" name=\"os0\" maxlength=\"5\" value=\"$pid\" readonly=\"true\"></td></tr>
        <input type=\"image\" src=\"\" border=\"0\" name=\"submit\" alt=\"PayPal — The safer, easier way to pay online.\">
        <img alt=\"\" border=\"0\" src=\"\" width=\"1\" height=\"1\">


PayPal Employee

Re: What is wrong with this button API code:

Use _xclick, not _s-xclick.

_s-xclick is only for secured and/or hosted PayPal buttons, which yours is not.


Additionally, I'd strongly recommend implementing some sort of check on your transaction(s), because you're basically transmitting the amount to be charged in plain view right now. You could use PayPal IPN ( to verify the correct amount was paid in the transaction.

For technical assistance with PayPal merchant product offerings, please file a ticket at