0

When I use _wrapAsync like so:

var stripeChargeCreate = Meteor._wrapAsync(_.bind(Stripe.charges.create,Stripe));
var charge = stripeChargeCreate({
    amount: amount,
    currency: "usd",
    card: token,
    description: description
});

I get the following error: Object # has no method 'createUrlData'

What am I missing?

1 Answers1

1

Are you sure your bind is correct? _.bind(Stripe.charges.create,Stripe.charges) might work better.

imslavko
  • 6,596
  • 2
  • 34
  • 43
  • That worked. Thanks! Ironically, I actually tried this yesterday and it worked. But I had another error that I didn't read carefully enough. Thanks for pointing me back in the right direction. – esteban3643345 Jul 19 '14 at 03:40
  • I had similar problems, and created a similar question, this is working in meteor > 0.9 maybe somebody can find this useful http://stackoverflow.com/questions/26322617/meteor-wrapasync-dont-return-value – ncubica Oct 12 '14 at 21:59