network-international / react-native-ngenius

Other
5 stars 8 forks source link

[SUPPORT] Working with NativeScript #9

Closed mahmoudajawad closed 2 years ago

mahmoudajawad commented 2 years ago

Hello.

We are working with Network to add payment gateway to an app we are working on, which uses NativeScript.

At this point, we are having an issue hitting the SDK method NISdk.sharedInstance.showCardPaymentView with an exception at PaymentViewController.swift line 56:

self.authorizePayment()

I have the project for testing live at: https://github.com/mahmoudajawad/nativescript-ngenius, to run it at your end:

  1. Install NativeScript CLI: npm i -g nativescript
  2. Clone previous repo.
  3. Update credentials in file: src/app/apis.service.ts
  4. Run app: ns run ios
  5. Tap pay button.
  6. App crashes without log in terminal.
  7. Open xcode workspace: platforms/ios/paymenttest.xcworkspace.
  8. Run app from xcode, and tap pay button.
  9. xcode breaks at the line mentioned in the issue.

I want top work with you to figure out how we can get this working, and maybe get nativescript as supported platform for network sdks.

mahmoudajawad commented 2 years ago

I have an update. Further tracking down the issue, and the call order.getAuthCode() in line 62 seems to be hitting a compiler issue. Are there any expected vectors that I need to enable using "Enable Additional Vector Extensions"?

mahmoudajawad commented 2 years ago

After more work, I pushed a new commit which includes changes that get method initiateCardPayment to work, however, I'm hitting some weird issue with initiateApplePay method where it is not getting to call SDK method.