Closed rdlabo closed 2 years ago
Amazing!
Few issues still there on iOS: Android build is fine.
❌ /Users/vagrant/git/node_modules/@capacitor-community/stripe/ios/Plugin/PKAuthViewDelegate.swift:41:102: cannot convert value of type 'Error?' to expected argument type 'String?'
callback.reject("unable to create payment method: " + err!.localizedDescription, err)
❌ /Users/vagrant/git/node_modules/@capacitor-community/stripe/ios/Plugin/PKAuthViewDelegate.swift:53:93: cannot convert value of type 'NSError?' to expected argument type 'String?'
callback.reject("payment failed: " + err!.localizedDescription, err)
❌ /Users/vagrant/git/node_modules/@capacitor-community/stripe/ios/Plugin/PKAuthViewDelegate.swift:79:93: cannot convert value of type 'Error?' to expected argument type 'String?'
callback.reject("unable to create token: " + err!.localizedDescription, err)
and
call.error("Google Pay is not available on iOS")
^~~~~
reject
/Users/vagrant/git/node_modules/@capacitor-community/stripe/ios/Plugin/StripePlugin.swift:668:33: warning: 'getSavedCall' is deprecated: renamed to 'savedCall(withID:)'
if let c = self.bridge?.getSavedCall(ctx.callbackId) {
^
/Users/vagrant/git/node_modules/@capacitor-community/stripe/ios/Plugin/StripePlugin.swift:668:33: note: use 'savedCall(withID:)' instead
if let c = self.bridge?.getSavedCall(ctx.callbackId) {
@patrickbussmann Thanks for check working. I fixed and pre-released 3.0.0-1.
@rdlabo do we have documentation to follow or blog post? ie Vue Angular
@donPuerto not yet. For the time being, I plan to spend my time on refactoring and feature checking. But Capacitor 3 don't support IE, so this plugin don't support IE too. Thanks.
@rdlabo Thanks for the work mate. Yeah dump that IE :)
Secret key of Stripe is not public key. This plugin suggest input secret key to code. This is not recommended. It seems that it will need to be remade into a completely new style in v3 support.
Secret key of Stripe is not public key. This plugin suggest input secret key to code. This is not recommended. It seems that it will need to be remade into a completely new style in v3 support.
You mean removing the secret key?
Can we help you somehow with this new style?
@rdlabo Hi team!
I think we should remove these classes and methods. https://github.com/capacitor-community/stripe/blob/feat/v3/src/web.ts#L376-L430 https://github.com/capacitor-community/stripe/blob/feat/v3/src/web.ts#L319-L373
There using a Stripe secret key, but the key should not use on the frontend.
I think we should recreate it to follow the Stripe JavaScript SDK. If you wanna try this, I can help you.
@patrickbussmann @hideokamoto YES. I will remove secret key and method of using this. Currently this plugin can create payment alone. But will be change to have to using backend. The big role of the plugin will be to create a payment UI.
I will do the rough development, so I would appreciate it if you could help me with the tests and reviews.
I get no response from Google Pay.
const { success, token } = (await stripePlugin.payWithGooglePay({
gets never resolved.
gets never resolved.
Because of missing upgrade: https://capacitorjs.com/docs/updating/plugins/3-0#android-request-codes
Lets give @rdlabo some time. Then we can start writing tests and then all people can start using this with Capv3.
@patrickbussmann @hideokamoto YES. I will remove secret key and method of using this. Currently this plugin can create payment alone. But will be change to have to using backend. The big role of the plugin will be to create a payment UI.
I will do the rough development, so I would appreciate it if you could help me with the tests and reviews.
Do you have time to take a look into that issue?
@hideokamoto I created draft of web implements. https://github.com/capacitor-community/stripe/pull/74/commits/d2b0d2199a0a88b0f988135f29248024b59fccae
Stripe's "Elements" is not useful for Plugin, so we should create Web Components like PaymentSheet UI at OS & Android. Can you create with StencilJS?
YES!!!!
YES!!!!
Really Nice !!
This is Android!!
Released: https://github.com/capacitor-community/stripe/releases/tag/v3.0.0-2
Support only these method:
ApplePay and GooglePay is included at PaymentSheet. So these method is removed.
Released: https://github.com/capacitor-community/stripe/releases/tag/v3.0.0-2
Support only these method:
- initialize
- createPaymentSheet
- presentPaymentSheet
ApplePay and GooglePay is included at PaymentSheet. So these method is removed.
- README is here: https://github.com/capacitor-community/stripe/tree/feat/v3
- Demo Implements is here: https://github.com/capacitor-community/stripe/tree/feat/v3/demo
Stripe.addListener(PaymentSheetEventsEnum.Completed, (response) => {
console.log('PaymentSheetEventsEnum.Completed', response);
});
@danielehrhardt Thanks try, and sorry mistake. I fixed type and release at https://github.com/capacitor-community/stripe/releases/tag/v3.0.0-3 If it is possible, please try again. Thanks.
@danielehrhardt Thanks try, and sorry mistake. I fixed type and release at https://github.com/capacitor-community/stripe/releases/tag/v3.0.0-3 If it is possible, please try again. Thanks.
To be on the safe side I added your case to the demo app so that the build process will fail when its an issue.
@danielehrhardt @patrickbussmann Thanks for try🙏
I will merge to master branch. Let's discuss Individual new issues!
We will create breaking changes: https://github.com/capacitor-community/stripe/pull/74#issuecomment-862186364
Android
iOS
Web