capacitor-community / stripe

Stripe Mobile SDK wrapper for Capacitor
MIT License
185 stars 74 forks source link

Use plugin without payment intent #131

Closed LinnaeK closed 2 years ago

LinnaeK commented 2 years ago

We have Stripe set up for our web based product, and want to use this plugin to get around the requirement from ios for https protocol when using ApplePay with Capacitor. With our web based flow the client facing side gets a paymentMethod from stripe elements, and then submits that to our API to create the paymentIntent. The paymentIntent has to be created on the API side in order for us to store details regarding the transaction in our database. Is there a way I can use this plugin without creating the payment intent on the client facing side?

hideokamoto commented 2 years ago

For now, the requirement of the plugin is getting client secrets from PaymentIntent, SetupIntent, or Subscription using our server.

MordantWastrel commented 2 years ago

Is there any intention in this plugin to support Elements?

We tried to keep our client-side operations to a minimum, thinking it would make it easier to support Apple Pay, Google Pay, etc. -- and that's true in every case except for Apple Pay since iOS doesn't like capacitor://. All we need from Elements is the ability to take card input and get a payment method ID from it.

This plugin is doing tons of cool stuff way more involved than that! Just curious whether supporting Elements is consistent iwth what the plugin is trying to do, or if we should go back to the drawing board.

rdlabo commented 2 years ago

Is there any intention in this plugin to support Elements?

This plugin supported https://github.com/stripe-elements/stripe-elements . This is created with Elements .

Or you can use Elements directly with if. https://capacitorjs.com/docs/core-apis/web#getplatform

if (getPlatform() === 'web') {
  // 
}

Thanks.

rdlabo commented 2 years ago

@LinnaeK @MordantWastrel Did you adapt this plugin for production? If yes, please tell us what app. Please help us to develop this plugin in 2022. https://github.com/capacitor-community/stripe/issues/145

MordantWastrel commented 2 years ago

I don't think we are as our business case is different than what you're trying to do.

rdlabo commented 2 years ago

@MordantWastrel Thanks for reply. OK, if you release an app that can be published, please let me know!

rdlabo commented 2 years ago

Has this problem been resolved? No action taken, so this Issue is closed. If you continue to have problems, please create a new Issue.