triniwiz / nativescript-plugins

Apache License 2.0
78 stars 50 forks source link

[stripe][android] Selecting a payment method results in crash #162

Closed msn444 closed 1 year ago

msn444 commented 1 year ago

With 9.0.0-beta.1, standard integration -- selecting a payment method results in the following crash:

System.err: An uncaught Exception occurred on "main" thread.
  System.err: Calling js method onPaymentSessionDataChanged failed
  System.err: Error: Missing getter method for property: type
  System.err:
  System.err: StackTrace:
  System.err: createPaymentMethod(file: app/webpack:/app/node_modules/@triniwiz/nativescript-stripe/standard/index.android.js:285:0)
  System.err:   at onCustomerRetrieved(file: app/webpack:/app/node_modules/@triniwiz/nativescript-stripe/standard/index.android.js:257:0)
  System.err:   at onPaymentSessionDataChanged(file: app/webpack:/app/node_modules/@triniwiz/nativescript-stripe/standard/index.android.js:254:0)

Looking at sessionData.paymentMethod just before createPaymentMethod is called, it reports missing getters for all properties: image

triniwiz commented 1 year ago

Which version runtime are you using ?

msn444 commented 1 year ago

Hi @triniwiz, I was running @nativescript/android 8.3.1. I've now upgraded to 8.4.0 and the issue is solved. Thanks!

triniwiz commented 1 year ago

Yes that kotlin getter issue was fixed in 8.4 😅