react-native-payengine 1.0.6 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/README.md +193 -111
  2. package/android/.gradle/6.1.1/executionHistory/executionHistory.lock +0 -0
  3. package/android/.gradle/{5.6.4/fileHashes/resourceHashesCache.bin → 6.1.1/fileHashes/fileHashes.bin} +0 -0
  4. package/android/.gradle/6.1.1/fileHashes/fileHashes.lock +0 -0
  5. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  6. package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
  7. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  8. package/android/.gradle/checksums/checksums.lock +0 -0
  9. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  10. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  11. package/android/.gradle/config.properties +2 -0
  12. package/android/.idea/caches/deviceStreaming.xml +318 -0
  13. package/android/.idea/gradle.xml +2 -3
  14. package/android/.idea/kotlinc.xml +6 -0
  15. package/android/.idea/migrations.xml +10 -0
  16. package/android/.idea/misc.xml +1 -1
  17. package/android/build.gradle +24 -3
  18. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  19. package/android/paymentsdk-debug.aar +0 -0
  20. package/android/paymentsdk-release.aar +0 -0
  21. package/android/src/main/java/com/reactnativepayengine/PayengineModule.java +1 -5
  22. package/android/src/main/java/com/reactnativepayengine/PayenginePackage.java +7 -33
  23. package/android/src/main/java/com/reactnativepayengine/util/MetricsUtil.kt +44 -0
  24. package/android/src/main/java/com/reactnativepayengine/v2/RNPEFraudAnalyticsApplication.java +55 -0
  25. package/android/src/main/java/com/reactnativepayengine/v2/RNPayEngineNative.kt +71 -0
  26. package/android/src/main/java/com/reactnativepayengine/v2/securefields/RNPEEvents.kt +8 -0
  27. package/android/src/main/java/com/reactnativepayengine/v2/securefields/RNPEField.kt +17 -0
  28. package/android/src/main/java/com/reactnativepayengine/v2/securefields/bankaccount/RNBankAccountViewManager.kt +103 -0
  29. package/android/src/main/java/com/reactnativepayengine/v2/securefields/bankaccount/RNPEBankAccountView.kt +77 -0
  30. package/android/src/main/java/com/reactnativepayengine/v2/securefields/creditcard/RNPECreditCardView.kt +77 -0
  31. package/android/src/main/java/com/reactnativepayengine/v2/securefields/creditcard/RNPECreditCardViewManager.kt +103 -0
  32. package/ios/PayEngineSDK.xcframework/Info.plist +44 -0
  33. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Frameworks/libKountDataCollector.a +0 -0
  34. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Headers/CustomWindow.h +25 -0
  35. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Headers/KDataCollector.h +106 -0
  36. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Headers/KountAnalyticsViewController.h +82 -0
  37. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Headers/PayEngineSDK-Swift.h +622 -0
  38. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Headers/PayEngineSDK.h +20 -0
  39. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Headers/UIControl+CustomControl.h +33 -0
  40. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Headers/UIViewController+TouchControl.h +27 -0
  41. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Info.plist +0 -0
  42. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios.abi.json +15143 -0
  43. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +326 -0
  44. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios.private.swiftinterface-e +326 -0
  45. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  46. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios.swiftinterface +326 -0
  47. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios.swiftinterface-e +326 -0
  48. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Modules/module.modulemap +11 -0
  49. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/PayEngineSDK +0 -0
  50. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/VGSCollectSDK_VGSCollectSDK.bundle/Assets.car +0 -0
  51. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/VGSCollectSDK_VGSCollectSDK.bundle/Info.plist +0 -0
  52. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/browserInfo.html +136 -0
  53. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/perform3ds.html +467 -0
  54. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Frameworks/libKountDataCollector.a +0 -0
  55. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Headers/CustomWindow.h +25 -0
  56. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Headers/KDataCollector.h +106 -0
  57. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Headers/KountAnalyticsViewController.h +82 -0
  58. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Headers/PayEngineSDK-Swift.h +1240 -0
  59. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Headers/PayEngineSDK.h +20 -0
  60. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Headers/UIControl+CustomControl.h +33 -0
  61. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Headers/UIViewController+TouchControl.h +27 -0
  62. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Info.plist +0 -0
  63. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +15143 -0
  64. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +326 -0
  65. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface-e +326 -0
  66. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  67. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +326 -0
  68. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface-e +326 -0
  69. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +15143 -0
  70. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +326 -0
  71. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface-e +326 -0
  72. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  73. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +326 -0
  74. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface-e +326 -0
  75. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/module.modulemap +11 -0
  76. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/PayEngineSDK +0 -0
  77. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/VGSCollectSDK_VGSCollectSDK.bundle/Assets.car +0 -0
  78. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/VGSCollectSDK_VGSCollectSDK.bundle/Info.plist +0 -0
  79. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/browserInfo.html +136 -0
  80. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/perform3ds.html +467 -0
  81. package/ios/Payengine.xcodeproj/project.pbxproj +14 -4
  82. package/ios/Payengine.xcodeproj/project.xcworkspace/xcuserdata/tringuyen.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  83. package/ios/Payengine.xcworkspace/contents.xcworkspacedata +7 -0
  84. package/ios/Payengine.xcworkspace/xcuserdata/tringuyen.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  85. package/ios/Sources/Classes/ApplePay/RNPEApplePayButton.swift +111 -0
  86. package/ios/Sources/Classes/ApplePay/RNPEApplePayPaymentRequest.swift +43 -0
  87. package/ios/Sources/Classes/RNPEError.swift +12 -0
  88. package/ios/Sources/Classes/RNPEEventEmitter.swift +29 -0
  89. package/ios/Sources/Classes/RNPEUtils.swift +30 -0
  90. package/ios/Sources/Classes/RNPayEngineNative.swift +87 -0
  91. package/ios/Sources/Classes/SecureFields/RNPEBankAccountView.swift +130 -0
  92. package/ios/Sources/Classes/SecureFields/RNPECreditCardView.swift +129 -0
  93. package/ios/Sources/Classes/SecureFields/RNPEEvents.swift +15 -0
  94. package/ios/Sources/Classes/SecureFields/RNPEField.swift +26 -0
  95. package/ios/Sources/Payengine.m +73 -0
  96. package/ios/Sources/Payengine.swift +13 -0
  97. package/lib/commonjs/components/PayEngine.js +2 -123
  98. package/lib/commonjs/components/PayEngine.js.map +1 -1
  99. package/lib/commonjs/components/{SecureFields/VGS/ExpDateField.js → v2/ApplePay/PEApplePayButton.js} +38 -13
  100. package/lib/commonjs/components/v2/ApplePay/PEApplePayButton.js.map +1 -0
  101. package/lib/commonjs/components/v2/ApplePay/PEPaymentRequest.js +29 -0
  102. package/lib/commonjs/components/v2/ApplePay/PEPaymentRequest.js.map +1 -0
  103. package/lib/commonjs/components/v2/PayEngineNative.js +34 -0
  104. package/lib/commonjs/components/v2/PayEngineNative.js.map +1 -0
  105. package/lib/commonjs/components/{SecureFields/VGS/TextField.js → v2/PayEngineProvider.js} +28 -12
  106. package/lib/commonjs/components/v2/PayEngineProvider.js.map +1 -0
  107. package/lib/commonjs/components/v2/SecureFields/BankAccountView.js +89 -0
  108. package/lib/commonjs/components/v2/SecureFields/BankAccountView.js.map +1 -0
  109. package/lib/commonjs/components/v2/SecureFields/CreditCardView.js +90 -0
  110. package/lib/commonjs/components/v2/SecureFields/CreditCardView.js.map +1 -0
  111. package/lib/commonjs/components/v2/SecureFields/IPEField.js +6 -0
  112. package/lib/commonjs/components/v2/SecureFields/IPEField.js.map +1 -0
  113. package/lib/commonjs/components/v2/SecureFields/PEBankAccount.js +6 -0
  114. package/lib/commonjs/components/v2/SecureFields/PEBankAccount.js.map +1 -0
  115. package/lib/commonjs/components/v2/SecureFields/PECard.js +6 -0
  116. package/lib/commonjs/components/v2/SecureFields/PECard.js.map +1 -0
  117. package/lib/commonjs/components/v2/SecureFields/PEKeyboardType.js +18 -0
  118. package/lib/commonjs/components/v2/SecureFields/PEKeyboardType.js.map +1 -0
  119. package/lib/commonjs/index.js +54 -18
  120. package/lib/commonjs/index.js.map +1 -1
  121. package/lib/commonjs/interfaces/index.js +0 -4
  122. package/lib/commonjs/interfaces/index.js.map +1 -1
  123. package/lib/commonjs/utils/index.js +10 -38
  124. package/lib/commonjs/utils/index.js.map +1 -1
  125. package/lib/module/components/PayEngine.js +3 -118
  126. package/lib/module/components/PayEngine.js.map +1 -1
  127. package/lib/module/components/v2/ApplePay/PEApplePayButton.js +37 -0
  128. package/lib/module/components/v2/ApplePay/PEApplePayButton.js.map +1 -0
  129. package/lib/module/components/v2/ApplePay/PEPaymentRequest.js +20 -0
  130. package/lib/module/components/v2/ApplePay/PEPaymentRequest.js.map +1 -0
  131. package/lib/module/components/v2/PayEngineNative.js +23 -0
  132. package/lib/module/components/v2/PayEngineNative.js.map +1 -0
  133. package/lib/module/components/v2/PayEngineProvider.js +30 -0
  134. package/lib/module/components/v2/PayEngineProvider.js.map +1 -0
  135. package/lib/module/components/v2/SecureFields/BankAccountView.js +75 -0
  136. package/lib/module/components/v2/SecureFields/BankAccountView.js.map +1 -0
  137. package/lib/module/components/v2/SecureFields/CreditCardView.js +76 -0
  138. package/lib/module/components/v2/SecureFields/CreditCardView.js.map +1 -0
  139. package/lib/module/components/v2/SecureFields/IPEField.js +2 -0
  140. package/lib/module/components/v2/SecureFields/IPEField.js.map +1 -0
  141. package/lib/module/components/v2/SecureFields/PEBankAccount.js +2 -0
  142. package/lib/module/components/v2/SecureFields/PEBankAccount.js.map +1 -0
  143. package/lib/module/components/v2/SecureFields/PECard.js +2 -0
  144. package/lib/module/components/v2/SecureFields/PECard.js.map +1 -0
  145. package/lib/module/components/v2/SecureFields/PEKeyboardType.js +11 -0
  146. package/lib/module/components/v2/SecureFields/PEKeyboardType.js.map +1 -0
  147. package/lib/module/index.js +14 -6
  148. package/lib/module/index.js.map +1 -1
  149. package/lib/module/interfaces/index.js +1 -1
  150. package/lib/module/interfaces/index.js.map +1 -1
  151. package/lib/module/utils/index.js +6 -37
  152. package/lib/module/utils/index.js.map +1 -1
  153. package/lib/typescript/components/PayEngine.d.ts +1 -14
  154. package/lib/typescript/components/v2/ApplePay/PEApplePayButton.d.ts +12 -0
  155. package/lib/typescript/components/v2/ApplePay/PEPaymentRequest.d.ts +12 -0
  156. package/lib/typescript/components/v2/PayEngineNative.d.ts +5 -0
  157. package/lib/typescript/components/v2/PayEngineProvider.d.ts +8 -0
  158. package/lib/typescript/components/v2/SecureFields/BankAccountView.d.ts +14 -0
  159. package/lib/typescript/components/v2/SecureFields/CreditCardView.d.ts +14 -0
  160. package/lib/typescript/components/v2/SecureFields/IPEField.d.ts +10 -0
  161. package/lib/typescript/components/v2/SecureFields/PEBankAccount.d.ts +11 -0
  162. package/lib/typescript/components/v2/SecureFields/PECard.d.ts +13 -0
  163. package/lib/typescript/components/v2/SecureFields/PEKeyboardType.d.ts +7 -0
  164. package/lib/typescript/index.d.ts +12 -6
  165. package/lib/typescript/interfaces/index.d.ts +0 -27
  166. package/lib/typescript/utils/index.d.ts +3 -36
  167. package/package.json +12 -7
  168. package/react-native-payengine.podspec +2 -2
  169. package/src/components/PayEngine.tsx +5 -118
  170. package/src/components/v2/ApplePay/PEApplePayButton.tsx +70 -0
  171. package/src/components/v2/ApplePay/PEPaymentRequest.ts +18 -0
  172. package/src/components/v2/PayEngineNative.tsx +20 -0
  173. package/src/components/v2/PayEngineProvider.tsx +30 -0
  174. package/src/components/v2/SecureFields/BankAccountView.tsx +95 -0
  175. package/src/components/v2/SecureFields/CreditCardView.tsx +96 -0
  176. package/src/components/v2/SecureFields/IPEField.ts +12 -0
  177. package/src/components/v2/SecureFields/PEBankAccount.ts +12 -0
  178. package/src/components/v2/SecureFields/PECard.ts +14 -0
  179. package/src/components/v2/SecureFields/PEKeyboardType.ts +8 -0
  180. package/src/index.tsx +47 -22
  181. package/src/interfaces/index.ts +0 -32
  182. package/src/utils/index.ts +8 -36
  183. package/android/.gradle/5.6.4/executionHistory/executionHistory.bin +0 -0
  184. package/android/.gradle/5.6.4/executionHistory/executionHistory.lock +0 -0
  185. package/android/.gradle/5.6.4/fileContent/fileContent.lock +0 -0
  186. package/android/.gradle/5.6.4/fileHashes/fileHashes.bin +0 -0
  187. package/android/.gradle/5.6.4/fileHashes/fileHashes.lock +0 -0
  188. package/android/.gradle/5.6.4/javaCompile/classAnalysis.bin +0 -0
  189. package/android/.gradle/5.6.4/javaCompile/jarAnalysis.bin +0 -0
  190. package/android/.gradle/5.6.4/javaCompile/javaCompile.lock +0 -0
  191. package/android/.gradle/5.6.4/javaCompile/taskHistory.bin +0 -0
  192. package/android/src/main/java/com/reactnativepayengine/collect/VGSCollectModule.java +0 -153
  193. package/android/src/main/java/com/reactnativepayengine/collect/VGSCollectOnCreateViewInstanceListener.java +0 -6
  194. package/android/src/main/java/com/reactnativepayengine/collect/fields/VGSCVCField.java +0 -67
  195. package/android/src/main/java/com/reactnativepayengine/collect/fields/VGSCardHolderNameField.java +0 -53
  196. package/android/src/main/java/com/reactnativepayengine/collect/fields/VGSCardNumberField.java +0 -57
  197. package/android/src/main/java/com/reactnativepayengine/collect/fields/VGSExpDateField.java +0 -54
  198. package/android/src/main/java/com/reactnativepayengine/collect/fields/VGSTextField.java +0 -57
  199. package/android/src/main/java/com/reactnativepayengine/collect/fields/VGSZipCodeField.java +0 -62
  200. package/android/src/main/java/com/reactnativepayengine/util/ResourceUtil.java +0 -14
  201. package/ios/Payengine.m +0 -72
  202. package/ios/Payengine.swift +0 -720
  203. package/lib/commonjs/components/ApplePay/PayEngineApplePay.js +0 -71
  204. package/lib/commonjs/components/ApplePay/PayEngineApplePay.js.map +0 -1
  205. package/lib/commonjs/components/ApplePay/index.js +0 -46
  206. package/lib/commonjs/components/ApplePay/index.js.map +0 -1
  207. package/lib/commonjs/components/ApplePay/interfaces.js +0 -2
  208. package/lib/commonjs/components/ApplePay/interfaces.js.map +0 -1
  209. package/lib/commonjs/components/CreditCardForm/index.js +0 -76
  210. package/lib/commonjs/components/CreditCardForm/index.js.map +0 -1
  211. package/lib/commonjs/components/GooglePay/PayEngineGooglePay.js +0 -65
  212. package/lib/commonjs/components/GooglePay/PayEngineGooglePay.js.map +0 -1
  213. package/lib/commonjs/components/GooglePay/index.js +0 -40
  214. package/lib/commonjs/components/GooglePay/index.js.map +0 -1
  215. package/lib/commonjs/components/GooglePay/interfaces.js +0 -2
  216. package/lib/commonjs/components/GooglePay/interfaces.js.map +0 -1
  217. package/lib/commonjs/components/Legacy/CreditCardFormLegacy.js +0 -323
  218. package/lib/commonjs/components/Legacy/CreditCardFormLegacy.js.map +0 -1
  219. package/lib/commonjs/components/SecureFields/VGS/CVCField.js +0 -26
  220. package/lib/commonjs/components/SecureFields/VGS/CVCField.js.map +0 -1
  221. package/lib/commonjs/components/SecureFields/VGS/CardHolderNameField.js +0 -26
  222. package/lib/commonjs/components/SecureFields/VGS/CardHolderNameField.js.map +0 -1
  223. package/lib/commonjs/components/SecureFields/VGS/CardNumberField.js +0 -26
  224. package/lib/commonjs/components/SecureFields/VGS/CardNumberField.js.map +0 -1
  225. package/lib/commonjs/components/SecureFields/VGS/CollectManager.js +0 -60
  226. package/lib/commonjs/components/SecureFields/VGS/CollectManager.js.map +0 -1
  227. package/lib/commonjs/components/SecureFields/VGS/ExpDateField.js.map +0 -1
  228. package/lib/commonjs/components/SecureFields/VGS/TextField.js.map +0 -1
  229. package/lib/commonjs/components/SecureFields/VGS/ZipCodeField.js +0 -26
  230. package/lib/commonjs/components/SecureFields/VGS/ZipCodeField.js.map +0 -1
  231. package/lib/commonjs/components/SecureFields/index.js +0 -34
  232. package/lib/commonjs/components/SecureFields/index.js.map +0 -1
  233. package/lib/module/components/ApplePay/PayEngineApplePay.js +0 -58
  234. package/lib/module/components/ApplePay/PayEngineApplePay.js.map +0 -1
  235. package/lib/module/components/ApplePay/index.js +0 -35
  236. package/lib/module/components/ApplePay/index.js.map +0 -1
  237. package/lib/module/components/ApplePay/interfaces.js +0 -2
  238. package/lib/module/components/ApplePay/interfaces.js.map +0 -1
  239. package/lib/module/components/CreditCardForm/index.js +0 -60
  240. package/lib/module/components/CreditCardForm/index.js.map +0 -1
  241. package/lib/module/components/GooglePay/PayEngineGooglePay.js +0 -52
  242. package/lib/module/components/GooglePay/PayEngineGooglePay.js.map +0 -1
  243. package/lib/module/components/GooglePay/index.js +0 -29
  244. package/lib/module/components/GooglePay/index.js.map +0 -1
  245. package/lib/module/components/GooglePay/interfaces.js +0 -2
  246. package/lib/module/components/GooglePay/interfaces.js.map +0 -1
  247. package/lib/module/components/Legacy/CreditCardFormLegacy.js +0 -302
  248. package/lib/module/components/Legacy/CreditCardFormLegacy.js.map +0 -1
  249. package/lib/module/components/SecureFields/VGS/CVCField.js +0 -14
  250. package/lib/module/components/SecureFields/VGS/CVCField.js.map +0 -1
  251. package/lib/module/components/SecureFields/VGS/CardHolderNameField.js +0 -14
  252. package/lib/module/components/SecureFields/VGS/CardHolderNameField.js.map +0 -1
  253. package/lib/module/components/SecureFields/VGS/CardNumberField.js +0 -14
  254. package/lib/module/components/SecureFields/VGS/CardNumberField.js.map +0 -1
  255. package/lib/module/components/SecureFields/VGS/CollectManager.js +0 -45
  256. package/lib/module/components/SecureFields/VGS/CollectManager.js.map +0 -1
  257. package/lib/module/components/SecureFields/VGS/ExpDateField.js +0 -14
  258. package/lib/module/components/SecureFields/VGS/ExpDateField.js.map +0 -1
  259. package/lib/module/components/SecureFields/VGS/TextField.js +0 -17
  260. package/lib/module/components/SecureFields/VGS/TextField.js.map +0 -1
  261. package/lib/module/components/SecureFields/VGS/ZipCodeField.js +0 -14
  262. package/lib/module/components/SecureFields/VGS/ZipCodeField.js.map +0 -1
  263. package/lib/module/components/SecureFields/index.js +0 -17
  264. package/lib/module/components/SecureFields/index.js.map +0 -1
  265. package/lib/typescript/components/ApplePay/PayEngineApplePay.d.ts +0 -12
  266. package/lib/typescript/components/ApplePay/index.d.ts +0 -7
  267. package/lib/typescript/components/ApplePay/interfaces.d.ts +0 -20
  268. package/lib/typescript/components/CreditCardForm/index.d.ts +0 -3
  269. package/lib/typescript/components/GooglePay/PayEngineGooglePay.d.ts +0 -10
  270. package/lib/typescript/components/GooglePay/index.d.ts +0 -7
  271. package/lib/typescript/components/GooglePay/interfaces.d.ts +0 -38
  272. package/lib/typescript/components/Legacy/CreditCardFormLegacy.d.ts +0 -4
  273. package/lib/typescript/components/SecureFields/VGS/CVCField.d.ts +0 -10
  274. package/lib/typescript/components/SecureFields/VGS/CardHolderNameField.d.ts +0 -10
  275. package/lib/typescript/components/SecureFields/VGS/CardNumberField.d.ts +0 -10
  276. package/lib/typescript/components/SecureFields/VGS/CollectManager.d.ts +0 -12
  277. package/lib/typescript/components/SecureFields/VGS/ExpDateField.d.ts +0 -10
  278. package/lib/typescript/components/SecureFields/VGS/TextField.d.ts +0 -14
  279. package/lib/typescript/components/SecureFields/VGS/ZipCodeField.d.ts +0 -10
  280. package/lib/typescript/components/SecureFields/index.d.ts +0 -16
  281. package/src/components/ApplePay/PayEngineApplePay.ts +0 -61
  282. package/src/components/ApplePay/index.ts +0 -32
  283. package/src/components/ApplePay/interfaces.ts +0 -25
  284. package/src/components/CreditCardForm/index.tsx +0 -43
  285. package/src/components/GooglePay/PayEngineGooglePay.ts +0 -48
  286. package/src/components/GooglePay/index.ts +0 -39
  287. package/src/components/GooglePay/interfaces.ts +0 -42
  288. package/src/components/Legacy/CreditCardFormLegacy.tsx +0 -292
  289. package/src/components/SecureFields/VGS/CVCField.tsx +0 -21
  290. package/src/components/SecureFields/VGS/CardHolderNameField.tsx +0 -21
  291. package/src/components/SecureFields/VGS/CardNumberField.tsx +0 -21
  292. package/src/components/SecureFields/VGS/CollectManager.tsx +0 -74
  293. package/src/components/SecureFields/VGS/ExpDateField.tsx +0 -21
  294. package/src/components/SecureFields/VGS/TextField.tsx +0 -27
  295. package/src/components/SecureFields/VGS/ZipCodeField.tsx +0 -21
  296. package/src/components/SecureFields/index.ts +0 -17
  297. /package/android/.gradle/{5.6.4 → 6.1.1}/fileChanges/last-build.bin +0 -0
  298. /package/android/.gradle/{5.6.4 → 6.1.1}/gc.properties +0 -0
  299. /package/android/{vgscollect-1.7.2-debug.aar → securefields-1.7.2-debug.aar} +0 -0
  300. /package/ios/{Payengine-Bridging-Header.h → Sources/Payengine-Bridging-Header.h} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","requireNativeComponent","NativeModules","NativeEventEmitter","findNodeHandle","UIManager","ActivityIndicator","Platform","RNPEEventEmitter","COMPONENT_NAME","RNPEBankAccountView","RNPEBankAccountViewManager","peEventEmitter","PEBankAccountView","forwardRef","props","ref","formRef","useRef","height","setHeight","useState","useImperativeHandle","submit","merchantId","additionalData","Promise","resolve","reject","Error","listener","addListener","args","remove","error","bankAccount","json","JSON","parse","callNativeMethod","showKeyboard","hideKeyboard","useCallback","methodName","params","viewId","current","commandId","Commands","toString","OS","Number","dispatchViewManagerCommand","useEffect","eventListener","width","_","frameHeight","stringify","additionalFields"],"sources":["BankAccountView.tsx"],"sourcesContent":["\nimport * as React from 'react';\nimport { requireNativeComponent, NativeModules, NativeEventEmitter, ViewProps, findNodeHandle, UIManager, ActivityIndicator, Platform } from 'react-native';\nimport type IPEField from './IPEField';\nimport type PEBankAccount from './PEBankAccount';\n\nconst { RNPEEventEmitter } = NativeModules;\n\ninterface NativePEBankAccountViewProps extends ViewProps {\n additionalFields: string;\n}\n\nconst COMPONENT_NAME = 'RNPEBankAccountView'\nconst RNPEBankAccountView = requireNativeComponent<NativePEBankAccountViewProps>(COMPONENT_NAME);\n// @ts-ignore\nconst RNPEBankAccountViewManager = UIManager[COMPONENT_NAME]\n\nconst peEventEmitter = new NativeEventEmitter(RNPEEventEmitter);\n\nexport interface PEBankAccountViewProps {\n additionalFields?: IPEField[];\n}\n\nexport interface PEBankAccountViewMethods {\n submit: (merchantId: string, additionalData: { [key: string]: string }) => Promise<PEBankAccount>;\n showKeyboard: () => void;\n hideKeyboard: () => void;\n}\n\nexport const PEBankAccountView = React.forwardRef<\n PEBankAccountViewMethods,\n PEBankAccountViewProps\n>((props, ref) => {\n const formRef = React.useRef<any>();\n const [height, setHeight] = React.useState(0);\n\n React.useImperativeHandle(ref, () => ({\n submit: async (merchantId: string, additionalData: any = {}) => {\n return new Promise((resolve, reject) => {\n if (height === 0) {\n return reject(new Error('Form is not ready'))\n }\n \n const listener = peEventEmitter.addListener('onBankAccountRespond', args => {\n listener.remove()\n\n const { error, bankAccount: json } = args;\n if (error) {\n reject(new Error(error))\n } else {\n const bankAccount = JSON.parse(json) as PEBankAccount;\n resolve(bankAccount)\n }\n });\n\n callNativeMethod(\"submit\", [merchantId, additionalData],)\n });\n },\n showKeyboard: () => {\n callNativeMethod(\"showKeyboard\")\n },\n hideKeyboard: () => {\n callNativeMethod(\"hideKeyboard\")\n }\n }));\n\n const callNativeMethod = React.useCallback((methodName: string, params: any[] = []) => {\n const viewId = findNodeHandle(formRef.current);\n let commandId = RNPEBankAccountViewManager.Commands[methodName].toString()\n if (Platform.OS === 'ios') {\n commandId = Number(commandId)\n }\n UIManager.dispatchViewManagerCommand(\n viewId,\n commandId,\n params,\n );\n }, [formRef.current])\n\n\n React.useEffect(() => {\n const eventListener = peEventEmitter.addListener('onSizeChanges', args => {\n const { width: _, height: frameHeight } = args;\n setHeight(frameHeight);\n });\n return () => eventListener.remove();\n }, []);\n\n return (\n <>\n {height === 0 && <ActivityIndicator />}\n <RNPEBankAccountView ref={formRef} additionalFields={JSON.stringify(props.additionalFields ?? [])} style={{ height: height }} />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AAb;EACD,CAND,EAMG,EANH;EAQA,oBACE,0CACGd,MAAM,KAAK,CAAX,iBAAgB,oBAAC,iBAAD,OADnB,eAEE,oBAAC,mBAAD;IAAqB,GAAG,EAAEF,OAA1B;IAAmC,gBAAgB,EAAEoB,IAAI,CAACqB,SAAL,CAAe3C,KAAK,CAAC4C,gBAAN,IAA0B,EAAzC,CAArD;IAAmG,KAAK,EAAE;MAAExC,MAAM,EAAEA;IAAV;EAA1G,EAFF,CADF;AAMD,CAjEgC,CAA1B"}
@@ -0,0 +1,76 @@
1
+ import * as React from 'react';
2
+ import { requireNativeComponent, NativeModules, NativeEventEmitter, Platform, findNodeHandle, UIManager, ActivityIndicator } from 'react-native';
3
+ const {
4
+ RNPEEventEmitter
5
+ } = NativeModules;
6
+ const COMPONENT_NAME = 'RNPECreditCardView';
7
+ const RNPECreditCardView = requireNativeComponent(COMPONENT_NAME); // @ts-ignore
8
+
9
+ const RNPECreditCardViewManager = UIManager[COMPONENT_NAME];
10
+ const peEventEmitter = new NativeEventEmitter(RNPEEventEmitter);
11
+ export const PECreditCardView = /*#__PURE__*/React.forwardRef((props, ref) => {
12
+ const formRef = React.useRef();
13
+ const [height, setHeight] = React.useState(0);
14
+ React.useImperativeHandle(ref, () => ({
15
+ submit: async function (merchantId) {
16
+ let additionalData = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
17
+ return new Promise((resolve, reject) => {
18
+ if (height === 0) {
19
+ return reject(new Error('Form is not ready'));
20
+ }
21
+
22
+ const listener = peEventEmitter.addListener('onCardRespond', args => {
23
+ listener.remove();
24
+ const {
25
+ error,
26
+ card: json
27
+ } = args;
28
+
29
+ if (error) {
30
+ reject(new Error(error));
31
+ } else {
32
+ const card = JSON.parse(json);
33
+ resolve(card);
34
+ }
35
+ });
36
+ callNativeMethod("submit", [merchantId, additionalData]);
37
+ });
38
+ },
39
+ showKeyboard: () => {
40
+ callNativeMethod("showKeyboard");
41
+ },
42
+ hideKeyboard: () => {
43
+ callNativeMethod("hideKeyboard");
44
+ }
45
+ }));
46
+ const callNativeMethod = React.useCallback(function (methodName) {
47
+ let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
48
+ console.log("callNativeMethod", methodName, params);
49
+ const viewId = findNodeHandle(formRef.current);
50
+ let commandId = RNPECreditCardViewManager.Commands[methodName].toString();
51
+
52
+ if (Platform.OS === 'ios') {
53
+ commandId = Number(commandId);
54
+ }
55
+
56
+ UIManager.dispatchViewManagerCommand(viewId, commandId, params);
57
+ }, [formRef.current]);
58
+ React.useEffect(() => {
59
+ const eventListener = peEventEmitter.addListener('onSizeChanges', args => {
60
+ const {
61
+ width: _,
62
+ height: frameHeight
63
+ } = args;
64
+ setHeight(frameHeight);
65
+ });
66
+ return () => eventListener.remove();
67
+ }, []);
68
+ return /*#__PURE__*/React.createElement(React.Fragment, null, height === 0 && /*#__PURE__*/React.createElement(ActivityIndicator, null), /*#__PURE__*/React.createElement(RNPECreditCardView, {
69
+ ref: formRef,
70
+ additionalFields: JSON.stringify(props.additionalFields ?? []),
71
+ style: {
72
+ height: height
73
+ }
74
+ }));
75
+ });
76
+ //# sourceMappingURL=CreditCardView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","requireNativeComponent","NativeModules","NativeEventEmitter","Platform","findNodeHandle","UIManager","ActivityIndicator","RNPEEventEmitter","COMPONENT_NAME","RNPECreditCardView","RNPECreditCardViewManager","peEventEmitter","PECreditCardView","forwardRef","props","ref","formRef","useRef","height","setHeight","useState","useImperativeHandle","submit","merchantId","additionalData","Promise","resolve","reject","Error","listener","addListener","args","remove","error","card","json","JSON","parse","callNativeMethod","showKeyboard","hideKeyboard","useCallback","methodName","params","console","log","viewId","current","commandId","Commands","toString","OS","Number","dispatchViewManagerCommand","useEffect","eventListener","width","_","frameHeight","stringify","additionalFields"],"sources":["CreditCardView.tsx"],"sourcesContent":["\nimport * as React from 'react';\nimport { requireNativeComponent, NativeModules, NativeEventEmitter, ViewProps, Platform, findNodeHandle, UIManager, ActivityIndicator } from 'react-native';\nimport type IPEField from './IPEField';\nimport type PECard from './PECard';\n\nconst { RNPEEventEmitter } = NativeModules;\n\ninterface NativePECreditCardViewProps extends ViewProps {\n additionalFields: string;\n}\n\nconst COMPONENT_NAME = 'RNPECreditCardView'\nconst RNPECreditCardView = requireNativeComponent<NativePECreditCardViewProps>(COMPONENT_NAME);\n// @ts-ignore\nconst RNPECreditCardViewManager = UIManager[COMPONENT_NAME]\nconst peEventEmitter = new NativeEventEmitter(RNPEEventEmitter);\n\nexport interface PECreditCardViewProps {\n additionalFields?: IPEField[];\n}\n\nexport interface PECreditCardViewMethods {\n submit: (merchantId: string, additionalData: { [key: string]: string }) => Promise<PECard>;\n showKeyboard: () => void;\n hideKeyboard: () => void;\n}\n\nexport const PECreditCardView = React.forwardRef<\n PECreditCardViewMethods,\n PECreditCardViewProps\n>((props, ref) => {\n const formRef = React.useRef<any>();\n const [height, setHeight] = React.useState(0);\n\n React.useImperativeHandle(ref, () => ({\n submit: async (merchantId: string, additionalData: any = {}) => {\n return new Promise((resolve, reject) => {\n if (height === 0) {\n return reject(new Error('Form is not ready'))\n }\n\n const listener = peEventEmitter.addListener('onCardRespond', args => {\n listener.remove()\n\n const { error, card: json } = args;\n if (error) {\n reject(new Error(error))\n } else {\n const card = JSON.parse(json) as PECard;\n resolve(card)\n }\n });\n\n callNativeMethod(\"submit\", [merchantId, additionalData])\n });\n },\n showKeyboard: () => {\n callNativeMethod(\"showKeyboard\")\n },\n hideKeyboard: () => {\n callNativeMethod(\"hideKeyboard\")\n }\n }));\n\n const callNativeMethod = React.useCallback((methodName: string, params: any[] = []) => {\n console.log(\"callNativeMethod\", methodName, params)\n const viewId = findNodeHandle(formRef.current);\n let commandId = RNPECreditCardViewManager.Commands[methodName].toString()\n if (Platform.OS === 'ios') {\n commandId = Number(commandId)\n }\n UIManager.dispatchViewManagerCommand(\n viewId,\n commandId,\n params,\n );\n }, [formRef.current])\n\n React.useEffect(() => {\n const eventListener = peEventEmitter.addListener('onSizeChanges', args => {\n const { width: _, height: frameHeight } = args;\n setHeight(frameHeight);\n });\n\n return () => eventListener.remove();\n }, []);\n\n\n return (\n <>\n {height === 0 && <ActivityIndicator />}\n <RNPECreditCardView ref={formRef} additionalFields={JSON.stringify(props.additionalFields ?? [])} style={{ height: height }} />\n </>\n );\n});\n"],"mappings":"AACA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,sBAAT,EAAiCC,aAAjC,EAAgDC,kBAAhD,EAA+EC,QAA/E,EAAyFC,cAAzF,EAAyGC,SAAzG,EAAoHC,iBAApH,QAA6I,cAA7I;AAIA,MAAM;EAAEC;AAAF,IAAuBN,aAA7B;AAMA,MAAMO,cAAc,GAAG,oBAAvB;AACA,MAAMC,kBAAkB,GAAGT,sBAAsB,CAA8BQ,cAA9B,CAAjD,C,CACA;;AACA,MAAME,yBAAyB,GAAGL,SAAS,CAACG,cAAD,CAA3C;AACA,MAAMG,cAAc,GAAG,IAAIT,kBAAJ,CAAuBK,gBAAvB,CAAvB;AAYA,OAAO,MAAMK,gBAAgB,gBAAGb,KAAK,CAACc,UAAN,CAG9B,CAACC,KAAD,EAAQC,GAAR,KAAgB;EAChB,MAAMC,OAAO,GAAGjB,KAAK,CAACkB,MAAN,EAAhB;EACA,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsBpB,KAAK,CAACqB,QAAN,CAAe,CAAf,CAA5B;EAEArB,KAAK,CAACsB,mBAAN,CAA0BN,GAA1B,EAA+B,OAAO;IACpCO,MAAM,EAAE,gBAAOC,UAAP,EAAwD;MAAA,IAA7BC,cAA6B,uEAAP,EAAO;MAC9D,OAAO,IAAIC,OAAJ,CAAY,CAACC,OAAD,EAAUC,MAAV,KAAqB;QACtC,IAAIT,MAAM,KAAK,CAAf,EAAkB;UAChB,OAAOS,MAAM,CAAC,IAAIC,KAAJ,CAAU,mBAAV,CAAD,CAAb;QACD;;QAED,MAAMC,QAAQ,GAAGlB,cAAc,CAACmB,WAA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AAM;IACpB,MAAMC,aAAa,GAAG5C,cAAc,CAACmB,WAAf,CAA2B,eAA3B,EAA4CC,IAAI,IAAI;MACxE,MAAM;QAAEyB,KAAK,EAAEC,CAAT;QAAYvC,MAAM,EAAEwC;MAApB,IAAoC3B,IAA1C;MACAZ,SAAS,CAACuC,WAAD,CAAT;IACD,CAHqB,CAAtB;IAKA,OAAO,MAAMH,aAAa,CAACvB,MAAd,EAAb;EACD,CAPD,EAOG,EAPH;EAUA,oBACE,0CACGd,MAAM,KAAK,CAAX,iBAAgB,oBAAC,iBAAD,OADnB,eAEE,oBAAC,kBAAD;IAAoB,GAAG,EAAEF,OAAzB;IAAkC,gBAAgB,EAAEoB,IAAI,CAACuB,SAAL,CAAe7C,KAAK,CAAC8C,gBAAN,IAA0B,EAAzC,CAApD;IAAkG,KAAK,EAAE;MAAE1C,MAAM,EAAEA;IAAV;EAAzG,EAFF,CADF;AAMD,CAnE+B,CAAzB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IPEField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["IPEField.ts"],"sourcesContent":["import type PEKeyboardType from \"./PEKeyboardType\";\n\ninterface IPEField {\n name: string;\n type: string;\n placeholder: string;\n keyboardType: PEKeyboardType;\n isRequired: boolean;\n pattern?: string;\n}\n\nexport default IPEField;\n"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=PEBankAccount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["PEBankAccount.ts"],"sourcesContent":["interface PEBankAccount {\n id: string;\n token: string;\n account_data: {\n first_name: string;\n last_name: string;\n routing_number: string;\n last_4: string;\n };\n}\n\nexport default PEBankAccount;"],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=PECard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["PECard.ts"],"sourcesContent":["interface PECard {\n token: string;\n card_data: {\n id: string;\n brand: string;\n last_4: string;\n exp_year: string;\n exp_month: string;\n name: string;\n address_zip?: string;\n };\n}\n\nexport default PECard;"],"mappings":""}
@@ -0,0 +1,11 @@
1
+ var PEKeyboardType;
2
+
3
+ (function (PEKeyboardType) {
4
+ PEKeyboardType["alphabet"] = "alphabet";
5
+ PEKeyboardType["number"] = "number";
6
+ PEKeyboardType["phone"] = "phone";
7
+ PEKeyboardType["normal"] = "normal";
8
+ })(PEKeyboardType || (PEKeyboardType = {}));
9
+
10
+ export default PEKeyboardType;
11
+ //# sourceMappingURL=PEKeyboardType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PEKeyboardType"],"sources":["PEKeyboardType.ts"],"sourcesContent":["enum PEKeyboardType {\n alphabet = 'alphabet',\n number = 'number',\n phone = 'phone',\n normal = 'normal',\n}\n\nexport default PEKeyboardType;\n"],"mappings":"IAAKA,c;;WAAAA,c;EAAAA,c;EAAAA,c;EAAAA,c;EAAAA,c;GAAAA,c,KAAAA,c;;AAOL,eAAeA,cAAf"}
@@ -1,10 +1,13 @@
1
1
  import PayEngine from './components/PayEngine';
2
2
  import { NativeModules, Platform } from 'react-native';
3
- import { SecureFields } from './components/SecureFields/index';
4
- import { CreditCardForm } from './components/CreditCardForm/index';
5
- import CreditCardFormLegacy from './components/Legacy/CreditCardFormLegacy';
6
- import { PayEngineGooglePay } from './components/GooglePay/PayEngineGooglePay';
7
- import { PayEngineApplePay } from './components/ApplePay/PayEngineApplePay';
3
+ import { PECreditCardView, PECreditCardViewMethods } from './components/v2/SecureFields/CreditCardView';
4
+ import { PEBankAccountView, PEBankAccountViewMethods } from './components/v2/SecureFields/BankAccountView';
5
+ import { PayEngineProvider } from './components/v2/PayEngineProvider';
6
+ import PayEngineNative from './components/v2/PayEngineNative';
7
+ import { PEApplePayButton } from './components/v2/ApplePay/PEApplePayButton';
8
+ import { PEPaymentRequest } from './components/v2/ApplePay/PEPaymentRequest';
9
+ import * as PayEngineUtils from './utils/index';
10
+ import PEKeyboardType from './components/v2/SecureFields/PEKeyboardType';
8
11
  const LINKING_ERROR = `The package 'react-native-payengine' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
9
12
  ios: "- You have run 'pod install'\n",
10
13
  default: ''
@@ -15,5 +18,10 @@ const PayEngineStatic = NativeModules.Payengine ? NativeModules.Payengine : new
15
18
  }
16
19
 
17
20
  });
18
- export { PayEngineStatic, PayEngine, SecureFields, CreditCardForm, CreditCardFormLegacy, PayEngineGooglePay, PayEngineApplePay };
21
+ export { PayEngineStatic, PayEngine, // v2 starting here
22
+ PayEngineUtils, PayEngineProvider, PayEngineNative, // securefields
23
+ PEKeyboardType, // credit card
24
+ PECreditCardView, PECreditCardViewMethods, // bank account
25
+ PEBankAccountView, PEBankAccountViewMethods, // Apple Pay
26
+ PEApplePayButton, PEPaymentRequest };
19
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["PayEngine","NativeModules","Platform","SecureFields","CreditCardForm","CreditCardFormLegacy","PayEngineGooglePay","PayEngineApplePay","LINKING_ERROR","select","ios","default","PayEngineStatic","Payengine","Proxy","get","Error"],"sources":["index.tsx"],"sourcesContent":["import PayEngine from './components/PayEngine'\nimport { NativeModules, Platform } from 'react-native';\nimport { SecureFields } from './components/SecureFields/index';\nimport { CreditCardForm } from './components/CreditCardForm/index';\nimport CreditCardFormLegacy from './components/Legacy/CreditCardFormLegacy';\nimport type { IPayEngineConfig } from './interfaces/index';\nimport { PayEngineGooglePay } from './components/GooglePay/PayEngineGooglePay';\nimport { PayEngineApplePay } from './components/ApplePay/PayEngineApplePay';\n\nconst LINKING_ERROR =\n `The package 'react-native-payengine' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo managed workflow\\n';\n\nconst PayEngineStatic = NativeModules.Payengine ? NativeModules.Payengine : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n);\n\n\nexport {\n PayEngineStatic,\n PayEngine,\n SecureFields,\n CreditCardForm,\n CreditCardFormLegacy,\n IPayEngineConfig,\n PayEngineGooglePay,\n PayEngineApplePay\n}\n\n\n"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,wBAAtB;AACA,SAASC,aAAT,EAAwBC,QAAxB,QAAwC,cAAxC;AACA,SAASC,YAAT,QAA6B,iCAA7B;AACA,SAASC,cAAT,QAA+B,mCAA/B;AACA,OAAOC,oBAAP,MAAiC,0CAAjC;AAEA,SAASC,kBAAT,QAAmC,2CAAnC;AACA,SAASC,iBAAT,QAAkC,yCAAlC;AAEA,MAAMC,aAAa,GAChB,iFAAD,GACAN,QAAQ,CAACO,MAAT,CAAgB;EAAEC,GAAG,EAAE,gCAAP;EAAyCC,OAAO,EAAE;AAAlD,CAAhB,CADA,GAEA,sDAFA,GAGA,6CAJF;AAMA,MAAMC,eAAe,GAAGX,aAAa,CAACY,SAAd,GAA0BZ,aAAa,CAACY,SAAxC,GAAoD,IAAIC,KAAJ,CAC1E,EAD0E,EAE1E;EACEC,GAAG,GAAG;IACJ,MAAM,IAAIC,KAAJ,CAAUR,aAAV,CAAN;EACD;;AAHH,CAF0E,CAA5E;AAUA,SACEI,eADF,EAEEZ,SAFF,EAGEG,YAHF,EAIEC,cAJF,EAKEC,oBALF,EAOEC,kBAPF,EAQEC,iBARF"}
1
+ {"version":3,"names":["PayEngine","NativeModules","Platform","PECreditCardView","PECreditCardViewMethods","PEBankAccountView","PEBankAccountViewMethods","PayEngineProvider","PayEngineNative","PEApplePayButton","PEPaymentRequest","PayEngineUtils","PEKeyboardType","LINKING_ERROR","select","ios","default","PayEngineStatic","Payengine","Proxy","get","Error"],"sources":["index.tsx"],"sourcesContent":["import PayEngine from './components/PayEngine';\nimport { NativeModules, Platform } from 'react-native';\nimport type { IPayEngineConfig } from './interfaces/index';\nimport {\n PECreditCardView,\n PECreditCardViewMethods,\n} from './components/v2/SecureFields/CreditCardView';\nimport {\n PEBankAccountView,\n PEBankAccountViewMethods,\n} from './components/v2/SecureFields/BankAccountView';\nimport type IPEField from './components/v2/SecureFields/IPEField';\nimport type PECard from './components/v2/SecureFields/PECard';\nimport type PEBankAccount from './components/v2/SecureFields/PEBankAccount';\nimport { PayEngineProvider } from './components/v2/PayEngineProvider';\nimport PayEngineNative from './components/v2/PayEngineNative';\nimport { PEApplePayButton } from './components/v2/ApplePay/PEApplePayButton';\nimport { PEPaymentRequest } from './components/v2/ApplePay/PEPaymentRequest';\nimport * as PayEngineUtils from './utils/index';\nimport PEKeyboardType from './components/v2/SecureFields/PEKeyboardType';\n\nconst LINKING_ERROR =\n `The package 'react-native-payengine' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo managed workflow\\n';\n\nconst PayEngineStatic = NativeModules.Payengine\n ? NativeModules.Payengine\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nexport {\n PayEngineStatic,\n PayEngine,\n IPayEngineConfig,\n\n // v2 starting here\n PayEngineUtils,\n PayEngineProvider,\n PayEngineNative,\n // securefields\n PEKeyboardType,\n IPEField,\n // credit card\n PECreditCardView,\n PECreditCardViewMethods,\n PECard,\n // bank account\n PEBankAccountView,\n PEBankAccountViewMethods,\n PEBankAccount,\n // Apple Pay\n PEApplePayButton,\n PEPaymentRequest,\n};\n"],"mappings":"AAAA,OAAOA,SAAP,MAAsB,wBAAtB;AACA,SAASC,aAAT,EAAwBC,QAAxB,QAAwC,cAAxC;AAEA,SACEC,gBADF,EAEEC,uBAFF,QAGO,6CAHP;AAIA,SACEC,iBADF,EAEEC,wBAFF,QAGO,8CAHP;AAOA,SAASC,iBAAT,QAAkC,mCAAlC;AACA,OAAOC,eAAP,MAA4B,iCAA5B;AACA,SAASC,gBAAT,QAAiC,2CAAjC;AACA,SAASC,gBAAT,QAAiC,2CAAjC;AACA,OAAO,KAAKC,cAAZ,MAAgC,eAAhC;AACA,OAAOC,cAAP,MAA2B,6CAA3B;AAEA,MAAMC,aAAa,GAChB,iFAAD,GACAX,QAAQ,CAACY,MAAT,CAAgB;EAAEC,GAAG,EAAE,gCAAP;EAAyCC,OAAO,EAAE;AAAlD,CAAhB,CADA,GAEA,sDAFA,GAGA,6CAJF;AAMA,MAAMC,eAAe,GAAGhB,aAAa,CAACiB,SAAd,GACpBjB,aAAa,CAACiB,SADM,GAEpB,IAAIC,KAAJ,CACE,EADF,EAEE;EACEC,GAAG,GAAG;IACJ,MAAM,IAAIC,KAAJ,CAAUR,aAAV,CAAN;EACD;;AAHH,CAFF,CAFJ;AAWA,SACEI,eADF,EAEEjB,SAFF,EAKE;AACAW,cANF,EAOEJ,iBAPF,EAQEC,eARF,EASE;AACAI,cAVF,EAYE;AACAT,gBAbF,EAcEC,uBAdF,EAgBE;AACAC,iBAjBF,EAkBEC,wBAlBF,EAoBE;AACAG,gBArBF,EAsBEC,gBAtBF"}
@@ -1,2 +1,2 @@
1
- export {};
1
+
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["import type { StyleProp, ViewStyle } from 'react-native';\nimport type { GooglePayRequestData } from '../components/GooglePay/interfaces';\n\nexport interface IPayEngineConfig {\n publicKey: string;\n version?: string;\n scriptURL?: string;\n logLevel?: number;\n}\n\nexport interface CreditCardFormProps {\n style?: StyleProp<ViewStyle>;\n merchantId?: string;\n showZipCode?: boolean;\n config: IPayEngineConfig;\n}\n\nexport interface CreditCardFormMethods {\n createCard: (merchantId?: string) => Promise<any>;\n}\n\nexport interface MobilePaymentConfig {\n base_url: string;\n country: string;\n currency: string;\n gateway: string; // nmi | converge\n google_pay: GooglePayRequestData;\n apple_pay: {\n merchantName: string;\n supportedCardNetworks: string[];\n };\n}\n\nexport interface PaymentRequest {\n amount: number;\n currencyCode?: string;\n countryCode?: string;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export interface IPayEngineConfig {\n publicKey: string;\n version?: string;\n scriptURL?: string;\n logLevel?: number;\n}\n"],"mappings":""}
@@ -1,4 +1,10 @@
1
1
  import axios from 'axios';
2
+ export class PEDeprecationError extends Error {
3
+ constructor() {
4
+ super('This method is obsolete and can not be used anymore. Please check out the package README');
5
+ }
6
+
7
+ }
2
8
  export const getHttpHeaders = config => {
3
9
  return {
4
10
  Authorization: `Signature key="${config.publicKey}",algorithm="hmac-sha256",identifier="secure-fields",signature=""`
@@ -37,43 +43,6 @@ export function getScriptURL(config) {
37
43
 
38
44
  return scriptURL;
39
45
  }
40
- /**
41
- * <script>
42
- console.log("AAAAAAAA")
43
- var component = document.getElementById("component");
44
- var onEvent = function(event) {
45
- console.log({ event })
46
- }
47
- console.log('component')
48
- component.addEventListener('stepChange', function(e) {
49
- console.log('step change')
50
- })
51
- function addEventListenerAll(target, listener, ...otherArguments) {
52
-
53
- // install listeners for all natively triggered events
54
- for (const key in target) {
55
- if (/^on/.test(key)) {
56
- const eventType = key.substr(2);
57
- target.addEventListener(eventType, listener, ...otherArguments);
58
- }
59
- }
60
-
61
- // dynamically install listeners for all manually triggered events, just-in-time before they're dispatched ;D
62
- const dispatchEvent_original = EventTarget.prototype.dispatchEvent;
63
- function dispatchEvent(event) {
64
- console.log('event test', event.type)
65
- target.addEventListener(event.type, listener, ...otherArguments); // multiple identical listeners are automatically discarded
66
- dispatchEvent_original.apply(this, arguments);
67
- }
68
- EventTarget.prototype.dispatchEvent = dispatchEvent;
69
- if (EventTarget.prototype.dispatchEvent !== dispatchEvent) throw new Error('Browser is smarter than you think');
70
-
71
- }
72
-
73
- // addEventListenerAll(component, onEvent);
74
- </script>
75
- */
76
-
77
46
  export const debuggingScript = `
78
47
  const consoleLog = (type, ...log) => window.ReactNativeWebView.postMessage(JSON.stringify({'type': 'Console', 'data': {'type': type, 'log': log}}));
79
48
  console = {
@@ -1 +1 @@
1
- {"version":3,"names":["axios","getHttpHeaders","config","Authorization","publicKey","getBaseURL","baseUrl","includes","scriptURL","replace","createHttpClient","create","baseURL","headers","getScriptURL","Error","logLevelStr","logLevel","version","debuggingScript"],"sources":["index.ts"],"sourcesContent":["import axios from 'axios';\nimport type { IPayEngineConfig } from '../interfaces/index';\n\nexport const getHttpHeaders = (config: IPayEngineConfig) => {\n return {\n Authorization: `Signature key=\"${config.publicKey}\",algorithm=\"hmac-sha256\",identifier=\"secure-fields\",signature=\"\"`,\n };\n};\n\nexport const getBaseURL = (config: IPayEngineConfig) => {\n let baseUrl = config.publicKey.includes('_prod_')\n ? 'https://console.payengine.co'\n : 'https://console.payengine.dev';\n\n if (config.scriptURL) {\n baseUrl = config.scriptURL.replace(/^((\\w+:)?\\/\\/[^\\/]+\\/?).*$/, '$1');\n }\n return baseUrl;\n};\n\nexport const createHttpClient = (config: IPayEngineConfig) => {\n return axios.create({\n baseURL: getBaseURL(config),\n headers: getHttpHeaders(config),\n });\n};\n\nexport function getScriptURL(config: IPayEngineConfig) {\n if (!config.publicKey) {\n throw new Error('PayEngine Public Key is missing');\n }\n let scriptURL = '';\n const logLevelStr = config.logLevel ? `&loglevel=${config.logLevel}` : '';\n if (config.scriptURL) {\n scriptURL = `${config.scriptURL}?key=${config.publicKey}${logLevelStr}`;\n } else {\n const baseURL = config.publicKey.includes('_prod_')\n ? 'https://console.payengine.co'\n : 'https://console.payengine.dev';\n const version = config.version ?? '1.0.0';\n scriptURL = `${baseURL}/js/${version}/embed.js?key=${config.publicKey}${logLevelStr}`;\n }\n\n return scriptURL;\n}\n\n/**\n * <script>\n console.log(\"AAAAAAAA\")\n var component = document.getElementById(\"component\");\n var onEvent = function(event) {\n console.log({ event })\n }\n console.log('component')\n component.addEventListener('stepChange', function(e) {\n console.log('step change')\n })\n function addEventListenerAll(target, listener, ...otherArguments) {\n\n // install listeners for all natively triggered events\n for (const key in target) {\n if (/^on/.test(key)) {\n const eventType = key.substr(2);\n target.addEventListener(eventType, listener, ...otherArguments);\n }\n }\n\n // dynamically install listeners for all manually triggered events, just-in-time before they're dispatched ;D\n const dispatchEvent_original = EventTarget.prototype.dispatchEvent;\n function dispatchEvent(event) {\n console.log('event test', event.type)\n target.addEventListener(event.type, listener, ...otherArguments); // multiple identical listeners are automatically discarded\n dispatchEvent_original.apply(this, arguments);\n }\n EventTarget.prototype.dispatchEvent = dispatchEvent;\n if (EventTarget.prototype.dispatchEvent !== dispatchEvent) throw new Error('Browser is smarter than you think');\n\n }\n\n // addEventListenerAll(component, onEvent);\n </script>\n */\nexport const debuggingScript = `\nconst consoleLog = (type, ...log) => window.ReactNativeWebView.postMessage(JSON.stringify({'type': 'Console', 'data': {'type': type, 'log': log}}));\nconsole = {\n log: (...log) => consoleLog('log', ...log),\n debug: (...log) => consoleLog('debug', ...log),\n info: (...log) => consoleLog('info', ...log),\n warn: (...log) => consoleLog('warn', ...log),\n error: (...log) => consoleLog('error', ...log),\n verbose: (...log) => consoleLog('verbose', ...log),\n};\n\nconst dispatchEvent_original = EventTarget.prototype.dispatchEvent;\nfunction dispatchEvent(event) {\n if (event.type && !event.type.startsWith('react')) {\n ReactNativeWebView.postMessage(JSON.stringify({\n type: 'PayEngine',\n event: {\n type: event.type,\n detail: event.detail\n }\n }))\n }\n}\nEventTarget.prototype.dispatchEvent = dispatchEvent;\n`;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAGA,OAAO,MAAMC,cAAc,GAAIC,MAAD,IAA8B;EAC1D,OAAO;IACLC,aAAa,EAAG,kBAAiBD,MAAM,CAACE,SAAU;EAD7C,CAAP;AAGD,CAJM;AAMP,OAAO,MAAMC,UAAU,GAAIH,MAAD,IAA8B;EACtD,IAAII,OAAO,GAAGJ,MAAM,CAACE,SAAP,CAAiBG,QAAjB,CAA0B,QAA1B,IACV,8BADU,GAEV,+BAFJ;;EAIA,IAAIL,MAAM,CAACM,SAAX,EAAsB;IACpBF,OAAO,GAAGJ,MAA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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAxBO"}
1
+ {"version":3,"names":["axios","PEDeprecationError","Error","constructor","getHttpHeaders","config","Authorization","publicKey","getBaseURL","baseUrl","includes","scriptURL","replace","createHttpClient","create","baseURL","headers","getScriptURL","logLevelStr","logLevel","version","debuggingScript"],"sources":["index.ts"],"sourcesContent":["import axios from 'axios';\nimport type { IPayEngineConfig } from '../interfaces/index';\n\nexport class PEDeprecationError extends Error {\n constructor() {\n super(\n 'This method is obsolete and can not be used anymore. Please check out the package README'\n );\n }\n}\n\nexport const getHttpHeaders = (config: IPayEngineConfig) => {\n return {\n Authorization: `Signature key=\"${config.publicKey}\",algorithm=\"hmac-sha256\",identifier=\"secure-fields\",signature=\"\"`,\n };\n};\n\nexport const getBaseURL = (config: IPayEngineConfig) => {\n let baseUrl = config.publicKey.includes('_prod_')\n ? 'https://console.payengine.co'\n : 'https://console.payengine.dev';\n\n if (config.scriptURL) {\n baseUrl = config.scriptURL.replace(/^((\\w+:)?\\/\\/[^\\/]+\\/?).*$/, '$1');\n }\n return baseUrl;\n};\n\nexport const createHttpClient = (config: IPayEngineConfig) => {\n return axios.create({\n baseURL: getBaseURL(config),\n headers: getHttpHeaders(config),\n });\n};\n\nexport function getScriptURL(config: IPayEngineConfig) {\n if (!config.publicKey) {\n throw new Error('PayEngine Public Key is missing');\n }\n let scriptURL = '';\n const logLevelStr = config.logLevel ? `&loglevel=${config.logLevel}` : '';\n if (config.scriptURL) {\n scriptURL = `${config.scriptURL}?key=${config.publicKey}${logLevelStr}`;\n } else {\n const baseURL = config.publicKey.includes('_prod_')\n ? 'https://console.payengine.co'\n : 'https://console.payengine.dev';\n const version = config.version ?? '1.0.0';\n scriptURL = `${baseURL}/js/${version}/embed.js?key=${config.publicKey}${logLevelStr}`;\n }\n\n return scriptURL;\n}\n\nexport const debuggingScript = `\nconst consoleLog = (type, ...log) => window.ReactNativeWebView.postMessage(JSON.stringify({'type': 'Console', 'data': {'type': type, 'log': log}}));\nconsole = {\n log: (...log) => consoleLog('log', ...log),\n debug: (...log) => consoleLog('debug', ...log),\n info: (...log) => consoleLog('info', ...log),\n warn: (...log) => consoleLog('warn', ...log),\n error: (...log) => consoleLog('error', ...log),\n verbose: (...log) => consoleLog('verbose', ...log),\n};\n\nconst dispatchEvent_original = EventTarget.prototype.dispatchEvent;\nfunction dispatchEvent(event) {\n if (event.type && !event.type.startsWith('react')) {\n ReactNativeWebView.postMessage(JSON.stringify({\n type: 'PayEngine',\n event: {\n type: event.type,\n detail: event.detail\n }\n }))\n }\n}\nEventTarget.prototype.dispatchEvent = dispatchEvent;\n`;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AAGA,OAAO,MAAMC,kBAAN,SAAiCC,KAAjC,CAAuC;EAC5CC,WAAW,GAAG;IACZ,MACE,0FADF;EAGD;;AAL2C;AAQ9C,OAAO,MAAMC,cAAc,GAAIC,MAAD,IAA8B;EAC1D,OAAO;IACLC,aAAa,EAAG,kBAAiBD,MAAM,CAACE,SAAU;EAD7C,CAAP;AAGD,CAJM;AAMP,OAAO,MAAMC,UAAU,GAAIH,MAAD,IAA8B;EACtD,IAAII,OAAO,GAAGJ,MAAM,CAACE,SAAP,CAAiBG,QAAjB,CAA0B,QAA1B,IACV,8BADU,GAEV,+BAFJ;;EAIA,IAAIL,MAAM,CAACM,SAAX,EAAsB;IACpBF,OAAO,GAAGJ,MAAM,CAACM,SAAP,CAAiBC,OAAjB,CAAyB,4BAAzB,EAAuD,IAAvD,CAAV;EACD;;EACD,OAAOH,OAAP;AACD,CATM;AAWP,OAAO,MAAMI,gBAAgB,GAAIR,MAAD,IAA8B;EAC5D,OAAOL,KAAK,CAACc,MAAN,CAAa;IAClBC,OAAO,EAAEP,UAAU,CAACH,MAAD,CADD;IAElBW,OAAO,EAAEZ,cAAc,CAACC,MAAD;EAFL,CAAb,CAAP;AAID,CALM;AAOP,OAAO,SAASY,YAAT,CAAsBZ,MAAtB,EAAgD;EACrD,IAAI,CAACA,MAAM,CAACE,SAAZ,EAAuB;IACrB,MAAM,IAAIL,KAAJ,CAAU,iCAAV,CAAN;EACD;;EACD,IAAIS,SAAS,GAAG,EAAhB;EACA,MAAMO,WAAW,GAAGb,MAAM,CAACc,QAAP,GAAmB,aAAYd,MAAM,CAACc,QAAS,EAA/C,GAAmD,EAAvE;;EACA,IAAId,MAAM,CAACM,SAAX,EAAsB;IACpBA,SAAS,GAAI,GAAEN,MAAM,CAACM,SAAU,QAAON,MAAM,CAACE,SAAU,GAAEW,WAAY,EAAtE;EACD,CAFD,MAEO;IACL,MAAMH,OAAO,GAAGV,MAAM,CAACE,SAAP,CAAiBG,QAAjB,CAA0B,QAA1B,IACZ,8BADY,GAEZ,+BAFJ;IAGA,MAAMU,OAAO,GAAGf,MAAM,CAACe,OAAP,IAAkB,OAAlC;IACAT,SAAS,GAAI,GAAEI,OAAQ,OAAMK,OAAQ,iBAAgBf,MAAM,CAACE,SAAU,GAAEW,WAAY,EAApF;EACD;;EAED,OAAOP,SAAP;AACD;AAED,OAAO,MAAMU,eAAe,GAAI;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAxBO"}
@@ -1,15 +1,2 @@
1
- import { StyleProp, ViewStyle } from 'react-native';
2
- import type { IPayEngineConfig } from '../interfaces/index';
3
- interface IProps {
4
- config: IPayEngineConfig;
5
- type: string;
6
- merchantId?: string;
7
- hash?: string;
8
- events: {
9
- [key: string]: (eventData: any) => void;
10
- };
11
- style?: StyleProp<ViewStyle>;
12
- [key: string]: any;
13
- }
14
- declare const PayEngine: (props: IProps) => JSX.Element;
1
+ declare const PayEngine: () => JSX.Element;
15
2
  export default PayEngine;
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { ViewProps } from 'react-native';
3
+ import type { PEPaymentRequest } from './PEPaymentRequest';
4
+ export interface PEApplePayButtonProps extends ViewProps {
5
+ paymentRequest: PEPaymentRequest;
6
+ onTokenDidReturn?: (token: string) => void;
7
+ onPaymentSheetDismissed?: () => void;
8
+ onPaymentFailed?: (error: Error) => void;
9
+ }
10
+ export interface PEApplePayButtonMethods {
11
+ }
12
+ export declare const PEApplePayButton: React.ForwardRefExoticComponent<PEApplePayButtonProps & React.RefAttributes<PEApplePayButtonMethods>>;
@@ -0,0 +1,12 @@
1
+ export declare class PEPaymentRequest {
2
+ paymentAmount: number;
3
+ currencyCode: 'USD' | 'CAD';
4
+ paymentItems: {
5
+ amount: number;
6
+ label: string;
7
+ }[];
8
+ constructor(paymentAmount: number, currencyCode?: 'USD' | 'CAD', paymentItems?: {
9
+ amount: number;
10
+ label: string;
11
+ }[]);
12
+ }
@@ -0,0 +1,5 @@
1
+ export default class PayEngineNative {
2
+ static createFraudMonitorSession(merchantId: string): Promise<any>;
3
+ static getBrowserInfo(): Promise<any>;
4
+ static isPlatformPaySupported(merchantId: string): Promise<any>;
5
+ }
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import type { IPayEngineConfig } from "../../interfaces";
3
+ declare const PayEngineContext: React.Context<IPayEngineConfig | undefined>;
4
+ declare const PayEngineProvider: ({ config, children }: {
5
+ config: IPayEngineConfig;
6
+ children: React.ReactNode;
7
+ }) => JSX.Element;
8
+ export { PayEngineContext, PayEngineProvider };
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import type IPEField from './IPEField';
3
+ import type PEBankAccount from './PEBankAccount';
4
+ export interface PEBankAccountViewProps {
5
+ additionalFields?: IPEField[];
6
+ }
7
+ export interface PEBankAccountViewMethods {
8
+ submit: (merchantId: string, additionalData: {
9
+ [key: string]: string;
10
+ }) => Promise<PEBankAccount>;
11
+ showKeyboard: () => void;
12
+ hideKeyboard: () => void;
13
+ }
14
+ export declare const PEBankAccountView: React.ForwardRefExoticComponent<PEBankAccountViewProps & React.RefAttributes<PEBankAccountViewMethods>>;
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import type IPEField from './IPEField';
3
+ import type PECard from './PECard';
4
+ export interface PECreditCardViewProps {
5
+ additionalFields?: IPEField[];
6
+ }
7
+ export interface PECreditCardViewMethods {
8
+ submit: (merchantId: string, additionalData: {
9
+ [key: string]: string;
10
+ }) => Promise<PECard>;
11
+ showKeyboard: () => void;
12
+ hideKeyboard: () => void;
13
+ }
14
+ export declare const PECreditCardView: React.ForwardRefExoticComponent<PECreditCardViewProps & React.RefAttributes<PECreditCardViewMethods>>;
@@ -0,0 +1,10 @@
1
+ import type PEKeyboardType from "./PEKeyboardType";
2
+ interface IPEField {
3
+ name: string;
4
+ type: string;
5
+ placeholder: string;
6
+ keyboardType: PEKeyboardType;
7
+ isRequired: boolean;
8
+ pattern?: string;
9
+ }
10
+ export default IPEField;
@@ -0,0 +1,11 @@
1
+ interface PEBankAccount {
2
+ id: string;
3
+ token: string;
4
+ account_data: {
5
+ first_name: string;
6
+ last_name: string;
7
+ routing_number: string;
8
+ last_4: string;
9
+ };
10
+ }
11
+ export default PEBankAccount;
@@ -0,0 +1,13 @@
1
+ interface PECard {
2
+ token: string;
3
+ card_data: {
4
+ id: string;
5
+ brand: string;
6
+ last_4: string;
7
+ exp_year: string;
8
+ exp_month: string;
9
+ name: string;
10
+ address_zip?: string;
11
+ };
12
+ }
13
+ export default PECard;
@@ -0,0 +1,7 @@
1
+ declare enum PEKeyboardType {
2
+ alphabet = "alphabet",
3
+ number = "number",
4
+ phone = "phone",
5
+ normal = "normal"
6
+ }
7
+ export default PEKeyboardType;
@@ -1,9 +1,15 @@
1
1
  import PayEngine from './components/PayEngine';
2
- import { SecureFields } from './components/SecureFields/index';
3
- import { CreditCardForm } from './components/CreditCardForm/index';
4
- import CreditCardFormLegacy from './components/Legacy/CreditCardFormLegacy';
5
2
  import type { IPayEngineConfig } from './interfaces/index';
6
- import { PayEngineGooglePay } from './components/GooglePay/PayEngineGooglePay';
7
- import { PayEngineApplePay } from './components/ApplePay/PayEngineApplePay';
3
+ import { PECreditCardView, PECreditCardViewMethods } from './components/v2/SecureFields/CreditCardView';
4
+ import { PEBankAccountView, PEBankAccountViewMethods } from './components/v2/SecureFields/BankAccountView';
5
+ import type IPEField from './components/v2/SecureFields/IPEField';
6
+ import type PECard from './components/v2/SecureFields/PECard';
7
+ import type PEBankAccount from './components/v2/SecureFields/PEBankAccount';
8
+ import { PayEngineProvider } from './components/v2/PayEngineProvider';
9
+ import PayEngineNative from './components/v2/PayEngineNative';
10
+ import { PEApplePayButton } from './components/v2/ApplePay/PEApplePayButton';
11
+ import { PEPaymentRequest } from './components/v2/ApplePay/PEPaymentRequest';
12
+ import * as PayEngineUtils from './utils/index';
13
+ import PEKeyboardType from './components/v2/SecureFields/PEKeyboardType';
8
14
  declare const PayEngineStatic: any;
9
- export { PayEngineStatic, PayEngine, SecureFields, CreditCardForm, CreditCardFormLegacy, IPayEngineConfig, PayEngineGooglePay, PayEngineApplePay };
15
+ export { PayEngineStatic, PayEngine, IPayEngineConfig, PayEngineUtils, PayEngineProvider, PayEngineNative, PEKeyboardType, IPEField, PECreditCardView, PECreditCardViewMethods, PECard, PEBankAccountView, PEBankAccountViewMethods, PEBankAccount, PEApplePayButton, PEPaymentRequest, };
@@ -1,33 +1,6 @@
1
- import type { StyleProp, ViewStyle } from 'react-native';
2
- import type { GooglePayRequestData } from '../components/GooglePay/interfaces';
3
1
  export interface IPayEngineConfig {
4
2
  publicKey: string;
5
3
  version?: string;
6
4
  scriptURL?: string;
7
5
  logLevel?: number;
8
6
  }
9
- export interface CreditCardFormProps {
10
- style?: StyleProp<ViewStyle>;
11
- merchantId?: string;
12
- showZipCode?: boolean;
13
- config: IPayEngineConfig;
14
- }
15
- export interface CreditCardFormMethods {
16
- createCard: (merchantId?: string) => Promise<any>;
17
- }
18
- export interface MobilePaymentConfig {
19
- base_url: string;
20
- country: string;
21
- currency: string;
22
- gateway: string;
23
- google_pay: GooglePayRequestData;
24
- apple_pay: {
25
- merchantName: string;
26
- supportedCardNetworks: string[];
27
- };
28
- }
29
- export interface PaymentRequest {
30
- amount: number;
31
- currencyCode?: string;
32
- countryCode?: string;
33
- }
@@ -1,44 +1,11 @@
1
1
  import type { IPayEngineConfig } from '../interfaces/index';
2
+ export declare class PEDeprecationError extends Error {
3
+ constructor();
4
+ }
2
5
  export declare const getHttpHeaders: (config: IPayEngineConfig) => {
3
6
  Authorization: string;
4
7
  };
5
8
  export declare const getBaseURL: (config: IPayEngineConfig) => string;
6
9
  export declare const createHttpClient: (config: IPayEngineConfig) => import("axios").AxiosInstance;
7
10
  export declare function getScriptURL(config: IPayEngineConfig): string;
8
- /**
9
- * <script>
10
- console.log("AAAAAAAA")
11
- var component = document.getElementById("component");
12
- var onEvent = function(event) {
13
- console.log({ event })
14
- }
15
- console.log('component')
16
- component.addEventListener('stepChange', function(e) {
17
- console.log('step change')
18
- })
19
- function addEventListenerAll(target, listener, ...otherArguments) {
20
-
21
- // install listeners for all natively triggered events
22
- for (const key in target) {
23
- if (/^on/.test(key)) {
24
- const eventType = key.substr(2);
25
- target.addEventListener(eventType, listener, ...otherArguments);
26
- }
27
- }
28
-
29
- // dynamically install listeners for all manually triggered events, just-in-time before they're dispatched ;D
30
- const dispatchEvent_original = EventTarget.prototype.dispatchEvent;
31
- function dispatchEvent(event) {
32
- console.log('event test', event.type)
33
- target.addEventListener(event.type, listener, ...otherArguments); // multiple identical listeners are automatically discarded
34
- dispatchEvent_original.apply(this, arguments);
35
- }
36
- EventTarget.prototype.dispatchEvent = dispatchEvent;
37
- if (EventTarget.prototype.dispatchEvent !== dispatchEvent) throw new Error('Browser is smarter than you think');
38
-
39
- }
40
-
41
- // addEventListenerAll(component, onEvent);
42
- </script>
43
- */
44
11
  export declare const debuggingScript = "\nconst consoleLog = (type, ...log) => window.ReactNativeWebView.postMessage(JSON.stringify({'type': 'Console', 'data': {'type': type, 'log': log}}));\nconsole = {\n log: (...log) => consoleLog('log', ...log),\n debug: (...log) => consoleLog('debug', ...log),\n info: (...log) => consoleLog('info', ...log),\n warn: (...log) => consoleLog('warn', ...log),\n error: (...log) => consoleLog('error', ...log),\n verbose: (...log) => consoleLog('verbose', ...log),\n};\n\nconst dispatchEvent_original = EventTarget.prototype.dispatchEvent;\nfunction dispatchEvent(event) {\n if (event.type && !event.type.startsWith('react')) {\n ReactNativeWebView.postMessage(JSON.stringify({\n type: 'PayEngine',\n event: {\n type: event.type,\n detail: event.detail\n }\n }))\n }\n}\nEventTarget.prototype.dispatchEvent = dispatchEvent;\n";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-payengine",
3
- "version": "1.0.6",
3
+ "version": "2.0.2",
4
4
  "description": "PayEngine SDK for React Native",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -29,6 +29,8 @@
29
29
  "lint": "eslint \"**/*.{js,ts,tsx}\"",
30
30
  "prepare": "bob build",
31
31
  "release": "release-it",
32
+ "update-release": "release-it --no-increment",
33
+ "beta": "release-it major --preRelease=beta",
32
34
  "example": "yarn --cwd example",
33
35
  "bootstrap": "yarn example && yarn && yarn example pods"
34
36
  },
@@ -62,7 +64,6 @@
62
64
  "react": "17.0.2",
63
65
  "react-native": "0.68.2",
64
66
  "react-native-builder-bob": "^0.18.3",
65
- "react-native-webview": "^11.23.0",
66
67
  "release-it": "^15.0.0",
67
68
  "typescript": "^4.5.2"
68
69
  },
@@ -71,8 +72,7 @@
71
72
  },
72
73
  "peerDependencies": {
73
74
  "react": "*",
74
- "react-native": "*",
75
- "react-native-webview": "^11.23.0"
75
+ "react-native": "*"
76
76
  },
77
77
  "jest": {
78
78
  "preset": "react-native",
@@ -89,13 +89,17 @@
89
89
  "release-it": {
90
90
  "git": {
91
91
  "commitMessage": "chore: release ${version}",
92
- "tagName": "v${version}"
92
+ "tagName": "v${version}",
93
+ "commit": true,
94
+ "tag": true,
95
+ "push": true,
96
+ "requireCleanWorkingDir": false
93
97
  },
94
98
  "npm": {
95
99
  "publish": true
96
100
  },
97
101
  "github": {
98
- "release": true
102
+ "release": false
99
103
  },
100
104
  "plugins": {
101
105
  "@release-it/conventional-changelog": {
@@ -150,6 +154,7 @@
150
154
  },
151
155
  "dependencies": {
152
156
  "axios": "^0.27.2",
157
+ "caniuse-lite": "^1.0.30001658",
153
158
  "events": "^3.3.0"
154
159
  }
155
- }
160
+ }
@@ -14,12 +14,12 @@ Pod::Spec.new do |s|
14
14
  s.platforms = { :ios => "12.0" }
15
15
  s.source = { :git => "https://bitbucket.org/payfac0/pf-react-native-payengine", :tag => "#{s.version}" }
16
16
 
17
- s.source_files = "ios/**/*.{h,m,mm,swift}"
17
+ s.source_files = "ios/Sources/**/*.{h,m,mm,swift}"
18
18
 
19
19
  s.dependency "React-Core"
20
20
 
21
21
  # VGS collect
22
- s.dependency 'VGSCollectSDK', "~> 1.9.8"
22
+ s.vendored_frameworks = 'ios/PayEngineSDK.xcframework'
23
23
 
24
24
  # Don't install the dependencies when we run `pod install` in the old architecture.
25
25
  if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then