Integrating with our HTML payment buttons are as easy as including a snippet of code. We have two flavors of buttons for you to use:
Buy Now buttons are for single item purchases.
<script src="paypal-button.js?merchant=MERCHANT_ID"
data-button="buynow"
data-item_name="Buy me now!"
data-amount="1.00"
></script>Add To Cart buttons lets users add multiple items to their PayPal cart.
<script src="paypal-button.js?merchant=MERCHANT_ID"
data-button="cart"
data-item_name="Add to cart!"
data-amount="1.00"
></script>You can pass additional data values to the button as well. The following are currently supported:
Item details
data-item-nameDescription of the itemdata-item-numberThe number of the itemdata-quantityNumber of itemsdata-shippingThe cost of shipping this itemdata-shipping2The cost of shipping each additional unit of this itemdata-taxTransaction-based tax override variable
Discounts
data-discount-amountDiscount amount associated with an itemdata-discount-amount2Discount amount associated with each additional quantity of the itemdata-discount-rateDiscount rate (percentage) for an itemdata-discount-rate2Discount rate (percentage) for each additional quantity of the itemdata-discount-numNumber of additional quantities of the item to which the discount applies
Your merchant ID needs to be added to the URL of the referenced script. This ID can either be your Secure Merchant ID, which can be found by logging into your PayPal account and visiting your profile, or your email address.
Jeff Harrell
https://github.com/jeffharrell