| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 62a0bcb commit 4113235
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -54,7 +54,24 @@ Your merchant ID needs to be added to the URL of the referenced script. This ID | |||
| 54 | 54 | ||
| 55 | 55 | ||
| 56 | 56 | ## 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) | ||
| 58 | 75 | ||
| 59 | 76 | ||
| 60 | 77 | ## Browser support | |
| Back | FazBrowse Home | New Git URL |
0 commit comments