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
| paypal.Button.render({ | |
| payment: function(resolve) { | |
| getPayPalToken(function(token) { | |
| resolve(token); | |
| }); | |
| }, | |
| onAuthorize: function(data) { | |
| getPayPalTokenDetails(data.paymentToken, data.function(details) { |
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
| paypal.Button.render({ | |
| payment: function() { | |
| return jQuery.ajax({ | |
| method: 'POST', | |
| url: '/generate-paypal-token' | |
| }).then(function(data, status, res) { | |
| // Reject the promise if token not returned |
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
| <script src="https://www.paypalobjects.com/api/checkout.js"></script> | |
| <script src="https://js.braintreegateway.com/web/3.9.0/js/client.min.js"></script> | |
| <script src="https://js.braintreegateway.com/web/3.9.0/js/paypal-checkout.min.js"></script> | |
| <div id="paypal-button-container"></div> | |
| <script> | |
| var authToken = 'eyJ2ZXJzaW9uIjoyLCJhdXRob3JpemF0aW9uRmluZ2VycHJpbnQiOiJjMDFhZmRkM2Y1OTJmNWVhNTNlMzE5MWQwYmIyMWVjYjM5NzNlZGM1MzkwNDZiMjJmNTA2ODEyNzIzZmRlMTJifGNsaWVudF9pZD1jbGllbnRfaWQkc2FuZGJveCQ0ZHByYmZjNnBoNTk1Y2NqXHUwMDI2Y3JlYXRlZF9hdD0yMDE3LTA0LTI2VDIzOjI2OjU5Ljg3OTA3ODYwNiswMDAwXHUwMDI2bWVyY2hhbnRfaWQ9M3cydHR2d2QyNDY1NDhoZCIsImNvbmZpZ1VybCI6Imh0dHBzOi8vYXBpLnNhbmRib3guYnJhaW50cmVlZ2F0ZXdheS5jb206NDQzL21lcmNoYW50cy8zdzJ0dHZ3ZDI0NjU0OGhkL2NsaWVudF9hcGkvdjEvY29uZmlndXJhdGlvbiIsImNoYWxsZW5nZXMiOltdLCJlbnZpcm9ubWVudCI6InNhbmRib3giLCJjbGllbnRBcGlVcmwiOiJodHRwczovL2FwaS5zYW5kYm94LmJyYWludHJlZWdhdGV3YXkuY29tOjQ0My9tZXJjaGFudHMvM3cydHR2d2QyNDY1NDhoZC9jbGllbnRfYXBpIiwiYXNzZXRzVXJsIjoiaHR0cHM6Ly9hc3NldHMuYnJhaW50cmVlZ2F0 |
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
| // Compressed version of quick start | |
| <script src="https://www.paypalobjects.com/api/checkout.js"></script> | |
| <div id="paypal-button"></div> | |
| <script> | |
| paypal.Button.render({ | |
| env: 'sandbox', | |
| client: { sandbox: 'demo_sandbox_client_id' }, | |
| payment: function(data, actions) { | |
| return actions.payment.create({ |
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
| <!DOCTYPE html> | |
| <head> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
| <script src="https://www.paypalobjects.com/api/checkout.js"></script> | |
| <script src="https://js.braintreegateway.com/web/3.11.0/js/client.min.js"></script> | |
| <script src="https://js.braintreegateway.com/web/3.11.0/js/paypal-checkout.min.js"></script> | |
| </head> |
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
| steps = steps.filter(step => { | |
| return step.selector !== '#foo'; | |
| }); |
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
| for (var i = 0; i <= 3; i++) { | |
| if (i !== 2) { | |
| print('Happy birthday to you!') | |
| } else { | |
| print('Happy birthday dear <name>!'); | |
| } | |
| } |