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=YOUR_MERCHANT_ID"
data-button="buynow"
data-name="Buy 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=YOUR_MERCHANT_ID"
data-button="cart"
data-name="Add to cart!"
data-amount="1.00"
></script>All of PayPal's HTML button variables are supported by prefixing their name with "data-". Here are the most commonly used:
data-nameDescription of the itemdata-numberThe number of the itemdata-quantityQuantity of items to purchasedata-shippingThe cost of shipping this itemdata-taxTransaction-based tax override variabledata-idThe hosted ID of the button (if applicable)
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