问题
I am getting a stripe token back from my stripe.tokens.create
now I can assign it to a variable inside it but I need to call that variable outside the callback. I was thinking global variable but then thought it might not work. I know the code examples I have found use req.body.stripeToken
but my req.body
comes back with a blank object {}
. I can not find any guides on this for Node.js only stuff like Ruby and PHP.
来源:https://stackoverflow.com/questions/46669259/stripe-returning-token-but-can-access-it