Ruby on Rails
Monday, May 21, 2018
I'm trying to create a controller action for this script's 'payment' function I don't understand these 2 lines of code below (before the entire block) return res.token is gonna be seen in my controller as params what?
return paypal.request.post(SETEC_URL).then(function(res)
return res.token;
paypal.Button.render({ payment: function() { var SETEC_URL = 'https://mystore.com/api/paypal/set-express-checkout'; return paypal.request.post(SETEC_URL).then(function(res) { return res.token; }); }
}, '#paypal-button-container');
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f4d14798-fcb0-44ff-84e6-4a3b89b7ef13%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment