if the script contains: `return res.token;` how do i see if token is 
success in my controller? ... if token.success? Here's the script I have to 
get the token in my controller

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+unsubscr...@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/5d0df62b-b5cb-4b8b-abd5-0d091efc62d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to