|
2 | 2 |
|
3 | 3 |
|
4 | 4 |
|
5 | | -# HTML payment buttons |
| 5 | +## HTML payment buttons |
6 | 6 |
|
7 | 7 | 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: |
8 | 8 |
|
9 | | -## Buy Now |
| 9 | +### Buy Now |
10 | 10 | Buy Now buttons are for single item purchases. |
11 | 11 |
|
12 | 12 | ```html |
13 | 13 | <script src="paypal.js" |
14 | | - data-paypal-checkout="buy-now" |
15 | | - data-paypal-button="true" |
16 | | - data-paypal-business="12345abc" |
17 | | - data-paypal-item-name="Buy me now!" |
18 | | - data-paypal-amount="1.00" |
| 14 | + data-type="buy" |
| 15 | + data-business="MERCHANT_ID" |
| 16 | + data-item_name="Buy me now!" |
| 17 | + data-amount="1.00" |
19 | 18 | ></script> |
20 | 19 | ``` |
21 | 20 |
|
22 | | -Go ahead and try it out |
23 | 21 |
|
24 | | - |
25 | | - |
26 | | -## Add To Cart |
| 22 | +### Add To Cart |
27 | 23 | Add To Cart buttons lets users add multiple items to their PayPal cart. |
28 | 24 |
|
29 | 25 | ```html |
30 | 26 | <script src="paypal.js" |
31 | | - data-paypal-checkout="cart" |
32 | | - data-paypal-button="true" |
33 | | - data-paypal-business="12345abc" |
34 | | - data-paypal-item-name="Add me to cart" |
35 | | - data-paypal-amount="1.00" |
| 27 | + data-type="cart" |
| 28 | + data-business="6XF3MPZBZV6HU" |
| 29 | + data-item_name="Add to cart!" |
| 30 | + data-amount="1.00" |
36 | 31 | ></script> |
37 | 32 | ``` |
38 | 33 |
|
39 | | -Prepare to be amazed with this one |
40 | | - |
41 | | - |
42 | | - |
43 | | -# API payment buttons |
44 | | - |
45 | | -```html |
46 | | -<script src="paypal.js" |
47 | | - data-paypal-checkout="api" |
48 | | - data-paypal-button="true" |
49 | | -></script> |
50 | | -``` |
| 34 | +## Button parameters |
| 35 | +You can pass additional data values to the button as well. The following are currently supported: |
| 36 | + |
| 37 | +**Item details** |
| 38 | +* `data-item_name` Description of the item |
| 39 | +* `data-item_number` The number of the item |
| 40 | +* `data-quantity` Number of items |
| 41 | +* `data-shipping` The cost of shipping this item |
| 42 | +* `data-shipping2` The cost of shipping each additional unit of this item |
| 43 | +* `data-tax` Transaction-based tax override variable |
| 44 | + |
| 45 | +**Discounts** |
| 46 | +* `data-discount_amount` Discount amount associated with an item |
| 47 | +* `data-discount_amount2` Discount amount associated with each additional quantity of the item |
| 48 | +* `data-discount_rate` Discount rate (percentage) for an item |
| 49 | +* `data-discount_rate2` Discount rate (percentage) for each additional quantity of the item |
| 50 | +* `data-discount_num` Number of additional quantities of the item to which the discount applies |
0 commit comments