I think, I found a bug in the library, if you are using Stripe class to make createPaymentMethod with card and billingDetails, then you will get a null object error.
Ref:
Error: Uncaught (in promise): TypeError: null is not an object (evaluating 'billing.address.line1 = card.addressLine1')
in src/stripe.ios.ts
we are just verifying if the card.value exists, if so then we call billing.address.value. However when billing object is created there is no value assigned to address, and that leads to an error in iOS.
Ref:
https://github.com/triniwiz/nativescript-stripe/blob/master/src/stripe.ios.ts line # 77
const billing = STPPaymentMethodBillingDetails.new();
if (card.addressLine1) billing.address.line1 = card.addressLine1;
if (card.addressLine2) billing.address.line2 = card.addressLine2;
if (card.addressCity) billing.address.city = card.addressCity;
if (card.addressState) billing.address.state = card.addressState;
if (card.addressZip) billing.address.postalCode = card.addressZip;
if (card.addressCountry) billing.address.country = card.addressCountry;
Which platform(s) does your issue occur on?
iOS
iOS 13.4.1
emulator
Please, tell us how to recreate the issue in as much detail as possible.
Just need to use Stripe class and call createPaymentMethod onSubmit of payment
I think, I found a bug in the library, if you are using Stripe class to make
createPaymentMethod
withcard
andbillingDetails
, then you will get a null object error.Ref:
Error: Uncaught (in promise): TypeError: null is not an object (evaluating 'billing.address.line1 = card.addressLine1')
in
src/stripe.ios.ts
we are just verifying if thecard.value
exists, if so then we callbilling.address.value
. However whenbilling
object is created there is no value assigned toaddress
, and that leads to an error in iOS.Ref:
Which platform(s) does your issue occur on?
Please, tell us how to recreate the issue in as much detail as possible.
Just need to use Stripe class and call
createPaymentMethod
onSubmit of payment