FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Adds callback parameter · webgoon/JavaScriptButtons@0c91750 · GitHub

Repository navigation

Commit 0c91750

Browse files
Tim Messerschmidt
committed
Adds callback parameter
An implementation for IPN's notify_url called 'data-callback'. Allows for notification of your backend.
1 parent 0448cfe commit 0c91750

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎dist/paypal-button.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ PAYPAL.apps = PAYPAL.apps || {};
2626
locale: 'lc',
2727
currency: 'currency_code',
2828
recurrence: 'p3',
29-
period: 't3'
29+
period: 't3',
30+
callback: 'notify_url'
3031
},
3132
buttonImgs = {
3233
buynow: '//www.paypalobjects.com/{locale}/i/btn/btn_buynow_{size}.gif',

‎src/paypal-button.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ PAYPAL.apps = PAYPAL.apps || {};
2020
locale: 'lc',
2121
currency: 'currency_code',
2222
recurrence: 'p3',
23-
period: 't3'
23+
period: 't3',
24+
callback: 'notify_url'
2425
},
2526
buttonImgs = {
2627
buynow: '//www.paypalobjects.com/{locale}/i/btn/btn_buynow_{size}.gif',

‎test/index.html‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ <h2>Buy Now (Small)</h2>
1313
data-name="Buy now!"
1414
data-amount="1.00"
1515
data-size="small"
16+
data-callback="http://example.com/callback"
1617
></script>
1718
</div>
1819

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL