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
@@ -1,153 +0,0 @@
1
- package com.reactnativepayengine.collect;
2
-
3
- import android.app.Activity;
4
- import android.content.Intent;
5
- import android.util.Log;
6
-
7
- import androidx.annotation.NonNull;
8
-
9
- import com.facebook.react.bridge.Promise;
10
- import com.facebook.react.bridge.ReactApplicationContext;
11
- import com.facebook.react.bridge.ReactContextBaseJavaModule;
12
- import com.facebook.react.bridge.ReactMethod;
13
- import com.facebook.react.modules.core.DeviceEventManagerModule;
14
- import com.reactnativepayengine.util.JSONObjectUtil;
15
- import com.verygoodsecurity.vgscollect.VGSCollectLogger;
16
- import com.verygoodsecurity.vgscollect.core.Environment;
17
- import com.verygoodsecurity.vgscollect.core.HTTPMethod;
18
- import com.verygoodsecurity.vgscollect.core.VGSCollect;
19
- import com.verygoodsecurity.vgscollect.core.model.network.VGSRequest;
20
- import com.verygoodsecurity.vgscollect.core.model.network.VGSResponse;
21
- import com.verygoodsecurity.vgscollect.core.model.state.FieldState;
22
- import com.verygoodsecurity.vgscollect.view.InputFieldView;
23
-
24
- import org.json.JSONException;
25
- import org.json.JSONObject;
26
-
27
- import java.util.HashMap;
28
- import java.util.List;
29
- import java.util.Optional;
30
-
31
- public class VGSCollectModule extends ReactContextBaseJavaModule {
32
-
33
- private static ReactApplicationContext reactContext;
34
-
35
- private VGSCollect collect;
36
- private String publicKey;
37
-
38
- public VGSCollectModule(ReactApplicationContext c) {
39
- super(c);
40
- reactContext = c;
41
- }
42
-
43
- @Override
44
- public void initialize() {
45
- super.initialize();
46
- // Activity activity = reactContext.getCurrentActivity();
47
- // collect = new VGSCollect.Builder(activity, "")
48
- // .create();
49
- }
50
-
51
- @NonNull
52
- @Override
53
- public String getName() {
54
- return "VGSCollectManager";
55
- }
56
-
57
- @ReactMethod
58
- public void setConfiguration(String publicKey, String vaultId, String environment, String cname,
59
- double vgsSatellitePort) {
60
- Log.e("test", "Create event called with name: " + vaultId + " and location: " + environment + " cname: " + cname);
61
-
62
- this.publicKey = publicKey;
63
- VGSCollectLogger.INSTANCE.setLogLevel(VGSCollectLogger.Level.DEBUG);
64
-
65
- Activity activity = reactContext.getCurrentActivity();
66
- collect = new VGSCollect.Builder(activity, vaultId)
67
- .setEnvironment(environment)
68
- // .setHostname(cname)
69
- // .setPort((int) Math.round(vgsSatellitePort))
70
- .create();
71
-
72
- }
73
-
74
- @ReactMethod
75
- public void createCard(String merchantId, Promise promise) {
76
- this.submit("/api/cards", merchantId, promise);
77
- }
78
-
79
- @ReactMethod
80
- public void createBankAccount(String merchantId, Promise promise) {
81
- this.submit("/api/bank-accounts", merchantId, promise);
82
- }
83
-
84
- private void submit(String path, String merchantId, Promise promise) {
85
- HashMap<String, Object> customData = new HashMap<>();
86
- customData.put("pci_vault_provider", "vgs");
87
- if (merchantId != null && !merchantId.isEmpty()) {
88
- customData.put("merchant_id", merchantId);
89
- }
90
-
91
- String authHeader = "Signature key=\"" + this.publicKey
92
- + "\",algorithm=\"hmac-sha256\",identifier=\"secure-fields\",signature=\"\"";
93
- HashMap<String, String> headers = new HashMap<>();
94
- headers.put("Authorization", authHeader);
95
-
96
- List<FieldState> states = collect.getAllStates();
97
-
98
- for (int i = 0; i < states.size(); i++) {
99
- FieldState state = states.get(i);
100
-
101
- if (!state.isValid()) {
102
- String message = new StringBuilder("Field ")
103
- .append(state.getFieldName())
104
- .append(" is not valid.")
105
- .toString();
106
- promise.reject("validation_error", message);
107
- return;
108
- }
109
- if (state instanceof FieldState.CardNumberState) {
110
- FieldState.CardNumberState cardState = (FieldState.CardNumberState) state;
111
- customData.put("last_4", cardState.getNumber());
112
- customData.put("bin", cardState.getBin());
113
- customData.put("brand", cardState.getCardBrand());
114
- }
115
- }
116
-
117
- VGSRequest request = new VGSRequest.VGSRequestBuilder()
118
- .setMethod(HTTPMethod.POST)
119
- .setPath(path)
120
- .setCustomHeader(headers)
121
- .setCustomData(customData)
122
- .build();
123
-
124
- VGSResponse response = collect.submit(request);
125
- Log.e("test", "response " + response.getBody());
126
- if (response instanceof VGSResponse.SuccessResponse) {
127
- VGSResponse.SuccessResponse result = (VGSResponse.SuccessResponse) response;
128
- try {
129
- JSONObject jsonObj = new JSONObject(result.getBody());
130
- promise.resolve(JSONObjectUtil.convertJsonToMap(jsonObj.getJSONObject("data")));
131
- return;
132
- } catch (JSONException e) {
133
- e.printStackTrace();
134
- promise.reject("invalid_response", "We got success response but unable to parse it");
135
- }
136
- } else if (response instanceof VGSResponse.ErrorResponse) {
137
- VGSResponse.ErrorResponse error = (VGSResponse.ErrorResponse) response;
138
- promise.reject(String.valueOf(error.getErrorCode()), error.getLocalizeMessage());
139
- }
140
-
141
- }
142
-
143
- public void onActivityResult(final int requestCode, final int resultCode, final Intent data) {
144
- if (collect != null) {
145
- collect.onActivityResult(requestCode, resultCode, data);
146
- }
147
- }
148
-
149
- public void bindView(InputFieldView inputFieldView) {
150
- Log.e("test", "collect bindView " + inputFieldView.getFieldName() + " - Collect " + collect.getAllStates());
151
- collect.bindView(inputFieldView);
152
- }
153
- }
@@ -1,6 +0,0 @@
1
- package com.reactnativepayengine.collect;
2
- import com.verygoodsecurity.vgscollect.view.InputFieldView;
3
-
4
- public interface VGSCollectOnCreateViewInstanceListener {
5
- void onCreateViewInstance(InputFieldView inputFieldView);
6
- }
@@ -1,67 +0,0 @@
1
- package com.reactnativepayengine.collect.fields;
2
-
3
- import android.graphics.Rect;
4
- import android.graphics.drawable.Drawable;
5
-
6
- import androidx.annotation.NonNull;
7
- import androidx.annotation.Nullable;
8
-
9
- import com.facebook.react.bridge.ReactApplicationContext;
10
- import com.facebook.react.uimanager.SimpleViewManager;
11
- import com.facebook.react.uimanager.ThemedReactContext;
12
- import com.facebook.react.uimanager.annotations.ReactProp;
13
- import com.reactnativepayengine.collect.VGSCollectOnCreateViewInstanceListener;
14
- import com.verygoodsecurity.vgscollect.view.card.CardType;
15
- import com.verygoodsecurity.vgscollect.view.cvc.CVCIconAdapter;
16
- import com.verygoodsecurity.vgscollect.widget.CardVerificationCodeEditText;
17
- import com.verygoodsecurity.vgscollect.widget.VGSCardNumberEditText;
18
- import com.verygoodsecurity.vgscollect.widget.VGSTextInputLayout;
19
-
20
- import org.jetbrains.annotations.NotNull;
21
-
22
- public class VGSCVCField extends SimpleViewManager<VGSTextInputLayout> {
23
- private final VGSCollectOnCreateViewInstanceListener listener;
24
-
25
- private CardVerificationCodeEditText editText;
26
- private VGSTextInputLayout vgsTextInputLayout;
27
-
28
- ReactApplicationContext mCallerContext;
29
-
30
- public VGSCVCField(VGSCollectOnCreateViewInstanceListener listener, ReactApplicationContext reactContext) {
31
- this.listener = listener;
32
- mCallerContext = reactContext;
33
- }
34
-
35
- @Override
36
- public String getName() {
37
- return "VGSCVCField";
38
- }
39
-
40
- @NonNull
41
- @Override
42
- protected VGSTextInputLayout createViewInstance(@NonNull ThemedReactContext reactContext) {
43
- vgsTextInputLayout = new VGSTextInputLayout(reactContext);
44
- vgsTextInputLayout.setHint("CVC");
45
- editText = new CardVerificationCodeEditText(reactContext);
46
- editText.setIsRequired(true);
47
- editText.setFieldName("card_cvc");
48
- CVCIconAdapter adapter = new CVCIconAdapter(reactContext) {
49
- @Override
50
- protected Drawable getIcon(@NotNull CardType cardType, @Nullable String cardBrand, int cvcLength, @NotNull Rect r) {
51
- return super.getIcon(cardType, cardBrand, cvcLength, r);
52
- }
53
- };
54
- editText.setPreviewIconAdapter(adapter);
55
- editText.setPadding(10, 0, 10, 0);
56
-
57
- vgsTextInputLayout.addView(editText);
58
-
59
- this.listener.onCreateViewInstance(editText);
60
- return vgsTextInputLayout;
61
- }
62
-
63
- @ReactProp(name = "placeholder")
64
- public void setPlaceholder(VGSTextInputLayout view, @Nullable String placeholder) {
65
- vgsTextInputLayout.setHint(placeholder);
66
- }
67
- }
@@ -1,53 +0,0 @@
1
- package com.reactnativepayengine.collect.fields;
2
-
3
- import androidx.annotation.NonNull;
4
- import androidx.annotation.Nullable;
5
-
6
- import com.facebook.react.bridge.ReactApplicationContext;
7
- import com.facebook.react.uimanager.SimpleViewManager;
8
- import com.facebook.react.uimanager.ThemedReactContext;
9
- import com.facebook.react.uimanager.annotations.ReactProp;
10
- import com.reactnativepayengine.collect.VGSCollectOnCreateViewInstanceListener;
11
- import com.verygoodsecurity.vgscollect.widget.ExpirationDateEditText;
12
- import com.verygoodsecurity.vgscollect.widget.PersonNameEditText;
13
- import com.verygoodsecurity.vgscollect.widget.VGSTextInputLayout;
14
-
15
- public class VGSCardHolderNameField extends SimpleViewManager<VGSTextInputLayout> {
16
- private final VGSCollectOnCreateViewInstanceListener listener;
17
-
18
- private PersonNameEditText editText;
19
- private VGSTextInputLayout vgsTextInputLayout;
20
-
21
- ReactApplicationContext mCallerContext;
22
-
23
- public VGSCardHolderNameField(VGSCollectOnCreateViewInstanceListener listener, ReactApplicationContext reactContext) {
24
- this.listener = listener;
25
- mCallerContext = reactContext;
26
- }
27
-
28
- @Override
29
- public String getName() {
30
- return "VGSCardHolderNameField";
31
- }
32
-
33
- @NonNull
34
- @Override
35
- protected VGSTextInputLayout createViewInstance(@NonNull ThemedReactContext reactContext) {
36
- vgsTextInputLayout = new VGSTextInputLayout(reactContext);
37
- vgsTextInputLayout.setHint("Card holder name");
38
- editText = new PersonNameEditText(reactContext);
39
- editText.setIsRequired(true);
40
- editText.setFieldName("card_holder");
41
- editText.setPadding(10, 0, 10, 0);
42
-
43
- vgsTextInputLayout.addView(editText);
44
-
45
- this.listener.onCreateViewInstance(editText);
46
- return vgsTextInputLayout;
47
- }
48
-
49
- @ReactProp(name = "placeholder")
50
- public void setPlaceholder(VGSTextInputLayout view, @Nullable String placeholder) {
51
- vgsTextInputLayout.setHint(placeholder);
52
- }
53
- }
@@ -1,57 +0,0 @@
1
- package com.reactnativepayengine.collect.fields;
2
-
3
- import android.view.Gravity;
4
-
5
- import androidx.annotation.NonNull;
6
- import androidx.annotation.Nullable;
7
-
8
- import com.facebook.react.bridge.ReactApplicationContext;
9
- import com.facebook.react.uimanager.SimpleViewManager;
10
- import com.facebook.react.uimanager.ThemedReactContext;
11
- import com.facebook.react.uimanager.annotations.ReactProp;
12
- import com.reactnativepayengine.collect.VGSCollectOnCreateViewInstanceListener;
13
- import com.verygoodsecurity.vgscollect.widget.PersonNameEditText;
14
- import com.verygoodsecurity.vgscollect.widget.VGSCardNumberEditText;
15
- import com.verygoodsecurity.vgscollect.widget.VGSTextInputLayout;
16
-
17
- public class VGSCardNumberField extends SimpleViewManager<VGSTextInputLayout> {
18
- private final VGSCollectOnCreateViewInstanceListener listener;
19
-
20
- private VGSCardNumberEditText editText;
21
- private VGSTextInputLayout vgsTextInputLayout;
22
-
23
- ReactApplicationContext mCallerContext;
24
-
25
- public VGSCardNumberField(VGSCollectOnCreateViewInstanceListener listener, ReactApplicationContext reactContext) {
26
- this.listener = listener;
27
- mCallerContext = reactContext;
28
- }
29
-
30
- @Override
31
- public String getName() {
32
- return "VGSCardNumberField";
33
- }
34
-
35
- @NonNull
36
- @Override
37
- protected VGSTextInputLayout createViewInstance(@NonNull ThemedReactContext reactContext) {
38
- vgsTextInputLayout = new VGSTextInputLayout(reactContext);
39
- vgsTextInputLayout.setHint("Card number");
40
- editText = new VGSCardNumberEditText(reactContext);
41
- editText.setIsRequired(true);
42
- editText.setFieldName("card_number");
43
- editText.setDivider(' ');
44
- editText.setCardBrandIconGravity(Gravity.END);
45
- editText.setPadding(10, 0, 10, 0);
46
-
47
- vgsTextInputLayout.addView(editText);
48
-
49
- this.listener.onCreateViewInstance(editText);
50
- return vgsTextInputLayout;
51
- }
52
-
53
- @ReactProp(name = "placeholder")
54
- public void setPlaceholder(VGSTextInputLayout view, @Nullable String placeholder) {
55
- vgsTextInputLayout.setHint(placeholder);
56
- }
57
- }
@@ -1,54 +0,0 @@
1
- package com.reactnativepayengine.collect.fields;
2
-
3
- import androidx.annotation.NonNull;
4
- import androidx.annotation.Nullable;
5
-
6
- import com.facebook.react.bridge.ReactApplicationContext;
7
- import com.facebook.react.uimanager.SimpleViewManager;
8
- import com.facebook.react.uimanager.ThemedReactContext;
9
- import com.facebook.react.uimanager.annotations.ReactProp;
10
- import com.reactnativepayengine.collect.VGSCollectOnCreateViewInstanceListener;
11
- import com.verygoodsecurity.vgscollect.widget.ExpirationDateEditText;
12
- import com.verygoodsecurity.vgscollect.widget.VGSTextInputLayout;
13
-
14
- public class VGSExpDateField extends SimpleViewManager<VGSTextInputLayout> {
15
- private final VGSCollectOnCreateViewInstanceListener listener;
16
-
17
- private ExpirationDateEditText editText;
18
- private VGSTextInputLayout vgsTextInputLayout;
19
-
20
- ReactApplicationContext mCallerContext;
21
-
22
- public VGSExpDateField(VGSCollectOnCreateViewInstanceListener listener, ReactApplicationContext reactContext) {
23
- this.listener = listener;
24
- mCallerContext = reactContext;
25
- }
26
-
27
- @Override
28
- public String getName() {
29
- return "VGSExpDateField";
30
- }
31
-
32
- @NonNull
33
- @Override
34
- protected VGSTextInputLayout createViewInstance(@NonNull ThemedReactContext reactContext) {
35
- vgsTextInputLayout = new VGSTextInputLayout(reactContext);
36
- vgsTextInputLayout.setHint("Exp Date");
37
- editText = new ExpirationDateEditText(reactContext);
38
- editText.setIsRequired(true);
39
- editText.setDateRegex("MM/yy");
40
- editText.setFieldName("card_exp");
41
- editText.setPadding(10, 0, 10, 0);
42
-
43
- vgsTextInputLayout.addView(editText);
44
-
45
- this.listener.onCreateViewInstance(editText);
46
- return vgsTextInputLayout;
47
- }
48
-
49
- @ReactProp(name = "placeholder")
50
- public void setPlaceholder(VGSTextInputLayout view, @Nullable String placeholder) {
51
- vgsTextInputLayout.setHint(placeholder);
52
- }
53
- }
54
-
@@ -1,57 +0,0 @@
1
- package com.reactnativepayengine.collect.fields;
2
-
3
- import androidx.annotation.NonNull;
4
- import androidx.annotation.Nullable;
5
-
6
- import com.facebook.react.bridge.ReactApplicationContext;
7
- import com.facebook.react.uimanager.SimpleViewManager;
8
- import com.facebook.react.uimanager.ThemedReactContext;
9
- import com.facebook.react.uimanager.annotations.ReactProp;
10
- import com.reactnativepayengine.collect.VGSCollectOnCreateViewInstanceListener;
11
- import com.verygoodsecurity.vgscollect.widget.VGSEditText;
12
- import com.verygoodsecurity.vgscollect.widget.VGSTextInputLayout;
13
-
14
- public class VGSTextField extends SimpleViewManager<VGSTextInputLayout> {
15
- private final VGSCollectOnCreateViewInstanceListener listener;
16
-
17
- private VGSEditText editText;
18
- private VGSTextInputLayout vgsTextInputLayout;
19
-
20
- ReactApplicationContext mCallerContext;
21
-
22
- public VGSTextField(VGSCollectOnCreateViewInstanceListener listener, ReactApplicationContext reactContext) {
23
- this.listener = listener;
24
- mCallerContext = reactContext;
25
- }
26
-
27
- @Override
28
- public String getName() {
29
- return "VGSTextField";
30
- }
31
-
32
- @NonNull
33
- @Override
34
- protected VGSTextInputLayout createViewInstance(@NonNull ThemedReactContext reactContext) {
35
- vgsTextInputLayout = new VGSTextInputLayout(reactContext);
36
- vgsTextInputLayout.setHint("");
37
- editText = new VGSEditText(reactContext);
38
- editText.setFieldName("custom_text");
39
- editText.setPadding(10, 0, 10, 0);
40
-
41
- vgsTextInputLayout.addView(editText);
42
-
43
- this.listener.onCreateViewInstance(editText);
44
- return vgsTextInputLayout;
45
- }
46
-
47
- @ReactProp(name = "placeholder")
48
- public void setPlaceholder(VGSTextInputLayout view, @Nullable String placeholder) {
49
- vgsTextInputLayout.setHint(placeholder);
50
- }
51
-
52
- @ReactProp(name = "maxlength")
53
- public void setMaxLength(VGSTextInputLayout view, @Nullable double maxLength) {
54
- editText.setMaxLength((int) maxLength);
55
- }
56
- }
57
-
@@ -1,62 +0,0 @@
1
- package com.reactnativepayengine.collect.fields;
2
-
3
- import androidx.annotation.NonNull;
4
- import androidx.annotation.Nullable;
5
-
6
- import com.facebook.react.bridge.ReactApplicationContext;
7
- import com.facebook.react.uimanager.SimpleViewManager;
8
- import com.facebook.react.uimanager.ThemedReactContext;
9
- import com.facebook.react.uimanager.annotations.ReactProp;
10
- import com.reactnativepayengine.collect.VGSCollectOnCreateViewInstanceListener;
11
- import com.verygoodsecurity.vgscollect.view.card.validation.rules.VGSInfoRule;
12
- import com.verygoodsecurity.vgscollect.widget.ExpirationDateEditText;
13
- import com.verygoodsecurity.vgscollect.widget.VGSEditText;
14
- import com.verygoodsecurity.vgscollect.widget.VGSTextInputLayout;
15
-
16
- public class VGSZipCodeField extends SimpleViewManager<VGSTextInputLayout> {
17
- private final VGSCollectOnCreateViewInstanceListener listener;
18
-
19
- private VGSEditText editText;
20
- private VGSTextInputLayout vgsTextInputLayout;
21
-
22
- ReactApplicationContext mCallerContext;
23
-
24
- public VGSZipCodeField(VGSCollectOnCreateViewInstanceListener listener, ReactApplicationContext reactContext) {
25
- this.listener = listener;
26
- mCallerContext = reactContext;
27
- }
28
-
29
- @Override
30
- public String getName() {
31
- return "VGSZipCodeField";
32
- }
33
-
34
- @NonNull
35
- @Override
36
- protected VGSTextInputLayout createViewInstance(@NonNull ThemedReactContext reactContext) {
37
- vgsTextInputLayout = new VGSTextInputLayout(reactContext);
38
- vgsTextInputLayout.setHint("Zip code");
39
- editText = new VGSEditText(reactContext);
40
- editText.setIsRequired(true);
41
- editText.setFieldName("address_zip");
42
- VGSInfoRule rule = new VGSInfoRule.ValidationBuilder()
43
- .setRegex("^(\\d{5}(-\\d{4})?|[a-z]\\d[a-z][- ]*\\d[a-z]\\d)$")
44
- .setAllowableMinLength(1)
45
- .setAllowableMaxLength(8)
46
- .build();
47
- editText.setRule(rule);
48
- editText.enableValidation(true);
49
- editText.setPadding(10, 0, 10, 0);
50
-
51
- vgsTextInputLayout.addView(editText);
52
-
53
- this.listener.onCreateViewInstance(editText);
54
- return vgsTextInputLayout;
55
- }
56
-
57
- @ReactProp(name = "placeholder")
58
- public void setPlaceholder(VGSTextInputLayout view, @Nullable String placeholder) {
59
- vgsTextInputLayout.setHint(placeholder);
60
- }
61
- }
62
-
@@ -1,14 +0,0 @@
1
- package com.reactnativepayengine.util;
2
-
3
- import android.util.DisplayMetrics;
4
- import android.content.Context;
5
- import android.util.TypedValue;
6
-
7
- public class ResourceUtil {
8
-
9
- public static int convertPxToDp(Context context, int dip) {
10
- DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
11
- return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dip, displayMetrics);
12
- }
13
-
14
- }
package/ios/Payengine.m DELETED
@@ -1,72 +0,0 @@
1
- #import <React/RCTBridgeModule.h>
2
- #import <Foundation/Foundation.h>
3
- #import <React/RCTViewManager.h>
4
-
5
- @interface RCT_EXTERN_MODULE(Payengine, NSObject)
6
-
7
- RCT_EXTERN_METHOD(multiply:(float)a withB:(float)b
8
- withResolver:(RCTPromiseResolveBlock)resolve
9
- withRejecter:(RCTPromiseRejectBlock)reject)
10
-
11
- + (BOOL)requiresMainQueueSetup
12
- {
13
- return NO;
14
- }
15
- @end
16
-
17
- @interface RCT_EXTERN_MODULE(ApplePay, NSObject)
18
-
19
- RCT_EXTERN_METHOD(invokeApplePay:(NSDictionary)method details:(NSDictionary)details)
20
-
21
- RCT_EXTERN_METHOD(initApplePay:(RCTPromiseResolveBlock)resolve
22
- withRejecter:(RCTPromiseRejectBlock)reject)
23
-
24
- RCT_EXTERN_METHOD(canMakePayments:(RCTPromiseResolveBlock)resolve
25
- withRejecter:(RCTPromiseRejectBlock)reject)
26
-
27
- + (BOOL)requiresMainQueueSetup
28
- {
29
- return NO;
30
- }
31
-
32
- @end
33
-
34
-
35
- @interface RCT_EXTERN_MODULE(VGSCollectManager, RCTViewManager)
36
-
37
- RCT_EXTERN_METHOD(setConfiguration: (NSString *)pKey vaultId:(NSString *)vaultId environment:(NSString *)environment hostname:(NSString *)hostname satellitePort:(NSInteger *)satellitePort);
38
-
39
- RCT_EXTERN_METHOD(createCard: (NSString *)merchantId resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject);
40
- RCT_EXTERN_METHOD(createBankAccount: (NSString *)merchantId resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject);
41
-
42
- @end
43
-
44
-
45
- @interface RCT_EXTERN_MODULE(VGSCardNumberFieldManager, RCTViewManager)
46
- RCT_EXPORT_VIEW_PROPERTY(placeholder, NSString)
47
- @end
48
-
49
- @interface RCT_EXTERN_MODULE(VGSExpDateFieldManager, RCTViewManager)
50
- RCT_EXPORT_VIEW_PROPERTY(placeholder, NSString)
51
- @end
52
-
53
- @interface RCT_EXTERN_MODULE(VGSCVCFieldManager, RCTViewManager)
54
- RCT_EXPORT_VIEW_PROPERTY(placeholder, NSString)
55
- @end
56
-
57
- @interface RCT_EXTERN_MODULE(VGSCardHolderNameFieldManager, RCTViewManager)
58
- RCT_EXPORT_VIEW_PROPERTY(placeholder, NSString)
59
- @end
60
-
61
- @interface RCT_EXTERN_MODULE(VGSZipCodeFieldManager, RCTViewManager)
62
- RCT_EXPORT_VIEW_PROPERTY(placeholder, NSString)
63
- @end
64
-
65
-
66
- @interface RCT_EXTERN_MODULE(VGSTextFieldManager, RCTViewManager)
67
- RCT_EXPORT_VIEW_PROPERTY(placeholder, NSString)
68
- RCT_EXPORT_VIEW_PROPERTY(name, NSString)
69
- RCT_EXPORT_VIEW_PROPERTY(pattern, NSString)
70
- RCT_EXPORT_VIEW_PROPERTY(maxlength, NSNumber)
71
- @end
72
-