Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payment Sheet Failed #89

Closed
max1018 opened this issue Jul 31, 2021 · 13 comments
Closed

Payment Sheet Failed #89

max1018 opened this issue Jul 31, 2021 · 13 comments

Comments

@max1018
Copy link

max1018 commented Jul 31, 2021

When trying to use the plugin on an iOS device or simulator I am getting a payment sheet failed message. However the code works just fine on web.

@PaintedShepherd
Copy link

Are you using the ephemeral key? If yes, then you have to use the id of the ephemeralResponse

@max1018
Copy link
Author

max1018 commented Jul 31, 2021

Hi @PaintedShepherd , yes I am using the ephemeral key I am manually setting it at the moment for testing purposes.

@rdlabo
Copy link
Member

rdlabo commented Aug 2, 2021

@max1018 First, you need to isolate whether the problem is with this plugin or something else. For that we are providing a demo. Please clone this repository and try https://github.com/capacitor-community/stripe/tree/master/demo/angular

@max1018
Copy link
Author

max1018 commented Aug 2, 2021

@rdlabo , after i download the repo what commands do i need to run to install dependencies and use this on a simulator?

@rdlabo
Copy link
Member

rdlabo commented Aug 2, 2021

Please run npm run cap && npx cap update && npx cap open ios .

@max1018
Copy link
Author

max1018 commented Aug 2, 2021

I get the following error below

Screen Shot 2021-08-02 at 8 44 32 AM

@rdlabo
Copy link
Member

rdlabo commented Aug 2, 2021

Sorry, I forgot one command: npm run build in top repository.

@max1018
Copy link
Author

max1018 commented Aug 2, 2021

The demo is working on my test device... not sure why its not in my application.

@rdlabo
Copy link
Member

rdlabo commented Aug 2, 2021

Maybe this is your backend api issue. Please check https://stripe.com/docs/payments/accept-a-payment?platform=ios#add-server-endpoint , and if not resolve, please ask stripe team.

@max1018
Copy link
Author

max1018 commented Aug 2, 2021

I am manually entering the information so it shouldn't be my backend. Also it works on web. What reason would the paysheet pop up and then immediately fail ?

@rdlabo
Copy link
Member

rdlabo commented Aug 2, 2021

Manually? You should create by code: https://github.com/capacitor-community/stripe/blob/master/demo/server/src/app.controller.ts#L23-L26

The web will open the PaymentSheet even if the key is wrong, but iOS does not seem to. This is a Stripe specification, so please ask Stripe.

@rdlabo rdlabo closed this as completed Aug 2, 2021
@max1018
Copy link
Author

max1018 commented Aug 2, 2021

I create by code on the backend but then take response and manually enter in

@rdlabo
Copy link
Member

rdlabo commented Jan 19, 2022

@max1018 Did you adapt this plugin for production? If yes, please tell us what app. Please help us to develop this plugin in 2022.
#145
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants