capacitor-community / stripe

Stripe Mobile SDK wrapper for Capacitor
https://capacitor-community-stripe.netlify.app/
MIT License
192 stars 77 forks source link

confirmSetupIntent doesn't return data in iOS #51

Closed ManuelCostanzo closed 3 years ago

ManuelCostanzo commented 3 years ago

This:

 Stripe.confirmSetupIntent({
      clientSecret,
      card: {
        number: '4242424242424242',
        exp_month: 12,
        exp_year: 25,
        cvc: '224',
        name: 'asda'
        email: 'asdfa@gmail.com',
      },
      id: clientSecret,
      redirectUrl: 'https://app.myapp.com', // Required for Android
    }).then((result) => {
  console.log(result)
    });

It Works perfectly on Android but I don't have any response on iOS (result is an empty object). I'm using Ionic Capacitor. I test this on my Android phone and it worked perfectly, but emulating using Xcode it doesn't work.

How can I solve this?

Thank you so much !

OrthoCube commented 3 years ago

I am affected by the same situation.

OrthoCube commented 3 years ago

I have made a somewhat rough fix to this and can confirm that it works in my case. I submitted a pull request here: https://github.com/capacitor-community/stripe/pull/59

I hope it gets pulled soon enough.

rdlabo commented 3 years ago

Thanks for issue! Today this plugin of v3 is released. This not compatible with v1. All APIs have been revamped. So I will close this issue. If you still have the same problem, please create a new Issue. Thank you.