You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-13Lines changed: 24 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Integrating with our HTML payment buttons are as easy as including a snippet of code. [Try it out and configure your own](http://paypal.github.com/JavaScriptButtons/).
4
4
5
-
We have two flavors of buttons for you to use:
5
+
We have a few flavors of buttons for you to use:
6
6
7
7
### Buy Now
8
8
Buy Now buttons are for single item purchases.
@@ -51,32 +51,39 @@ All of PayPal's [HTML button variables](https://cms.paypal.com/us/cgi-bin/?cmd=_
51
51
*`data-size` For button images: `small` and `large` work. For QR codes enter the pixel length of the longest side.
52
52
*`data-id` The hosted ID of the button (if applicable).
53
53
54
+
## Editable fields
55
+
Creating editable fields is easy! Just add `-editable` to the name of your variable, e.g. `data-quantity-editable`, and an input field will magically appear for your users.
54
56
55
-
## Getting your Merchant ID
56
-
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.
57
-
58
-
59
-
## Download
60
-
To download the production-ready JavaScript you'll need to save one of these files:
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).
66
-
67
-
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).
58
+
## Localization
59
+
* Changing the default language of a button can be done by setting the variable `data-lc` with the correct locale code, e.g. es_ES.
60
+
* Changing the default input labels of editable buttons can be done by overriding the default configuration, e.g. PAYPAL.apps.ButtonFactory.config.labels.
68
61
69
62
70
63
## JavaScript API
71
64
There's even a fancy JavaScript API if you'd like to pragmatically create your buttons.
72
65
66
+
**PAYPAL.apps.ButtonFactory.config**
67
+
This can be overridden to change the default behavior of the buttons.
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).
83
+
84
+
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).
85
+
86
+
80
87
## Browser support
81
88
The JavaScript buttons have been tested and work in all modern browsers including:
82
89
@@ -86,6 +93,10 @@ The JavaScript buttons have been tested and work in all modern browsers includin
86
93
* Internet Explorer 7+.
87
94
88
95
96
+
## Getting your Merchant ID
97
+
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.
0 commit comments