Kevin D.
Kevin D.

Reputation: 1510

PayPal Buy Now button with amount does not show amount

I'm trying to add an amount to my current PayPal Buy Now form, and it doesnt show the amount. Is there an ordering of input fields that I am missing?

<form class="right" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" target="_blank">
    <input type="hidden" name="cmd" value="_s-xclick"/>
    <input type="hidden" name="item_name" value="${sessionScope.paypalDescription}"/>
    <input type="hidden" name="hosted_button_id" value="YNRM27K9B4JGW"/>
    <input type="hidden" name="return" value="http://www.keeboi-gwapo.com/thankyou.d0"/>
    <input type="hidden" name="amount" value="500.00" />
    <input type="hidden" name="currency_code" value="USD"/>
    <input type="image" src="https://www.sandbox.paypal.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.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"/>
</form>

Thank you very much.

Upvotes: 0

Views: 151

Answers (2)

user207421
user207421

Reputation: 310884

All those input fields are hidden, for submission with the form. If you want to display them as well, you have to write more HTML.

Upvotes: 0

Drew Angell
Drew Angell

Reputation: 26036

You're using a hosted button. As such, you need to login to your PayPal account, go into your button manager, and edit the button accordingly.

You can't just add fields to the button code like that when using hosted buttons. Part of the benefit of hosted buttons is that it hides those parameters from people who might try to adjust the values before triggering the PayPal payment.

Upvotes: 1

Related Questions