fredley
fredley

Reputation: 33901

Is it possible make a PayPal 'Buy Now' button with an HTML form?

I have a Google Checkout 'Buy Now' button on my site. It's very simple, all I do is produce the order information in an HTML form thus:

<form action="https://checkout.google.com/cws/v2/Merchant/xxxxxxxxxx/checkoutForm" id="BB_BuyButtonForm" method="post" name="BB_BuyButtonForm">
    <input name="item_name_1" type="hidden" value="Some Stuff">
    <input name="item_description_1" type="hidden" value="Product">
    <input name="item_quantity_1" type="hidden" value="1">
    <input name="item_price_1" type="hidden" value="0.25">
    <input name="item_currency_1" type="hidden" value="GBP">


    <input name="item_name_2" type="hidden" value="Delivery">
    <input name="item_description_2" type="hidden" value="standard">
    <input name="item_quantity_2" type="hidden" value="1">
    <input name="item_price_2" type="hidden" value="2.5">
    <input name="item_currency_2" type="hidden" value="GBP">

    <input name="_charset_" type="hidden" value="utf-8">

    <input alt="" src="https://checkout.google.com/buttons/buy.gif?merchant_id=xxxxxxxxxx&amp;w=117&amp;h=48&amp;style=white&amp;variant=text&amp;loc=en_US" type="image">
</form>

This form is generated by a bit of PHP, it's fairly trivial to put together. Is there a way of creating a PayPal button in the same way? Some customers have requested it, but I don't have time to delve into complex APIs, and static saved buttons are no good (the customer fills out a short order form, which then generates the button).

Upvotes: 0

Views: 520

Answers (1)

Related Questions