stripe-meteor
stripe-meteor copied to clipboard
createRefund with meteor.wrapAsync issue?
I've tried to do the usual pattern for meteor.wrapAsync with charges.createRefund and its giving me issues.
var createRefund = Meteor.wrapAsync(StripeAPI.charges.createRefund.bind(StripeAPI.charges);
var result = createRefund(chargeId);
Spits out a very weird error message: "Cannot use 'in' operator to search for 'message' in illegal access" whenever I try to invoke createRefund.
When I do....
StripeAPI.charges.createRefund(chargeId, function(err, results) {
if(err) {
throw new Meteor.Error('stripe-error', err);
} else {
fut.return(results);
}
});
It works, but without the advantages of wrapAsync.
Any Ideas?