Skip to content

Commit 4113235

Browse files
author
Jeff Harrell
committed
Readme updates
1 parent 62a0bcb commit 4113235

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,24 @@ Your merchant ID needs to be added to the URL of the referenced script. This ID
5454

5555

5656
## Download the code
57-
For the unminified files you can clone this repo and use the code in src/paypal-button.js.
57+
To download the production-ready JavaScript you'll need to save one of these files:
58+
59+
* [JavaScript Buttons](https://github.com/paypal/JavaScriptButtons/blob/master/dist/paypal-button.min.js)
60+
* [JavaScript Buttons + MiniCart](https://github.com/paypal/JavaScriptButtons/blob/master/dist/paypal-button-minicart.min.js)
61+
62+
The first file gives you support for PayPal's JavaScript buttons. The second file has the same code from the first, but also contains functionality for the [PayPal Mini Cart](https://github.com/jeffharrell/MiniCart).
63+
64+
To see the un-minified code you can take a peek at [paypal-button.js](https://github.com/paypal/JavaScriptButtons/blob/master/src/paypal-button.js).
65+
66+
67+
## JavaScript API
68+
There's even a fancy JavaScript API if you'd like to pragmatically create your buttons.
69+
70+
**PAYPAL.apps.ButtonFactory.create(data, type, parentNode)**
71+
Creates and returns an HTML element that contains the button code.
72+
> **data** - A JavaScript object containing the button variables
73+
> **type** - The button type, e.g. "buynow", "cart", "qr"
74+
> **parentNode** - An HTML element to add the newly created button to (Optional)
5875
5976

6077
## Browser support

0 commit comments

Comments
 (0)