react-native-payengine 1.0.6 → 2.0.4

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 (309) hide show
  1. package/README.md +269 -110
  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 +329 -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 +25 -4
  18. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  19. package/android/payment-sdk-debug-1.0.2.aar +0 -0
  20. package/android/payment-sdk-release-1.0.2.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 +9 -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 +73 -0
  26. package/android/src/main/java/com/reactnativepayengine/v2/features/googlepay/RNPEGooglePayButton.kt +105 -0
  27. package/android/src/main/java/com/reactnativepayengine/v2/features/googlepay/RNPEGooglePayButtonManager.kt +56 -0
  28. package/android/src/main/java/com/reactnativepayengine/v2/securefields/RNPEEvents.kt +11 -0
  29. package/android/src/main/java/com/reactnativepayengine/v2/securefields/RNPEField.kt +17 -0
  30. package/android/src/main/java/com/reactnativepayengine/v2/securefields/bankaccount/RNBankAccountViewManager.kt +103 -0
  31. package/android/src/main/java/com/reactnativepayengine/v2/securefields/bankaccount/RNPEBankAccountView.kt +77 -0
  32. package/android/src/main/java/com/reactnativepayengine/v2/securefields/creditcard/RNPECreditCardView.kt +77 -0
  33. package/android/src/main/java/com/reactnativepayengine/v2/securefields/creditcard/RNPECreditCardViewManager.kt +103 -0
  34. package/ios/PayEngineSDK.xcframework/Info.plist +44 -0
  35. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Frameworks/libKountDataCollector.a +0 -0
  36. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Headers/CustomWindow.h +25 -0
  37. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Headers/KDataCollector.h +106 -0
  38. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Headers/KountAnalyticsViewController.h +82 -0
  39. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Headers/PayEngineSDK-Swift.h +622 -0
  40. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Headers/PayEngineSDK.h +20 -0
  41. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Headers/UIControl+CustomControl.h +33 -0
  42. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Headers/UIViewController+TouchControl.h +27 -0
  43. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Info.plist +0 -0
  44. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios.abi.json +15143 -0
  45. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +326 -0
  46. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios.private.swiftinterface-e +326 -0
  47. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  48. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios.swiftinterface +326 -0
  49. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios.swiftinterface-e +326 -0
  50. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/Modules/module.modulemap +11 -0
  51. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/PayEngineSDK +0 -0
  52. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/VGSCollectSDK_VGSCollectSDK.bundle/Assets.car +0 -0
  53. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/VGSCollectSDK_VGSCollectSDK.bundle/Info.plist +0 -0
  54. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/browserInfo.html +136 -0
  55. package/ios/PayEngineSDK.xcframework/ios-arm64/PayEngineSDK.framework/perform3ds.html +467 -0
  56. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Frameworks/libKountDataCollector.a +0 -0
  57. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Headers/CustomWindow.h +25 -0
  58. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Headers/KDataCollector.h +106 -0
  59. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Headers/KountAnalyticsViewController.h +82 -0
  60. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Headers/PayEngineSDK-Swift.h +1240 -0
  61. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Headers/PayEngineSDK.h +20 -0
  62. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Headers/UIControl+CustomControl.h +33 -0
  63. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Headers/UIViewController+TouchControl.h +27 -0
  64. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Info.plist +0 -0
  65. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +15143 -0
  66. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +326 -0
  67. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface-e +326 -0
  68. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  69. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +326 -0
  70. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface-e +326 -0
  71. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +15143 -0
  72. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +326 -0
  73. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface-e +326 -0
  74. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  75. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +326 -0
  76. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/PayEngineSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface-e +326 -0
  77. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/Modules/module.modulemap +11 -0
  78. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/PayEngineSDK +0 -0
  79. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/VGSCollectSDK_VGSCollectSDK.bundle/Assets.car +0 -0
  80. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/VGSCollectSDK_VGSCollectSDK.bundle/Info.plist +0 -0
  81. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/browserInfo.html +136 -0
  82. package/ios/PayEngineSDK.xcframework/ios-arm64_x86_64-simulator/PayEngineSDK.framework/perform3ds.html +467 -0
  83. package/ios/Payengine.xcodeproj/project.pbxproj +14 -4
  84. package/ios/Payengine.xcodeproj/project.xcworkspace/xcuserdata/tringuyen.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  85. package/ios/Payengine.xcworkspace/contents.xcworkspacedata +7 -0
  86. package/ios/Payengine.xcworkspace/xcuserdata/tringuyen.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  87. package/ios/Sources/Classes/ApplePay/RNPEApplePayButton.swift +111 -0
  88. package/ios/Sources/Classes/ApplePay/RNPEApplePayPaymentRequest.swift +43 -0
  89. package/ios/Sources/Classes/RNPEError.swift +12 -0
  90. package/ios/Sources/Classes/RNPEEventEmitter.swift +29 -0
  91. package/ios/Sources/Classes/RNPEUtils.swift +30 -0
  92. package/ios/Sources/Classes/RNPayEngineNative.swift +87 -0
  93. package/ios/Sources/Classes/SecureFields/RNPEBankAccountView.swift +130 -0
  94. package/ios/Sources/Classes/SecureFields/RNPECreditCardView.swift +129 -0
  95. package/ios/Sources/Classes/SecureFields/RNPEEvents.swift +15 -0
  96. package/ios/Sources/Classes/SecureFields/RNPEField.swift +26 -0
  97. package/ios/Sources/Payengine.m +73 -0
  98. package/ios/Sources/Payengine.swift +13 -0
  99. package/lib/commonjs/components/PayEngine.js +2 -123
  100. package/lib/commonjs/components/PayEngine.js.map +1 -1
  101. package/lib/commonjs/components/v2/ApplePay/PEApplePayButton.js +55 -0
  102. package/lib/commonjs/components/v2/ApplePay/PEApplePayButton.js.map +1 -0
  103. package/lib/commonjs/components/v2/GooglePay/PEGooglePayButton.js +70 -0
  104. package/lib/commonjs/components/v2/GooglePay/PEGooglePayButton.js.map +1 -0
  105. package/lib/commonjs/components/v2/PEPaymentRequest.js +32 -0
  106. package/lib/commonjs/components/v2/PEPaymentRequest.js.map +1 -0
  107. package/lib/commonjs/components/v2/PayEngineNative.js +36 -0
  108. package/lib/commonjs/components/v2/PayEngineNative.js.map +1 -0
  109. package/lib/commonjs/components/{SecureFields/VGS/TextField.js → v2/PayEngineProvider.js} +28 -12
  110. package/lib/commonjs/components/v2/PayEngineProvider.js.map +1 -0
  111. package/lib/commonjs/components/v2/SecureFields/BankAccountView.js +89 -0
  112. package/lib/commonjs/components/v2/SecureFields/BankAccountView.js.map +1 -0
  113. package/lib/commonjs/components/v2/SecureFields/CreditCardView.js +90 -0
  114. package/lib/commonjs/components/v2/SecureFields/CreditCardView.js.map +1 -0
  115. package/lib/commonjs/components/v2/SecureFields/IPEField.js +6 -0
  116. package/lib/commonjs/components/v2/SecureFields/IPEField.js.map +1 -0
  117. package/lib/commonjs/components/v2/SecureFields/PEBankAccount.js +6 -0
  118. package/lib/commonjs/components/v2/SecureFields/PEBankAccount.js.map +1 -0
  119. package/lib/commonjs/components/v2/SecureFields/PECard.js +6 -0
  120. package/lib/commonjs/components/v2/SecureFields/PECard.js.map +1 -0
  121. package/lib/commonjs/components/v2/SecureFields/PEKeyboardType.js +18 -0
  122. package/lib/commonjs/components/v2/SecureFields/PEKeyboardType.js.map +1 -0
  123. package/lib/commonjs/index.js +62 -18
  124. package/lib/commonjs/index.js.map +1 -1
  125. package/lib/commonjs/interfaces/index.js +0 -4
  126. package/lib/commonjs/interfaces/index.js.map +1 -1
  127. package/lib/commonjs/utils/index.js +10 -38
  128. package/lib/commonjs/utils/index.js.map +1 -1
  129. package/lib/module/components/PayEngine.js +3 -118
  130. package/lib/module/components/PayEngine.js.map +1 -1
  131. package/lib/module/components/v2/ApplePay/PEApplePayButton.js +41 -0
  132. package/lib/module/components/v2/ApplePay/PEApplePayButton.js.map +1 -0
  133. package/lib/module/components/v2/GooglePay/PEGooglePayButton.js +56 -0
  134. package/lib/module/components/v2/GooglePay/PEGooglePayButton.js.map +1 -0
  135. package/lib/module/components/v2/PEPaymentRequest.js +23 -0
  136. package/lib/module/components/v2/PEPaymentRequest.js.map +1 -0
  137. package/lib/module/components/v2/PayEngineNative.js +25 -0
  138. package/lib/module/components/v2/PayEngineNative.js.map +1 -0
  139. package/lib/module/components/v2/PayEngineProvider.js +30 -0
  140. package/lib/module/components/v2/PayEngineProvider.js.map +1 -0
  141. package/lib/module/components/v2/SecureFields/BankAccountView.js +75 -0
  142. package/lib/module/components/v2/SecureFields/BankAccountView.js.map +1 -0
  143. package/lib/module/components/v2/SecureFields/CreditCardView.js +76 -0
  144. package/lib/module/components/v2/SecureFields/CreditCardView.js.map +1 -0
  145. package/lib/module/components/v2/SecureFields/IPEField.js +2 -0
  146. package/lib/module/components/v2/SecureFields/IPEField.js.map +1 -0
  147. package/lib/module/components/v2/SecureFields/PEBankAccount.js +2 -0
  148. package/lib/module/components/v2/SecureFields/PEBankAccount.js.map +1 -0
  149. package/lib/module/components/v2/SecureFields/PECard.js +2 -0
  150. package/lib/module/components/v2/SecureFields/PECard.js.map +1 -0
  151. package/lib/module/components/v2/SecureFields/PEKeyboardType.js +11 -0
  152. package/lib/module/components/v2/SecureFields/PEKeyboardType.js.map +1 -0
  153. package/lib/module/index.js +15 -6
  154. package/lib/module/index.js.map +1 -1
  155. package/lib/module/interfaces/index.js +1 -1
  156. package/lib/module/interfaces/index.js.map +1 -1
  157. package/lib/module/utils/index.js +6 -37
  158. package/lib/module/utils/index.js.map +1 -1
  159. package/lib/typescript/components/PayEngine.d.ts +1 -14
  160. package/lib/typescript/components/v2/ApplePay/PEApplePayButton.d.ts +12 -0
  161. package/lib/typescript/components/v2/GooglePay/PEGooglePayButton.d.ts +12 -0
  162. package/lib/typescript/components/v2/PEPaymentRequest.d.ts +13 -0
  163. package/lib/typescript/components/v2/PayEngineNative.d.ts +5 -0
  164. package/lib/typescript/components/v2/PayEngineProvider.d.ts +8 -0
  165. package/lib/typescript/components/v2/SecureFields/BankAccountView.d.ts +14 -0
  166. package/lib/typescript/components/v2/SecureFields/CreditCardView.d.ts +14 -0
  167. package/lib/typescript/components/v2/SecureFields/IPEField.d.ts +10 -0
  168. package/lib/typescript/components/v2/SecureFields/PEBankAccount.d.ts +11 -0
  169. package/lib/typescript/components/v2/SecureFields/PECard.d.ts +13 -0
  170. package/lib/typescript/components/v2/SecureFields/PEKeyboardType.d.ts +7 -0
  171. package/lib/typescript/index.d.ts +13 -6
  172. package/lib/typescript/interfaces/index.d.ts +0 -27
  173. package/lib/typescript/utils/index.d.ts +3 -36
  174. package/package.json +11 -6
  175. package/react-native-payengine.podspec +2 -2
  176. package/src/components/PayEngine.tsx +5 -118
  177. package/src/components/v2/ApplePay/PEApplePayButton.tsx +74 -0
  178. package/src/components/v2/GooglePay/PEGooglePayButton.tsx +73 -0
  179. package/src/components/v2/PEPaymentRequest.ts +20 -0
  180. package/src/components/v2/PayEngineNative.tsx +22 -0
  181. package/src/components/v2/PayEngineProvider.tsx +30 -0
  182. package/src/components/v2/SecureFields/BankAccountView.tsx +95 -0
  183. package/src/components/v2/SecureFields/CreditCardView.tsx +96 -0
  184. package/src/components/v2/SecureFields/IPEField.ts +12 -0
  185. package/src/components/v2/SecureFields/PEBankAccount.ts +12 -0
  186. package/src/components/v2/SecureFields/PECard.ts +14 -0
  187. package/src/components/v2/SecureFields/PEKeyboardType.ts +8 -0
  188. package/src/index.tsx +49 -22
  189. package/src/interfaces/index.ts +0 -32
  190. package/src/utils/index.ts +8 -36
  191. package/android/.gradle/5.6.4/executionHistory/executionHistory.bin +0 -0
  192. package/android/.gradle/5.6.4/executionHistory/executionHistory.lock +0 -0
  193. package/android/.gradle/5.6.4/fileContent/fileContent.lock +0 -0
  194. package/android/.gradle/5.6.4/fileHashes/fileHashes.bin +0 -0
  195. package/android/.gradle/5.6.4/fileHashes/fileHashes.lock +0 -0
  196. package/android/.gradle/5.6.4/javaCompile/classAnalysis.bin +0 -0
  197. package/android/.gradle/5.6.4/javaCompile/jarAnalysis.bin +0 -0
  198. package/android/.gradle/5.6.4/javaCompile/javaCompile.lock +0 -0
  199. package/android/.gradle/5.6.4/javaCompile/taskHistory.bin +0 -0
  200. package/android/src/main/java/com/reactnativepayengine/collect/VGSCollectModule.java +0 -153
  201. package/android/src/main/java/com/reactnativepayengine/collect/VGSCollectOnCreateViewInstanceListener.java +0 -6
  202. package/android/src/main/java/com/reactnativepayengine/collect/fields/VGSCVCField.java +0 -67
  203. package/android/src/main/java/com/reactnativepayengine/collect/fields/VGSCardHolderNameField.java +0 -53
  204. package/android/src/main/java/com/reactnativepayengine/collect/fields/VGSCardNumberField.java +0 -57
  205. package/android/src/main/java/com/reactnativepayengine/collect/fields/VGSExpDateField.java +0 -54
  206. package/android/src/main/java/com/reactnativepayengine/collect/fields/VGSTextField.java +0 -57
  207. package/android/src/main/java/com/reactnativepayengine/collect/fields/VGSZipCodeField.java +0 -62
  208. package/android/src/main/java/com/reactnativepayengine/util/ResourceUtil.java +0 -14
  209. package/ios/Payengine.m +0 -72
  210. package/ios/Payengine.swift +0 -720
  211. package/lib/commonjs/components/ApplePay/PayEngineApplePay.js +0 -71
  212. package/lib/commonjs/components/ApplePay/PayEngineApplePay.js.map +0 -1
  213. package/lib/commonjs/components/ApplePay/index.js +0 -46
  214. package/lib/commonjs/components/ApplePay/index.js.map +0 -1
  215. package/lib/commonjs/components/ApplePay/interfaces.js +0 -2
  216. package/lib/commonjs/components/ApplePay/interfaces.js.map +0 -1
  217. package/lib/commonjs/components/CreditCardForm/index.js +0 -76
  218. package/lib/commonjs/components/CreditCardForm/index.js.map +0 -1
  219. package/lib/commonjs/components/GooglePay/PayEngineGooglePay.js +0 -65
  220. package/lib/commonjs/components/GooglePay/PayEngineGooglePay.js.map +0 -1
  221. package/lib/commonjs/components/GooglePay/index.js +0 -40
  222. package/lib/commonjs/components/GooglePay/index.js.map +0 -1
  223. package/lib/commonjs/components/GooglePay/interfaces.js +0 -2
  224. package/lib/commonjs/components/GooglePay/interfaces.js.map +0 -1
  225. package/lib/commonjs/components/Legacy/CreditCardFormLegacy.js +0 -323
  226. package/lib/commonjs/components/Legacy/CreditCardFormLegacy.js.map +0 -1
  227. package/lib/commonjs/components/SecureFields/VGS/CVCField.js +0 -26
  228. package/lib/commonjs/components/SecureFields/VGS/CVCField.js.map +0 -1
  229. package/lib/commonjs/components/SecureFields/VGS/CardHolderNameField.js +0 -26
  230. package/lib/commonjs/components/SecureFields/VGS/CardHolderNameField.js.map +0 -1
  231. package/lib/commonjs/components/SecureFields/VGS/CardNumberField.js +0 -26
  232. package/lib/commonjs/components/SecureFields/VGS/CardNumberField.js.map +0 -1
  233. package/lib/commonjs/components/SecureFields/VGS/CollectManager.js +0 -60
  234. package/lib/commonjs/components/SecureFields/VGS/CollectManager.js.map +0 -1
  235. package/lib/commonjs/components/SecureFields/VGS/ExpDateField.js +0 -26
  236. package/lib/commonjs/components/SecureFields/VGS/ExpDateField.js.map +0 -1
  237. package/lib/commonjs/components/SecureFields/VGS/TextField.js.map +0 -1
  238. package/lib/commonjs/components/SecureFields/VGS/ZipCodeField.js +0 -26
  239. package/lib/commonjs/components/SecureFields/VGS/ZipCodeField.js.map +0 -1
  240. package/lib/commonjs/components/SecureFields/index.js +0 -34
  241. package/lib/commonjs/components/SecureFields/index.js.map +0 -1
  242. package/lib/module/components/ApplePay/PayEngineApplePay.js +0 -58
  243. package/lib/module/components/ApplePay/PayEngineApplePay.js.map +0 -1
  244. package/lib/module/components/ApplePay/index.js +0 -35
  245. package/lib/module/components/ApplePay/index.js.map +0 -1
  246. package/lib/module/components/ApplePay/interfaces.js +0 -2
  247. package/lib/module/components/ApplePay/interfaces.js.map +0 -1
  248. package/lib/module/components/CreditCardForm/index.js +0 -60
  249. package/lib/module/components/CreditCardForm/index.js.map +0 -1
  250. package/lib/module/components/GooglePay/PayEngineGooglePay.js +0 -52
  251. package/lib/module/components/GooglePay/PayEngineGooglePay.js.map +0 -1
  252. package/lib/module/components/GooglePay/index.js +0 -29
  253. package/lib/module/components/GooglePay/index.js.map +0 -1
  254. package/lib/module/components/GooglePay/interfaces.js +0 -2
  255. package/lib/module/components/GooglePay/interfaces.js.map +0 -1
  256. package/lib/module/components/Legacy/CreditCardFormLegacy.js +0 -302
  257. package/lib/module/components/Legacy/CreditCardFormLegacy.js.map +0 -1
  258. package/lib/module/components/SecureFields/VGS/CVCField.js +0 -14
  259. package/lib/module/components/SecureFields/VGS/CVCField.js.map +0 -1
  260. package/lib/module/components/SecureFields/VGS/CardHolderNameField.js +0 -14
  261. package/lib/module/components/SecureFields/VGS/CardHolderNameField.js.map +0 -1
  262. package/lib/module/components/SecureFields/VGS/CardNumberField.js +0 -14
  263. package/lib/module/components/SecureFields/VGS/CardNumberField.js.map +0 -1
  264. package/lib/module/components/SecureFields/VGS/CollectManager.js +0 -45
  265. package/lib/module/components/SecureFields/VGS/CollectManager.js.map +0 -1
  266. package/lib/module/components/SecureFields/VGS/ExpDateField.js +0 -14
  267. package/lib/module/components/SecureFields/VGS/ExpDateField.js.map +0 -1
  268. package/lib/module/components/SecureFields/VGS/TextField.js +0 -17
  269. package/lib/module/components/SecureFields/VGS/TextField.js.map +0 -1
  270. package/lib/module/components/SecureFields/VGS/ZipCodeField.js +0 -14
  271. package/lib/module/components/SecureFields/VGS/ZipCodeField.js.map +0 -1
  272. package/lib/module/components/SecureFields/index.js +0 -17
  273. package/lib/module/components/SecureFields/index.js.map +0 -1
  274. package/lib/typescript/components/ApplePay/PayEngineApplePay.d.ts +0 -12
  275. package/lib/typescript/components/ApplePay/index.d.ts +0 -7
  276. package/lib/typescript/components/ApplePay/interfaces.d.ts +0 -20
  277. package/lib/typescript/components/CreditCardForm/index.d.ts +0 -3
  278. package/lib/typescript/components/GooglePay/PayEngineGooglePay.d.ts +0 -10
  279. package/lib/typescript/components/GooglePay/index.d.ts +0 -7
  280. package/lib/typescript/components/GooglePay/interfaces.d.ts +0 -38
  281. package/lib/typescript/components/Legacy/CreditCardFormLegacy.d.ts +0 -4
  282. package/lib/typescript/components/SecureFields/VGS/CVCField.d.ts +0 -10
  283. package/lib/typescript/components/SecureFields/VGS/CardHolderNameField.d.ts +0 -10
  284. package/lib/typescript/components/SecureFields/VGS/CardNumberField.d.ts +0 -10
  285. package/lib/typescript/components/SecureFields/VGS/CollectManager.d.ts +0 -12
  286. package/lib/typescript/components/SecureFields/VGS/ExpDateField.d.ts +0 -10
  287. package/lib/typescript/components/SecureFields/VGS/TextField.d.ts +0 -14
  288. package/lib/typescript/components/SecureFields/VGS/ZipCodeField.d.ts +0 -10
  289. package/lib/typescript/components/SecureFields/index.d.ts +0 -16
  290. package/src/components/ApplePay/PayEngineApplePay.ts +0 -61
  291. package/src/components/ApplePay/index.ts +0 -32
  292. package/src/components/ApplePay/interfaces.ts +0 -25
  293. package/src/components/CreditCardForm/index.tsx +0 -43
  294. package/src/components/GooglePay/PayEngineGooglePay.ts +0 -48
  295. package/src/components/GooglePay/index.ts +0 -39
  296. package/src/components/GooglePay/interfaces.ts +0 -42
  297. package/src/components/Legacy/CreditCardFormLegacy.tsx +0 -292
  298. package/src/components/SecureFields/VGS/CVCField.tsx +0 -21
  299. package/src/components/SecureFields/VGS/CardHolderNameField.tsx +0 -21
  300. package/src/components/SecureFields/VGS/CardNumberField.tsx +0 -21
  301. package/src/components/SecureFields/VGS/CollectManager.tsx +0 -74
  302. package/src/components/SecureFields/VGS/ExpDateField.tsx +0 -21
  303. package/src/components/SecureFields/VGS/TextField.tsx +0 -27
  304. package/src/components/SecureFields/VGS/ZipCodeField.tsx +0 -21
  305. package/src/components/SecureFields/index.ts +0 -17
  306. /package/android/.gradle/{5.6.4 → 6.1.1}/fileChanges/last-build.bin +0 -0
  307. /package/android/.gradle/{5.6.4 → 6.1.1}/gc.properties +0 -0
  308. /package/android/{vgscollect-1.7.2-debug.aar → securefields-1.7.2-debug.aar} +0 -0
  309. /package/ios/{Payengine-Bridging-Header.h → Sources/Payengine-Bridging-Header.h} +0 -0
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import { PureComponent } from 'react';
3
- import { requireNativeComponent } from 'react-native';
4
-
5
- class CardHolderNameField extends PureComponent {
6
- render() {
7
- return /*#__PURE__*/React.createElement(RTCCardHolderNameField, this.props);
8
- }
9
-
10
- }
11
-
12
- const RTCCardHolderNameField = requireNativeComponent('VGSCardHolderNameField');
13
- export default CardHolderNameField;
14
- //# sourceMappingURL=CardHolderNameField.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","PureComponent","requireNativeComponent","CardHolderNameField","render","props","RTCCardHolderNameField"],"sources":["CardHolderNameField.tsx"],"sourcesContent":["import React from 'react'\nimport { PureComponent } from 'react';\nimport { requireNativeComponent, StyleProp, ViewStyle } from 'react-native';\n\n\n\ninterface CardHolderNameFieldProps {\n placeholder?: string\n style?: StyleProp<ViewStyle>\n}\n\nclass CardHolderNameField extends PureComponent<CardHolderNameFieldProps> {\n\n render() {\n return <RTCCardHolderNameField {...this.props} />\n }\n}\n\nconst RTCCardHolderNameField = requireNativeComponent('VGSCardHolderNameField');\n\nexport default CardHolderNameField;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,aAAT,QAA8B,OAA9B;AACA,SAASC,sBAAT,QAA6D,cAA7D;;AASA,MAAMC,mBAAN,SAAkCF,aAAlC,CAA0E;EAExEG,MAAM,GAAG;IACP,oBAAO,oBAAC,sBAAD,EAA4B,KAAKC,KAAjC,CAAP;EACD;;AAJuE;;AAO1E,MAAMC,sBAAsB,GAAGJ,sBAAsB,CAAC,wBAAD,CAArD;AAEA,eAAeC,mBAAf"}
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import { PureComponent } from 'react';
3
- import { requireNativeComponent } from 'react-native';
4
-
5
- class CardNumberField extends PureComponent {
6
- render() {
7
- return /*#__PURE__*/React.createElement(RTCCardNumberField, this.props);
8
- }
9
-
10
- }
11
-
12
- const RTCCardNumberField = requireNativeComponent('VGSCardNumberField');
13
- export default CardNumberField;
14
- //# sourceMappingURL=CardNumberField.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","PureComponent","requireNativeComponent","CardNumberField","render","props","RTCCardNumberField"],"sources":["CardNumberField.tsx"],"sourcesContent":["import React from 'react'\nimport { PureComponent } from 'react';\nimport { requireNativeComponent, StyleProp, ViewStyle } from 'react-native';\n\n\n\ninterface CardNumberFieldProps {\n placeholder?: string\n style?: StyleProp<ViewStyle>\n}\n\nclass CardNumberField extends PureComponent<CardNumberFieldProps> {\n\n render() {\n return <RTCCardNumberField {...this.props} />\n }\n}\n\nconst RTCCardNumberField = requireNativeComponent('VGSCardNumberField');\n\nexport default CardNumberField;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,aAAT,QAA8B,OAA9B;AACA,SAASC,sBAAT,QAA6D,cAA7D;;AASA,MAAMC,eAAN,SAA8BF,aAA9B,CAAkE;EAEhEG,MAAM,GAAG;IACP,oBAAO,oBAAC,kBAAD,EAAwB,KAAKC,KAA7B,CAAP;EACD;;AAJ+D;;AAOlE,MAAMC,kBAAkB,GAAGJ,sBAAsB,CAAC,oBAAD,CAAjD;AAEA,eAAeC,eAAf"}
@@ -1,45 +0,0 @@
1
- import * as React from 'react';
2
- import { Text, NativeModules } from 'react-native';
3
- import { createHttpClient } from '../../../utils';
4
- const NativeVGSCollectManager = NativeModules.VGSCollectManager;
5
- const CollectManager = /*#__PURE__*/React.forwardRef((props, ref) => {
6
- React.useImperativeHandle(ref, () => ({
7
- createCard: merchantId => {
8
- return NativeVGSCollectManager.createCard(merchantId);
9
- },
10
- cardBankAccount: merchantId => {
11
- return NativeVGSCollectManager.createBankAccount(merchantId);
12
- }
13
- }));
14
- const [loading, setLoading] = React.useState(true);
15
- const [error, setError] = React.useState('');
16
- React.useEffect(() => {
17
- const configure = async () => {
18
- setLoading(true);
19
-
20
- try {
21
- const http = createHttpClient(props.config);
22
- const resp = await http.get('/api/setting/secure-fields');
23
- const {
24
- vault,
25
- environment,
26
- cname,
27
- vgs_satellite_port
28
- } = resp.data.data;
29
- NativeVGSCollectManager.setConfiguration(props.config.publicKey, vault, environment, cname.replace(/[^a-zA-Z\.]/g, ''), Number(vgs_satellite_port));
30
- } catch (e) {
31
- console.log({
32
- error: e
33
- });
34
- setError(e.message);
35
- } finally {
36
- setLoading(false);
37
- }
38
- };
39
-
40
- configure();
41
- }, []);
42
- return /*#__PURE__*/React.createElement(React.Fragment, null, loading ? /*#__PURE__*/React.createElement(Text, null, "Loading") : error.length ? /*#__PURE__*/React.createElement(Text, null, error) : props.children);
43
- });
44
- export default CollectManager;
45
- //# sourceMappingURL=CollectManager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","Text","NativeModules","createHttpClient","NativeVGSCollectManager","VGSCollectManager","CollectManager","forwardRef","props","ref","useImperativeHandle","createCard","merchantId","cardBankAccount","createBankAccount","loading","setLoading","useState","error","setError","useEffect","configure","http","config","resp","get","vault","environment","cname","vgs_satellite_port","data","setConfiguration","publicKey","replace","Number","e","console","log","message","length","children"],"sources":["CollectManager.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Text, NativeModules } from 'react-native';\nimport { createHttpClient } from '../../../utils';\nimport type { IPayEngineConfig } from '../../../interfaces/index';\n\nconst NativeVGSCollectManager = NativeModules.VGSCollectManager;\n\nexport interface CollectManagerProps {\n config: IPayEngineConfig;\n children: JSX.Element | JSX.Element[];\n}\n\nexport interface VGSCollectManagerMethods {\n createCard: (merchantId?: string) => void;\n cardBankAccount: (merchantId?: string) => void;\n}\n\nconst CollectManager = React.forwardRef<\n VGSCollectManagerMethods,\n CollectManagerProps\n>((props, ref) => {\n React.useImperativeHandle(ref, () => ({\n createCard: (merchantId?: string) => {\n return NativeVGSCollectManager.createCard(merchantId);\n },\n cardBankAccount: (merchantId?: string) => {\n return NativeVGSCollectManager.createBankAccount(merchantId);\n },\n }));\n\n const [loading, setLoading] = React.useState(true);\n const [error, setError] = React.useState('');\n\n React.useEffect(() => {\n const configure = async () => {\n setLoading(true);\n try {\n const http = createHttpClient(props.config);\n const resp = await http.get('/api/setting/secure-fields');\n const { vault, environment, cname, vgs_satellite_port } =\n resp.data.data;\n\n NativeVGSCollectManager.setConfiguration(\n props.config.publicKey,\n vault,\n environment,\n cname.replace(/[^a-zA-Z\\.]/g, ''),\n Number(vgs_satellite_port)\n );\n } catch (e: any) {\n console.log({ error: e });\n setError(e.message);\n } finally {\n setLoading(false);\n }\n };\n\n configure();\n }, []);\n\n return (\n <React.Fragment>\n {loading ? (\n <Text>Loading</Text>\n ) : error.length ? (\n <Text>{error}</Text>\n ) : (\n props.children\n )}\n </React.Fragment>\n );\n});\n\nexport default CollectManager;\n"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,EAAeC,aAAf,QAAoC,cAApC;AACA,SAASC,gBAAT,QAAiC,gBAAjC;AAGA,MAAMC,uBAAuB,GAAGF,aAAa,CAACG,iBAA9C;AAYA,MAAMC,cAAc,gBAAGN,KAAK,CAACO,UAAN,CAGrB,CAACC,KAAD,EAAQC,GAAR,KAAgB;EAChBT,KAAK,CAACU,mBAAN,CAA0BD,GAA1B,EAA+B,OAAO;IACpCE,UAAU,EAAGC,UAAD,IAAyB;MACnC,OAAOR,uBAAuB,CAACO,UAAxB,CAAmCC,UAAnC,CAAP;IACD,CAHmC;IAIpCC,eAAe,EAAGD,UAAD,IAAyB;MACxC,OAAOR,uBAAuB,CAACU,iBAAxB,CAA0CF,UAA1C,CAAP;IACD;EANmC,CAAP,CAA/B;EASA,MAAM,CAACG,OAAD,EAAUC,UAAV,IAAwBhB,KAAK,CAACiB,QAAN,CAAe,IAAf,CAA9B;EACA,MAAM,CAACC,KAAD,EAAQC,QAAR,IAAoBnB,KAAK,CAACiB,QAAN,CAAe,EAAf,CAA1B;EAEAjB,KAAK,CAACoB,SAAN,CAAgB,MAAM;IACpB,MAAMC,SAAS,GAAG,YAAY;MAC5BL,UAAU,CAAC,IAAD,CAAV;;MACA,IAAI;QACF,MAAMM,IAAI,GAAGnB,gBAAgB,CAACK,KAAK,CAACe,MAAP,CAA7B;QACA,MAAMC,IAAI,GAAG,MAAMF,IAAI,CAACG,GAAL,CAAS,4BAAT,CAAnB;QACA,MAAM;UAAEC,KAAF;UAASC,WAAT;UAAsBC,KAAtB;UAA6BC;QAA7B,IACJL,IAAI,CAACM,IAAL,CAAUA,IADZ;QAGA1B,uBAAuB,CAAC2B,gBAAxB,CACEvB,KAAK,CAACe,MAAN,CAAaS,SADf,EAEEN,KAFF,EAGEC,WAHF,EAIEC,KAAK,CAACK,OAAN,CAAc,cAAd,EAA8B,EAA9B,CAJF,EAKEC,MAAM,CAACL,kBAAD,CALR;MAOD,CAbD,CAaE,OAAOM,CAAP,EAAe;QACfC,OAAO,CAACC,GAAR,CAAY;UAAEnB,KAAK,EAAEiB;QAAT,CAAZ;QACAhB,QAAQ,CAACgB,CAAC,CAACG,OAAH,CAAR;MACD,CAhBD,SAgBU;QACRtB,UAAU,CAAC,KAAD,CAAV;MACD;IACF,CArBD;;IAuBAK,SAAS;EACV,CAzBD,EAyBG,EAzBH;EA2BA,oBACE,oBAAC,KAAD,CAAO,QAAP,QACGN,OAAO,gBACN,oBAAC,IAAD,kBADM,GAEJG,KAAK,CAACqB,MAAN,gBACF,oBAAC,IAAD,QAAOrB,KAAP,CADE,GAGFV,KAAK,CAACgC,QANV,CADF;AAWD,CAtDsB,CAAvB;AAwDA,eAAelC,cAAf"}
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import { PureComponent } from 'react';
3
- import { requireNativeComponent } from 'react-native';
4
-
5
- class ExpDateField extends PureComponent {
6
- render() {
7
- return /*#__PURE__*/React.createElement(RTCExpDateField, this.props);
8
- }
9
-
10
- }
11
-
12
- const RTCExpDateField = requireNativeComponent('VGSExpDateField');
13
- export default ExpDateField;
14
- //# sourceMappingURL=ExpDateField.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","PureComponent","requireNativeComponent","ExpDateField","render","props","RTCExpDateField"],"sources":["ExpDateField.tsx"],"sourcesContent":["import React from 'react'\nimport { PureComponent } from 'react';\nimport { requireNativeComponent, StyleProp, ViewStyle } from 'react-native';\n\n\n\ninterface ExpDateFieldProps {\n placeholder?: string\n style?: StyleProp<ViewStyle>\n}\n\nclass ExpDateField extends PureComponent<ExpDateFieldProps> {\n\n render() {\n return <RTCExpDateField {...this.props} />\n }\n}\n\nconst RTCExpDateField = requireNativeComponent('VGSExpDateField');\n\nexport default ExpDateField;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,aAAT,QAA8B,OAA9B;AACA,SAASC,sBAAT,QAA6D,cAA7D;;AASA,MAAMC,YAAN,SAA2BF,aAA3B,CAA4D;EAE1DG,MAAM,GAAG;IACP,oBAAO,oBAAC,eAAD,EAAqB,KAAKC,KAA1B,CAAP;EACD;;AAJyD;;AAO5D,MAAMC,eAAe,GAAGJ,sBAAsB,CAAC,iBAAD,CAA9C;AAEA,eAAeC,YAAf"}
@@ -1,17 +0,0 @@
1
- import React, { PureComponent } from 'react';
2
- import { requireNativeComponent } from 'react-native';
3
-
4
- class TextField extends PureComponent {
5
- constructor(props) {
6
- super(props);
7
- }
8
-
9
- render() {
10
- return /*#__PURE__*/React.createElement(RTCTextField, this.props);
11
- }
12
-
13
- }
14
-
15
- const RTCTextField = requireNativeComponent('VGSTextField');
16
- export default TextField;
17
- //# sourceMappingURL=TextField.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","PureComponent","requireNativeComponent","TextField","constructor","props","render","RTCTextField"],"sources":["TextField.tsx"],"sourcesContent":["import React, { PureComponent } from 'react';\nimport { requireNativeComponent, StyleProp, ViewStyle } from 'react-native';\n\n\n\ninterface TextFieldProps {\n name?: string\n placeholder?: string\n maxLength?: number\n pattern?: string\n style?: StyleProp<ViewStyle>\n}\n\nclass TextField extends PureComponent<TextFieldProps> {\n\n constructor(props: TextFieldProps) {\n super(props)\n }\n\n render() {\n return <RTCTextField {...this.props} />\n }\n}\n\nconst RTCTextField = requireNativeComponent('VGSTextField');\n\nexport default TextField;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,aAAhB,QAAqC,OAArC;AACA,SAASC,sBAAT,QAA6D,cAA7D;;AAYA,MAAMC,SAAN,SAAwBF,aAAxB,CAAsD;EAEpDG,WAAW,CAACC,KAAD,EAAwB;IACjC,MAAMA,KAAN;EACD;;EAEDC,MAAM,GAAG;IACP,oBAAO,oBAAC,YAAD,EAAkB,KAAKD,KAAvB,CAAP;EACD;;AARmD;;AAWtD,MAAME,YAAY,GAAGL,sBAAsB,CAAC,cAAD,CAA3C;AAEA,eAAeC,SAAf"}
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import { PureComponent } from 'react';
3
- import { requireNativeComponent } from 'react-native';
4
-
5
- class ZipCodeField extends PureComponent {
6
- render() {
7
- return /*#__PURE__*/React.createElement(RTCZipCodeField, this.props);
8
- }
9
-
10
- }
11
-
12
- const RTCZipCodeField = requireNativeComponent('VGSZipCodeField');
13
- export default ZipCodeField;
14
- //# sourceMappingURL=ZipCodeField.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","PureComponent","requireNativeComponent","ZipCodeField","render","props","RTCZipCodeField"],"sources":["ZipCodeField.tsx"],"sourcesContent":["import React from 'react'\nimport { PureComponent } from 'react';\nimport { requireNativeComponent, StyleProp, ViewStyle } from 'react-native';\n\n\n\ninterface ZipCodeFieldProps {\n placeholder?: string\n style?: StyleProp<ViewStyle>\n}\n\nclass ZipCodeField extends PureComponent<ZipCodeFieldProps> {\n\n render() {\n return <RTCZipCodeField {...this.props} />\n }\n}\n\nconst RTCZipCodeField = requireNativeComponent('VGSZipCodeField');\n\nexport default ZipCodeField;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,aAAT,QAA8B,OAA9B;AACA,SAASC,sBAAT,QAA6D,cAA7D;;AASA,MAAMC,YAAN,SAA2BF,aAA3B,CAA4D;EAE1DG,MAAM,GAAG;IACP,oBAAO,oBAAC,eAAD,EAAqB,KAAKC,KAA1B,CAAP;EACD;;AAJyD;;AAO5D,MAAMC,eAAe,GAAGJ,sBAAsB,CAAC,iBAAD,CAA9C;AAEA,eAAeC,YAAf"}
@@ -1,17 +0,0 @@
1
- import CardNumberField from "./VGS/CardNumberField";
2
- import CVCField from "./VGS/CVCField";
3
- import ExpDateTextField from "./VGS/ExpDateField";
4
- import CollectManager from "./VGS/CollectManager";
5
- import TextField from './VGS/TextField';
6
- import CardHolderNameField from './VGS/CardHolderNameField';
7
- import ZipCodeField from './VGS/ZipCodeField';
8
- export const SecureFields = {
9
- CollectManager,
10
- ExpDateTextField,
11
- CardNumberField,
12
- CVCField,
13
- CardHolderNameField,
14
- ZipCodeField,
15
- TextField
16
- };
17
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["CardNumberField","CVCField","ExpDateTextField","CollectManager","TextField","CardHolderNameField","ZipCodeField","SecureFields"],"sources":["index.ts"],"sourcesContent":["import CardNumberField from \"./VGS/CardNumberField\";\nimport CVCField from \"./VGS/CVCField\";\nimport ExpDateTextField from \"./VGS/ExpDateField\";\nimport CollectManager from \"./VGS/CollectManager\";\nimport TextField from './VGS/TextField';\nimport CardHolderNameField from './VGS/CardHolderNameField';\nimport ZipCodeField from './VGS/ZipCodeField';\n\nexport const SecureFields = {\n CollectManager,\n ExpDateTextField,\n CardNumberField,\n CVCField,\n CardHolderNameField,\n ZipCodeField,\n TextField\n}\n"],"mappings":"AAAA,OAAOA,eAAP,MAA4B,uBAA5B;AACA,OAAOC,QAAP,MAAqB,gBAArB;AACA,OAAOC,gBAAP,MAA6B,oBAA7B;AACA,OAAOC,cAAP,MAA2B,sBAA3B;AACA,OAAOC,SAAP,MAAsB,iBAAtB;AACA,OAAOC,mBAAP,MAAgC,2BAAhC;AACA,OAAOC,YAAP,MAAyB,oBAAzB;AAEA,OAAO,MAAMC,YAAY,GAAG;EAC1BJ,cAD0B;EAE1BD,gBAF0B;EAG1BF,eAH0B;EAI1BC,QAJ0B;EAK1BI,mBAL0B;EAM1BC,YAN0B;EAO1BF;AAP0B,CAArB"}
@@ -1,12 +0,0 @@
1
- import type { IPayEngineConfig, PaymentRequest } from '../../interfaces';
2
- import type { IApplePay } from './interfaces';
3
- export declare class PayEngineApplePay implements IApplePay {
4
- private applePay;
5
- private payEngineConfig;
6
- private config?;
7
- private method?;
8
- private details?;
9
- constructor(payEngineConfig: IPayEngineConfig);
10
- canMakePayments(merchantId: string, paymentConfig: PaymentRequest): Promise<boolean>;
11
- start(): Promise<any>;
12
- }
@@ -1,7 +0,0 @@
1
- import type { ApplePayDetailsData, ApplePayMethodData, IApplePay } from './interfaces';
2
- export default class ApplePay implements IApplePay {
3
- private isReady;
4
- constructor();
5
- start(): Promise<any>;
6
- canMakePayments(method: ApplePayMethodData, details: ApplePayDetailsData): Promise<boolean>;
7
- }
@@ -1,20 +0,0 @@
1
- export interface IApplePay {
2
- canMakePayments: (...args: any) => Promise<boolean>;
3
- start: (...args: any) => Promise<any>;
4
- }
5
- declare type Network = 'Visa' | 'MasterCard' | 'AmEx';
6
- export interface ApplePayMethodData {
7
- countryCode: string;
8
- currencyCode: string;
9
- supportedNetworks: Network[];
10
- merchantIdentifier: string;
11
- }
12
- export interface ApplePayDetail {
13
- label: string;
14
- amount: number;
15
- }
16
- export interface ApplePayDetailsData {
17
- total: ApplePayDetail;
18
- }
19
- export declare type ApplePayTransactionIdentifier = string;
20
- export {};
@@ -1,3 +0,0 @@
1
- import * as React from 'react';
2
- import type { CreditCardFormMethods, CreditCardFormProps } from '../../interfaces/index';
3
- export declare const CreditCardForm: React.ForwardRefExoticComponent<CreditCardFormProps & React.RefAttributes<CreditCardFormMethods>>;
@@ -1,10 +0,0 @@
1
- import type { IPayEngineConfig, PaymentRequest } from '../../interfaces';
2
- import type { IGooglePay } from './interfaces';
3
- export declare class PayEngineGooglePay implements IGooglePay {
4
- private googlePay;
5
- private payEngineConfig;
6
- private config?;
7
- constructor(payEngineConfig: IPayEngineConfig);
8
- canMakePayments(merchantId: string): Promise<any>;
9
- start(paymentConfig: PaymentRequest): Promise<any>;
10
- }
@@ -1,7 +0,0 @@
1
- import type { GooglePayAllowedCardAuthMethods, GooglePayAllowedCardNetworks, GooglePayRequestData, IGooglePay } from './interfaces';
2
- export default class GooglePay implements IGooglePay {
3
- constructor();
4
- setProduction(isProduction: boolean): Promise<any>;
5
- canMakePayments(allowedCardNetworks: GooglePayAllowedCardNetworks, allowedCardAuthMethods: GooglePayAllowedCardAuthMethods): Promise<any>;
6
- start(requestData: GooglePayRequestData): Promise<any>;
7
- }
@@ -1,38 +0,0 @@
1
- export interface IGooglePay {
2
- canMakePayments: (...args: any) => Promise<boolean>;
3
- start: (...args: any) => Promise<any>;
4
- }
5
- declare type NetworkType = 'AMEX' | 'DISCOVER' | 'JCB' | 'MASTERCARD' | 'VISA';
6
- declare type MethodType = 'PAN_ONLY' | 'CRYPTOGRAM_3DS';
7
- export declare type GooglePayAllowedCardNetworks = NetworkType[];
8
- export declare type GooglePayAllowedCardAuthMethods = MethodType[];
9
- export declare type TokenizationSpecificationType = 'PAYMENT_GATEWAY' | 'DIRECT';
10
- export interface GooglePayRequestData {
11
- production?: boolean;
12
- cardPaymentMethod: {
13
- tokenizationSpecification: {
14
- type: TokenizationSpecificationType;
15
- /** only with type: PAYMENT_GATEWAY */
16
- gateway?: string;
17
- /** only with type: PAYMENT_GATEWAY */
18
- gatewayMerchantId?: string;
19
- /** only with gateway: stripe */
20
- stripe?: {
21
- publishableKey: string;
22
- version: string;
23
- };
24
- /** only with type: DIRECT */
25
- publicKey?: string;
26
- };
27
- allowedCardNetworks: GooglePayAllowedCardNetworks;
28
- allowedCardAuthMethods: GooglePayAllowedCardAuthMethods;
29
- };
30
- transaction: {
31
- totalPrice: string;
32
- totalPriceStatus: string;
33
- currencyCode: string;
34
- countryCode: string;
35
- };
36
- merchantName: string;
37
- }
38
- export {};
@@ -1,4 +0,0 @@
1
- import * as React from 'react';
2
- import type { CreditCardFormMethods, CreditCardFormProps } from '../../interfaces/index';
3
- declare const CreditCardFormLegacy: React.ForwardRefExoticComponent<CreditCardFormProps & React.RefAttributes<CreditCardFormMethods>>;
4
- export default CreditCardFormLegacy;
@@ -1,10 +0,0 @@
1
- import { PureComponent } from 'react';
2
- import { StyleProp, ViewStyle } from 'react-native';
3
- interface CVCFieldProps {
4
- placeholder?: string;
5
- style?: StyleProp<ViewStyle>;
6
- }
7
- declare class CVCField extends PureComponent<CVCFieldProps> {
8
- render(): JSX.Element;
9
- }
10
- export default CVCField;
@@ -1,10 +0,0 @@
1
- import { PureComponent } from 'react';
2
- import { StyleProp, ViewStyle } from 'react-native';
3
- interface CardHolderNameFieldProps {
4
- placeholder?: string;
5
- style?: StyleProp<ViewStyle>;
6
- }
7
- declare class CardHolderNameField extends PureComponent<CardHolderNameFieldProps> {
8
- render(): JSX.Element;
9
- }
10
- export default CardHolderNameField;
@@ -1,10 +0,0 @@
1
- import { PureComponent } from 'react';
2
- import { StyleProp, ViewStyle } from 'react-native';
3
- interface CardNumberFieldProps {
4
- placeholder?: string;
5
- style?: StyleProp<ViewStyle>;
6
- }
7
- declare class CardNumberField extends PureComponent<CardNumberFieldProps> {
8
- render(): JSX.Element;
9
- }
10
- export default CardNumberField;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import type { IPayEngineConfig } from '../../../interfaces/index';
3
- export interface CollectManagerProps {
4
- config: IPayEngineConfig;
5
- children: JSX.Element | JSX.Element[];
6
- }
7
- export interface VGSCollectManagerMethods {
8
- createCard: (merchantId?: string) => void;
9
- cardBankAccount: (merchantId?: string) => void;
10
- }
11
- declare const CollectManager: React.ForwardRefExoticComponent<CollectManagerProps & React.RefAttributes<VGSCollectManagerMethods>>;
12
- export default CollectManager;
@@ -1,10 +0,0 @@
1
- import { PureComponent } from 'react';
2
- import { StyleProp, ViewStyle } from 'react-native';
3
- interface ExpDateFieldProps {
4
- placeholder?: string;
5
- style?: StyleProp<ViewStyle>;
6
- }
7
- declare class ExpDateField extends PureComponent<ExpDateFieldProps> {
8
- render(): JSX.Element;
9
- }
10
- export default ExpDateField;
@@ -1,14 +0,0 @@
1
- import { PureComponent } from 'react';
2
- import { StyleProp, ViewStyle } from 'react-native';
3
- interface TextFieldProps {
4
- name?: string;
5
- placeholder?: string;
6
- maxLength?: number;
7
- pattern?: string;
8
- style?: StyleProp<ViewStyle>;
9
- }
10
- declare class TextField extends PureComponent<TextFieldProps> {
11
- constructor(props: TextFieldProps);
12
- render(): JSX.Element;
13
- }
14
- export default TextField;
@@ -1,10 +0,0 @@
1
- import { PureComponent } from 'react';
2
- import { StyleProp, ViewStyle } from 'react-native';
3
- interface ZipCodeFieldProps {
4
- placeholder?: string;
5
- style?: StyleProp<ViewStyle>;
6
- }
7
- declare class ZipCodeField extends PureComponent<ZipCodeFieldProps> {
8
- render(): JSX.Element;
9
- }
10
- export default ZipCodeField;
@@ -1,16 +0,0 @@
1
- /// <reference types="react" />
2
- import CardNumberField from "./VGS/CardNumberField";
3
- import CVCField from "./VGS/CVCField";
4
- import ExpDateTextField from "./VGS/ExpDateField";
5
- import TextField from './VGS/TextField';
6
- import CardHolderNameField from './VGS/CardHolderNameField';
7
- import ZipCodeField from './VGS/ZipCodeField';
8
- export declare const SecureFields: {
9
- CollectManager: import("react").ForwardRefExoticComponent<import("./VGS/CollectManager").CollectManagerProps & import("react").RefAttributes<import("./VGS/CollectManager").VGSCollectManagerMethods>>;
10
- ExpDateTextField: typeof ExpDateTextField;
11
- CardNumberField: typeof CardNumberField;
12
- CVCField: typeof CVCField;
13
- CardHolderNameField: typeof CardHolderNameField;
14
- ZipCodeField: typeof ZipCodeField;
15
- TextField: typeof TextField;
16
- };
@@ -1,61 +0,0 @@
1
- import ApplePay from '.';
2
- import type {
3
- IPayEngineConfig,
4
- MobilePaymentConfig,
5
- PaymentRequest,
6
- } from '../../interfaces';
7
- import { createHttpClient } from '../../utils';
8
- import type {
9
- ApplePayDetailsData,
10
- ApplePayMethodData,
11
- IApplePay,
12
- } from './interfaces';
13
-
14
- export class PayEngineApplePay implements IApplePay {
15
- private applePay: ApplePay;
16
- private payEngineConfig: IPayEngineConfig;
17
- private config?: MobilePaymentConfig;
18
- private method?: ApplePayMethodData;
19
- private details?: ApplePayDetailsData;
20
-
21
- constructor(payEngineConfig: IPayEngineConfig) {
22
- this.payEngineConfig = payEngineConfig;
23
- this.applePay = new ApplePay();
24
- }
25
-
26
- public async canMakePayments(merchantId: string, paymentConfig: PaymentRequest) {
27
- const client = createHttpClient(this.payEngineConfig);
28
- const { data } = await client.get(
29
- `/api/mobile-payment/config?merchant_id=${merchantId}`
30
- );
31
- this.config = data.data;
32
- console.log('config', this.config);
33
- this.method = {
34
- countryCode: paymentConfig.countryCode ?? this.config!.country,
35
- currencyCode: paymentConfig.currencyCode ?? this.config!.currency,
36
- merchantIdentifier: 'merchant.payengine.tunnel3000cc',
37
- supportedNetworks: ['Visa', 'MasterCard', 'AmEx'],
38
- };
39
-
40
- this.details = {
41
- total: {
42
- label: this.config!.apple_pay.merchantName,
43
- amount: 1.00,
44
- },
45
- };
46
- return await this.applePay.canMakePayments(this.method, this.details);
47
- }
48
-
49
- public async start() {
50
- if (!this.config) {
51
- throw new Error('You must call `canMakePayments` first');
52
- }
53
-
54
- const result = await this.applePay.start();
55
- try {
56
- return JSON.parse(result);
57
- } catch {
58
- return result;
59
- }
60
- }
61
- }
@@ -1,32 +0,0 @@
1
- import { NativeModules, Platform } from 'react-native';
2
- import type { ApplePayDetailsData, ApplePayMethodData, IApplePay } from './interfaces';
3
-
4
- const { ApplePay: RNApplePay } = NativeModules;
5
-
6
- export default class ApplePay implements IApplePay {
7
- private isReady = false;
8
-
9
- constructor() {
10
- if (Platform.OS === 'ios') {
11
- if (!RNApplePay) {
12
- throw new Error('ApplePay is not defined');
13
- }
14
- } else {
15
- throw new Error('Apple Pay is supported (iOS only)');
16
- }
17
- }
18
-
19
- public async start() {
20
- if (!this.isReady) {
21
- throw new Error('Apple Pay is not ready')
22
- }
23
-
24
- return await RNApplePay.initApplePay();
25
- }
26
-
27
- public async canMakePayments(method: ApplePayMethodData, details: ApplePayDetailsData) {
28
- RNApplePay.invokeApplePay(method, details);
29
- this.isReady = await RNApplePay.canMakePayments();
30
- return this.isReady
31
- }
32
- }
@@ -1,25 +0,0 @@
1
- export interface IApplePay {
2
- canMakePayments: (...args: any) => Promise<boolean>
3
- start: (...args: any) => Promise<any>
4
- }
5
-
6
-
7
- type Network = 'Visa' | 'MasterCard' | 'AmEx';
8
-
9
- export interface ApplePayMethodData {
10
- countryCode: string;
11
- currencyCode: string;
12
- supportedNetworks: Network[];
13
- merchantIdentifier: string;
14
- }
15
-
16
- export interface ApplePayDetail {
17
- label: string;
18
- amount: number;
19
- }
20
-
21
- export interface ApplePayDetailsData {
22
- total: ApplePayDetail;
23
- }
24
-
25
- export type ApplePayTransactionIdentifier = string;
@@ -1,43 +0,0 @@
1
- import * as React from 'react';
2
- import { View, StyleSheet } from 'react-native';
3
- import { SecureFields } from '../SecureFields';
4
- import type { CreditCardFormMethods, CreditCardFormProps } from '../../interfaces/index';
5
-
6
- export const CreditCardForm = React.forwardRef<CreditCardFormMethods, CreditCardFormProps>((props, ref) => {
7
-
8
- React.useImperativeHandle(ref, () => ({
9
- createCard: async (merchantId?: string) => {
10
- return await secureFieldRef.current?.createCard(props.merchantId ?? merchantId)
11
- },
12
- }));
13
-
14
- const secureFieldRef = React.createRef<any>()
15
-
16
- return (
17
- <View style={[styles.container, props.style]}>
18
- <SecureFields.CollectManager ref={secureFieldRef} config={props.config}>
19
- <SecureFields.CardHolderNameField placeholder="Card holder name" style={styles.field} />
20
- <SecureFields.CardNumberField placeholder="Card number" style={styles.field} />
21
- <View style={{ display: 'flex', flexDirection: "row", width: '100%', height: 50, margin: 8 }}>
22
- <SecureFields.ExpDateTextField style={[styles.field, { flex: 1, margin: 0, marginRight: 10 }]} />
23
- <SecureFields.CVCField style={[styles.field, { flex: 1, margin: 0 }]} />
24
- </View>
25
- {props.showZipCode ? <SecureFields.ZipCodeField placeholder="Zip code" style={styles.field} /> : <></>}
26
- </SecureFields.CollectManager>
27
- </View>
28
- );
29
- });
30
-
31
- const styles = StyleSheet.create({
32
- container: {
33
- width: '100%',
34
- padding: 20,
35
- },
36
- field: {
37
- width: '100%',
38
- height: 50,
39
- margin: 8,
40
- padding: 5
41
- }
42
- });
43
-
@@ -1,48 +0,0 @@
1
- import GooglePay from '.';
2
- import type { IPayEngineConfig, MobilePaymentConfig, PaymentRequest } from '../../interfaces';
3
- import { createHttpClient } from '../../utils';
4
- import type { GooglePayRequestData, IGooglePay } from './interfaces';
5
-
6
- export class PayEngineGooglePay implements IGooglePay {
7
-
8
- private googlePay: GooglePay;
9
- private payEngineConfig: IPayEngineConfig;
10
- private config?: MobilePaymentConfig;
11
-
12
- constructor(payEngineConfig: IPayEngineConfig) {
13
- this.payEngineConfig = payEngineConfig;
14
- this.googlePay = new GooglePay()
15
- }
16
-
17
- public async canMakePayments(merchantId: string) {
18
- const client = createHttpClient(this.payEngineConfig);
19
- const { data } = await client.get(`/api/mobile-payment/config?merchant_id=${merchantId}`)
20
- this.config = data.data
21
- await this.googlePay.setProduction(Boolean(this.config!.google_pay.production))
22
- return await this.googlePay.canMakePayments(this.config!.google_pay.cardPaymentMethod.allowedCardNetworks, this.config!.google_pay.cardPaymentMethod.allowedCardAuthMethods)
23
- }
24
-
25
- public async start(paymentConfig: PaymentRequest) {
26
- if (!this.config) {
27
- throw new Error('You must call `canMakePayments` first')
28
- }
29
-
30
- const payload: GooglePayRequestData = {
31
- cardPaymentMethod: this.config!.google_pay.cardPaymentMethod,
32
- transaction: {
33
- totalPrice: String(paymentConfig.amount),
34
- totalPriceStatus: 'FINAL',
35
- currencyCode: paymentConfig.currencyCode ?? this.config!.currency,
36
- countryCode: paymentConfig.countryCode ?? this.config!.country
37
- },
38
- merchantName: this.config!.google_pay.merchantName
39
- }
40
-
41
- const result = await this.googlePay.start(payload);
42
- try {
43
- return JSON.parse(result)
44
- } catch {
45
- return result;
46
- }
47
- }
48
- }