capacitor-community / stripe

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

feat(): add method payWithGooglePay and payWithApplePay #90

Closed metalllus closed 2 years ago

metalllus commented 2 years ago

Hi, ok, so this is the thing. I have an Angular Firebase PWA with implemented payments thru Stripe.js (Stripe Elements). When I upgraded my project to Ionic 5 Capacitor, my implementation works (card payments work fine) except for Apple Pay and Google Pay. My question is if it is possible to use your plugin solely to make the Google Pay/Apple Pay payment on native device after the user selects payment with Apple Pay/Google Pay in my UI. I do not need the payment sheet I just need to invoke the Google Pay/Apple Pay on the native device. The web implementation of Stripe.js cannot do this on native device, it works only on the web.

rdlabo commented 2 years ago

@metalllus Thanks. I updated readme with your image, and released Google Pay method at main release!!

metalllus commented 2 years ago

@rdlabo sorry, I've never done this, what exactly should I do? what do you mean by 'specify contributions'?

rdlabo commented 2 years ago

@metalllus I think you work many test, and giving screenshot to readme. So I want to add Contributors list. But bot require created pull request. mmm... Think a little about how to do it.

rdlabo commented 2 years ago

OK. I could make allcontributors bot create pull request: https://github.com/capacitor-community/stripe/pull/99

metalllus commented 2 years ago

@rdlabo Do you need me to do something or...?

rdlabo commented 2 years ago

@metalllus Not need about allcontributors👍

Now that the work is complete, please close the issue if there is no problem.

malua commented 2 years ago

@metalllus I just came across this issue and wanted to tell you that stripe js does work with capacitor. you just have to set

server: {
  androidScheme: 'https',
  iosScheme: 'ionic'
}

ionic is whitelisted by the stripe js script and https on android will work anyway.

metalllus commented 2 years ago

@malua do apple pay/google pay payments work for you through stripe.js as well? You see, normal card payments were never a problem, just apple pay and google pay payments which are solved by this capacitor plugin.

madmacc commented 2 years ago

@malua Does that actually work for you with Apple Pay?

I spent quite a bit of time trying to change the urlScheme but it seemed to not be possible. I saw that ionic was whitelisted in the code. You can look at the stripe.js code and search for "ionic".

I have seen numerous comments from people saying this is not possible.

malua commented 2 years ago

ah sorry!! i misunderstood the issue... no that won't work.

I saw that ionic was whitelisted in the code. You can look at the stripe.js code and search for "ionic".

yes thats how i found out as well. and i thought you might not know that, but of course this issue is only related to apple/google pay.

sorry!

rdlabo commented 2 years ago

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 Thanks.

metalllus commented 2 years ago

I made the plugin work fine but the app is still used only as a PWA/TWA in production despite being prepared to be rolled out native to mobile app stores. The app is still under constant development and it is much easier to roll out updates in a PWA environment than having to wait a few days each time to have new versions approved in app stores. If I decide to roll out the native mobile versions I will let you know.

S pozdravom / Best Regards,

Ľuboš Valkovič Freelance Translator and Linguist

Ing. Ľuboš Valkovič Kalinčiakova 1730/2 953 01 Zlaté Moravce

IČO: 43960707 DIČ: 1078781374

Tel. :       +421 905 870 436 e-mail:     @. On 19 Jan 2022, 02:22 +0100, Masahiko Sakakibara @.>, wrote:

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. — Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.Message ID: @.***>

davidemerritt commented 2 years ago

Changed label: d6b78f4

Just a heads up that the web docs for apple pay still reference merchantDisplayName which threw me off as well.

https://stripe.capacitorjs.jp/docs/apple-pay

93lucasp commented 6 months ago

Changed label: d6b78f4

Just a heads up that the web docs for apple pay still reference merchantDisplayName which threw me off as well.

https://stripe.capacitorjs.jp/docs/apple-pay

yes please update the doc, I spent 2 hours because of that.