Last active
August 29, 2015 14:07
-
-
Save Verikon/20b7c0c22894384faa9c to your computer and use it in GitHub Desktop.
Using PaypalButtons - the online version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener( 'DOMContentLoaded', function() { | |
var parentNode = document.querySelector('#paypalButon'); | |
PAYPAL.apps.ButtonFactory.create( 'YOUR PAYPAL ID', { | |
button: { value: 'buynow' }, | |
name: { value: 'Some Product' }, | |
quantity: { value: '1' }, | |
amount: { value: '5.99' }, | |
currency: { value: 'AUD' }, | |
shipping: { value: '0' }, | |
env: { value: 'sandbox' }, //keep it in the sandbox. | |
callback: { value: 'http://staging.site.com/confirm/paypalIPN' } | |
}, { type: 'button' }, parentNode); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks Verikon!