Roman
Roman

Reputation: 4513

using a custom button with PayPal

I've got an ASP.NET MVC 3 website and I wish to incorporate a simple PayPal button for one product, but I wish to use a custom designed button.

I couldn't find the reference for using PayPal with a custom button - any references would really help :)

Thanks!

Upvotes: 0

Views: 179

Answers (1)

Aristos
Aristos

Reputation: 66649

This is a custom button working sample code, for one product. Add it to paypal is a full post back to paypal cart and need a form like this way to send the informations for one product.

<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" >
    <input type="image" src="/img/CustomButtonImage.jpg" border="0" name="submit" alt="Buy it" />
    <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
    <input type="hidden" name="add" value="1" />
    <input type="hidden" name="cmd" value="_cart" />
    <input type="hidden" name="business" value="[email protected]" />
    <input type="hidden" name="item_name" value="item name" />
    <input type="hidden" name="item_number" value="158" />
    <input type="hidden" name="amount" value="16.90" />
    <input type="hidden" name="no_shipping" value="2" />
    <input type="hidden" name="return" value="http://www.yoursite.com/shop/" />
    <input type="hidden" name="cancel_return" value="http://www.yoursite.com/shop/" />
    <input type="hidden" name="no_note" value="1" />
    <input type="hidden" name="currency_code" value="EUR" />
    <input type="hidden" name="lc" value="GR" />
    <input type="hidden" name="bn" value="PP-ShopCartBF" />
</form>

You can find all the details for this ids on paypal manuals.

Upvotes: 1

Related Questions