I’m trying to access a variable outside of a function on server.
I have this function running inside of server method:
var result =
Stripe.recipients.create({
name: fullName,
type: "individual",
bank_account: token,
email: "payee@example.com"
}, function(err, res) {
if (res)
{
var iWantThis = res.id;
return iWantThis;
}
})
the result on the client is:
a funky looking object with the following name: bitField: 1, _promise0: Object
Any ideas?