| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -68,10 +68,13 @@ All of PayPal's [HTML button variables](https://cms.paypal.com/us/cgi-bin/?cmd=_ | |||
| 68 | 68 | * `data-name` Description of the item. | |
| 69 | 69 | * `data-number` The number of the item. | |
| 70 | 70 | * `data-amount` The price of the item. | |
| 71 | + * `data-currency` The currency of the item (note: these cannot be mixed). | ||
| 71 | 72 | * `data-quantity` Quantity of items to purchase. | |
| 72 | 73 | * `data-shipping` The cost of shipping this item. | |
| 73 | 74 | * `data-tax` Transaction-based tax override variable. | |
| 74 | 75 | * `data-size` For button images: `small` and `large` work. For QR codes enter the pixel length of the longest side. | |
| 76 | + * `data-locale` The desired locale of the PayPal site. | ||
| 77 | + | ||
| 75 | 78 | ||
| 76 | 79 | ## Editable fields | |
| 77 | 80 | 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. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,7 @@ | |||
| 1 | 1 | /*! | |
| 2 | 2 | * PayPalJSButtons | |
| 3 | 3 | * JavaScript integration for PayPal's payment buttons | |
| 4 | - * @version 1.0.0 - 2013-03-15 | ||
| 4 | + * @version 1.0.0 - 2013-03-17 | ||
| 5 | 5 | * @author Jeff Harrell <https://github.com/jeffharrell/> | |
| 6 | 6 | */ | |
| 7 | 7 | /*! | |
@@ -1756,7 +1756,8 @@ PAYPAL.apps = PAYPAL.apps || {}; | |||
| 1756 | 1756 | prettyParams = { | |
| 1757 | 1757 | name: 'item_name', | |
| 1758 | 1758 | number: 'item_number', | |
| 1759 | - lang: 'lc', | ||
| 1759 | + locale: 'lc', | ||
| 1760 | + currency: 'currency_code', | ||
| 1760 | 1761 | recurrence: 'p3', | |
| 1761 | 1762 | period: 't3' | |
| 1762 | 1763 | }, | |
@@ -1993,7 +1994,7 @@ PAYPAL.apps = PAYPAL.apps || {}; | |||
| 1993 | 1994 | for (i = 0, len = attrs.length; i < len; i++) { | |
| 1994 | 1995 | attr = attrs[i]; | |
| 1995 | 1996 | ||
| 1996 | - if ((matches = /^data-([a-z0-9]+)(-editable)?/i.exec(attr.name))) { | ||
| 1997 | + if ((matches = /^data-([a-z0-9_]+)(-editable)?/i.exec(attr.name))) { | ||
| 1997 | 1998 | dataset[matches[1]] = { | |
| 1998 | 1999 | value: attr.value, | |
| 1999 | 2000 | isEditable: !!matches[2] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,7 @@ | |||
| 1 | 1 | /*! | |
| 2 | 2 | * PayPalJSButtons | |
| 3 | 3 | * JavaScript integration for PayPal's payment buttons | |
| 4 | - * @version 1.0.0 - 2013-03-15 | ||
| 4 | + * @version 1.0.0 - 2013-03-17 | ||
| 5 | 5 | * @author Jeff Harrell <https://github.com/jeffharrell/> | |
| 6 | 6 | */ | |
| 7 | 7 | if (typeof PAYPAL === 'undefined' || !PAYPAL) { | |
@@ -23,7 +23,8 @@ PAYPAL.apps = PAYPAL.apps || {}; | |||
| 23 | 23 | prettyParams = { | |
| 24 | 24 | name: 'item_name', | |
| 25 | 25 | number: 'item_number', | |
| 26 | - lang: 'lc', | ||
| 26 | + locale: 'lc', | ||
| 27 | + currency: 'currency_code', | ||
| 27 | 28 | recurrence: 'p3', | |
| 28 | 29 | period: 't3' | |
| 29 | 30 | }, | |
@@ -260,7 +261,7 @@ PAYPAL.apps = PAYPAL.apps || {}; | |||
| 260 | 261 | for (i = 0, len = attrs.length; i < len; i++) { | |
| 261 | 262 | attr = attrs[i]; | |
| 262 | 263 | ||
| 263 | - if ((matches = /^data-([a-z0-9]+)(-editable)?/i.exec(attr.name))) { | ||
| 264 | + if ((matches = /^data-([a-z0-9_]+)(-editable)?/i.exec(attr.name))) { | ||
| 264 | 265 | dataset[matches[1]] = { | |
| 265 | 266 | value: attr.value, | |
| 266 | 267 | isEditable: !!matches[2] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,7 +17,8 @@ PAYPAL.apps = PAYPAL.apps || {}; | |||
| 17 | 17 | prettyParams = { | |
| 18 | 18 | name: 'item_name', | |
| 19 | 19 | number: 'item_number', | |
| 20 | - lang: 'lc', | ||
| 20 | + locale: 'lc', | ||
| 21 | + currency: 'currency_code', | ||
| 21 | 22 | recurrence: 'p3', | |
| 22 | 23 | period: 't3' | |
| 23 | 24 | }, | |
@@ -254,7 +255,7 @@ PAYPAL.apps = PAYPAL.apps || {}; | |||
| 254 | 255 | for (i = 0, len = attrs.length; i < len; i++) { | |
| 255 | 256 | attr = attrs[i]; | |
| 256 | 257 | ||
| 257 | - if ((matches = /^data-([a-z0-9]+)(-editable)?/i.exec(attr.name))) { | ||
| 258 | + if ((matches = /^data-([a-z0-9_]+)(-editable)?/i.exec(attr.name))) { | ||
| 258 | 259 | dataset[matches[1]] = { | |
| 259 | 260 | value: attr.value, | |
| 260 | 261 | isEditable: !!matches[2] | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,7 +31,8 @@ <h2>Buy Now (Spanish)</h2> | |||
| 31 | 31 | data-button="buynow" | |
| 32 | 32 | data-name="Buy now!" | |
| 33 | 33 | data-amount="1.00" | |
| 34 | - data-lang="es_ES" | ||
| 34 | + data-locale="es_ES" | ||
| 35 | + data-currency_code="EUR" | ||
| 35 | 36 | ></script> | |
| 36 | 37 | </div> | |
| 37 | 38 | ||
@@ -41,7 +42,8 @@ <h2>Buy Now (French)</h2> | |||
| 41 | 42 | data-button="buynow" | |
| 42 | 43 | data-name="Buy now!" | |
| 43 | 44 | data-amount="1.00" | |
| 44 | - data-lang="fr_FR" | ||
| 45 | + data-locale="fr_FR" | ||
| 46 | + data-currency_code="EUR" | ||
| 45 | 47 | ></script> | |
| 46 | 48 | </div> | |
| 47 | 49 | ||
@@ -51,7 +53,8 @@ <h2>Buy Now (German)</h2> | |||
| 51 | 53 | data-button="buynow" | |
| 52 | 54 | data-name="Buy now!" | |
| 53 | 55 | data-amount="1.00" | |
| 54 | - data-lang="de_DE" | ||
| 56 | + data-locale="de_DE" | ||
| 57 | + data-currency_code="EUR" | ||
| 55 | 58 | ></script> | |
| 56 | 59 | </div> | |
| 57 | 60 | ||
@@ -62,7 +65,7 @@ <h2>Buy Now (Editable)</h2> | |||
| 62 | 65 | data-name-editable="Buy now!" | |
| 63 | 66 | data-amount="1.00" | |
| 64 | 67 | data-quantity-editable="1" | |
| 65 | - data-lang="en_US" | ||
| 68 | + data-locale="en_US" | ||
| 66 | 69 | ></script> | |
| 67 | 70 | </div> | |
| 68 | 71 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments