triniwiz / nativescript-plugins

Apache License 2.0
80 stars 50 forks source link

Fixe IOS issues #141

Closed kefahB closed 1 year ago

kefahB commented 1 year ago

Hi @triniwiz,

I've fixed the issues #134 and #137 and partially the #135, this fixe reduce the number of call but not fixe it definitely

kefahB commented 1 year ago

@triniwiz thanks .. please don not forged to take care of #133 please

kefahB commented 1 year ago

Hi @justinkurtz

Strange! before those changes the payment always resolve true even if in the reality is not !

Can you share how do you proceed to capturePayment the payment please ? do you use standard or sheet implementation ?

justinkurtz commented 1 year ago

I think I'm using the standard implementation. I've taken this example and modified it: apps/demo/src/plugin-demos/nativescript-stripe-src/std-view/stripe.service.ts

I see now that the capturePayment method has been changed since I originally adapted it to my project. Previously (in the commented out code) it just made an HTTP post and returned that. Seems as though I need to adapt the new code in capturePayment from that example.

justinkurtz commented 1 year ago

I wonder if we can add a null safe navigation operator to support use cases that don't immediately confirm payment intents or use 3DS. Changing this line to the below would give more flexibility and make it backwards compatible.

if(!value._native?.lastPaymentError || value._native?.lastPaymentError == "undefined") {

kefahB commented 1 year ago

Effectively it is a good idea .. @triniwiz what do you think ?

triniwiz commented 1 year ago

Sounds good 👌

justinkurtz commented 1 year ago

Thank you both! I'll create a pull request! ❤️