globalpayments-api 3.5.1 → 3.6.0

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 (835) hide show
  1. package/CHANGELOG.md +26 -1
  2. package/lib/src/Builders/AuthorizationBuilder.d.ts +348 -0
  3. package/lib/src/Builders/AuthorizationBuilder.js +668 -0
  4. package/lib/src/Builders/AuthorizationBuilder.js.map +1 -0
  5. package/lib/src/Builders/BaseBuilder/ValidationClause.d.ts +17 -0
  6. package/lib/src/Builders/BaseBuilder/ValidationClause.js +116 -0
  7. package/lib/src/Builders/BaseBuilder/ValidationClause.js.map +1 -0
  8. package/lib/src/Builders/BaseBuilder/ValidationTarget.d.ts +16 -0
  9. package/lib/src/Builders/BaseBuilder/ValidationTarget.js +36 -0
  10. package/lib/src/Builders/BaseBuilder/ValidationTarget.js.map +1 -0
  11. package/lib/src/Builders/BaseBuilder/Validations.d.ts +11 -0
  12. package/lib/src/Builders/BaseBuilder/Validations.js +55 -0
  13. package/lib/src/Builders/BaseBuilder/Validations.js.map +1 -0
  14. package/lib/src/Builders/BaseBuilder.d.ts +11 -0
  15. package/lib/src/Builders/BaseBuilder.js +17 -0
  16. package/lib/src/Builders/BaseBuilder.js.map +1 -0
  17. package/lib/src/Builders/ManagementBuilder.d.ts +122 -0
  18. package/lib/src/Builders/ManagementBuilder.js +244 -0
  19. package/lib/src/Builders/ManagementBuilder.js.map +1 -0
  20. package/lib/src/Builders/PayFacBuilder.d.ts +97 -0
  21. package/lib/src/Builders/PayFacBuilder.js +233 -0
  22. package/lib/src/Builders/PayFacBuilder.js.map +1 -0
  23. package/lib/src/Builders/RecurringBuilder.d.ts +13 -0
  24. package/lib/src/Builders/RecurringBuilder.js +34 -0
  25. package/lib/src/Builders/RecurringBuilder.js.map +1 -0
  26. package/lib/src/Builders/ReportBuilder.d.ts +10 -0
  27. package/lib/src/Builders/ReportBuilder.js +27 -0
  28. package/lib/src/Builders/ReportBuilder.js.map +1 -0
  29. package/lib/src/Builders/RequestBuilder/GpApi/AccessTokenRequest.d.ts +11 -0
  30. package/lib/src/Builders/RequestBuilder/GpApi/AccessTokenRequest.js +23 -0
  31. package/lib/src/Builders/RequestBuilder/GpApi/AccessTokenRequest.js.map +1 -0
  32. package/lib/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.d.ts +35 -0
  33. package/lib/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.js +448 -0
  34. package/lib/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.js.map +1 -0
  35. package/lib/src/Builders/RequestBuilder/GpApi/GpApiManagementRequestBuilder.d.ts +7 -0
  36. package/lib/src/Builders/RequestBuilder/GpApi/GpApiManagementRequestBuilder.js +179 -0
  37. package/lib/src/Builders/RequestBuilder/GpApi/GpApiManagementRequestBuilder.js.map +1 -0
  38. package/lib/src/Builders/RequestBuilder/GpApi/GpApiMiCRequestBuilder.d.ts +16 -0
  39. package/lib/src/Builders/RequestBuilder/GpApi/GpApiMiCRequestBuilder.js +34 -0
  40. package/lib/src/Builders/RequestBuilder/GpApi/GpApiMiCRequestBuilder.js.map +1 -0
  41. package/lib/src/Builders/RequestBuilder/GpApi/GpApiReportRequestBuilder.d.ts +11 -0
  42. package/lib/src/Builders/RequestBuilder/GpApi/GpApiReportRequestBuilder.js +163 -0
  43. package/lib/src/Builders/RequestBuilder/GpApi/GpApiReportRequestBuilder.js.map +1 -0
  44. package/lib/src/Builders/RequestBuilder/GpApi/GpApiSecureRequestBuilder.d.ts +20 -0
  45. package/lib/src/Builders/RequestBuilder/GpApi/GpApiSecureRequestBuilder.js +413 -0
  46. package/lib/src/Builders/RequestBuilder/GpApi/GpApiSecureRequestBuilder.js.map +1 -0
  47. package/lib/src/Builders/RequestBuilder/GpApi/GpApiSessionInfo.d.ts +6 -0
  48. package/lib/src/Builders/RequestBuilder/GpApi/GpApiSessionInfo.js +49 -0
  49. package/lib/src/Builders/RequestBuilder/GpApi/GpApiSessionInfo.js.map +1 -0
  50. package/lib/src/Builders/RequestBuilder/GpApi/index.d.ts +4 -0
  51. package/lib/src/Builders/RequestBuilder/GpApi/index.js +21 -0
  52. package/lib/src/Builders/RequestBuilder/GpApi/index.js.map +1 -0
  53. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.d.ts +18 -0
  54. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.js +125 -0
  55. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.js.map +1 -0
  56. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomManagementRequestBuilder.d.ts +11 -0
  57. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomManagementRequestBuilder.js +83 -0
  58. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomManagementRequestBuilder.js.map +1 -0
  59. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.d.ts +9 -0
  60. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.js +66 -0
  61. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.js.map +1 -0
  62. package/lib/src/Builders/RequestBuilder/GpEcom/index.d.ts +3 -0
  63. package/lib/src/Builders/RequestBuilder/GpEcom/index.js +20 -0
  64. package/lib/src/Builders/RequestBuilder/GpEcom/index.js.map +1 -0
  65. package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.d.ts +8 -0
  66. package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.js +41 -0
  67. package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.js.map +1 -0
  68. package/lib/src/Builders/RequestBuilder/index.d.ts +3 -0
  69. package/lib/src/Builders/RequestBuilder/index.js +20 -0
  70. package/lib/src/Builders/RequestBuilder/index.js.map +1 -0
  71. package/lib/src/Builders/Secure3dBuilder.d.ts +90 -0
  72. package/lib/src/Builders/Secure3dBuilder.js +423 -0
  73. package/lib/src/Builders/Secure3dBuilder.js.map +1 -0
  74. package/lib/src/Builders/SecureBuilder.d.ts +446 -0
  75. package/lib/src/Builders/SecureBuilder.js +729 -0
  76. package/lib/src/Builders/SecureBuilder.js.map +1 -0
  77. package/lib/src/Builders/TransactionBuilder.d.ts +13 -0
  78. package/lib/src/Builders/TransactionBuilder.js +47 -0
  79. package/lib/src/Builders/TransactionBuilder.js.map +1 -0
  80. package/lib/src/Builders/TransactionReportBuilder.d.ts +19 -0
  81. package/lib/src/Builders/TransactionReportBuilder.js +92 -0
  82. package/lib/src/Builders/TransactionReportBuilder.js.map +1 -0
  83. package/lib/src/Builders/index.d.ts +10 -0
  84. package/lib/src/Builders/index.js +27 -0
  85. package/lib/src/Builders/index.js.map +1 -0
  86. package/lib/src/ConfiguredServices.d.ts +28 -0
  87. package/lib/src/ConfiguredServices.js +53 -0
  88. package/lib/src/ConfiguredServices.js.map +1 -0
  89. package/lib/src/Entities/Address.d.ts +14 -0
  90. package/lib/src/Entities/Address.js +23 -0
  91. package/lib/src/Entities/Address.js.map +1 -0
  92. package/lib/src/Entities/BatchSummary.d.ts +6 -0
  93. package/lib/src/Entities/BatchSummary.js +11 -0
  94. package/lib/src/Entities/BatchSummary.js.map +1 -0
  95. package/lib/src/Entities/BrowserData.d.ts +13 -0
  96. package/lib/src/Entities/BrowserData.js +18 -0
  97. package/lib/src/Entities/BrowserData.js.map +1 -0
  98. package/lib/src/Entities/Card.d.ts +36 -0
  99. package/lib/src/Entities/Card.js +41 -0
  100. package/lib/src/Entities/Card.js.map +1 -0
  101. package/lib/src/Entities/CardIssuerResponse.d.ts +22 -0
  102. package/lib/src/Entities/CardIssuerResponse.js +27 -0
  103. package/lib/src/Entities/CardIssuerResponse.js.map +1 -0
  104. package/lib/src/Entities/Customer.d.ts +74 -0
  105. package/lib/src/Entities/Customer.js +94 -0
  106. package/lib/src/Entities/Customer.js.map +1 -0
  107. package/lib/src/Entities/CustomerDocument.d.ts +8 -0
  108. package/lib/src/Entities/CustomerDocument.js +16 -0
  109. package/lib/src/Entities/CustomerDocument.js.map +1 -0
  110. package/lib/src/Entities/DocumentUploadData.d.ts +13 -0
  111. package/lib/src/Entities/DocumentUploadData.js +81 -0
  112. package/lib/src/Entities/DocumentUploadData.js.map +1 -0
  113. package/lib/src/Entities/EcommerceInfo.d.ts +12 -0
  114. package/lib/src/Entities/EcommerceInfo.js +22 -0
  115. package/lib/src/Entities/EcommerceInfo.js.map +1 -0
  116. package/lib/src/Entities/EncryptionData.d.ts +7 -0
  117. package/lib/src/Entities/EncryptionData.js +16 -0
  118. package/lib/src/Entities/EncryptionData.js.map +1 -0
  119. package/lib/src/Entities/Enums/AcquisitionType.d.ts +10 -0
  120. package/lib/src/Entities/Enums/AcquisitionType.js +15 -0
  121. package/lib/src/Entities/Enums/AcquisitionType.js.map +1 -0
  122. package/lib/src/Entities/Enums/CardTypeFilter.d.ts +7 -0
  123. package/lib/src/Entities/Enums/CardTypeFilter.js +12 -0
  124. package/lib/src/Entities/Enums/CardTypeFilter.js.map +1 -0
  125. package/lib/src/Entities/Enums/IsoCountries.d.ts +9 -0
  126. package/lib/src/Entities/Enums/IsoCountries.js +1941 -0
  127. package/lib/src/Entities/Enums/IsoCountries.js.map +1 -0
  128. package/lib/src/Entities/Enums.d.ts +818 -0
  129. package/lib/src/Entities/Enums.js +1030 -0
  130. package/lib/src/Entities/Enums.js.map +1 -0
  131. package/lib/src/Entities/Errors.d.ts +23 -0
  132. package/lib/src/Entities/Errors.js +72 -0
  133. package/lib/src/Entities/Errors.js.map +1 -0
  134. package/lib/src/Entities/FraudRule.d.ts +8 -0
  135. package/lib/src/Entities/FraudRule.js +17 -0
  136. package/lib/src/Entities/FraudRule.js.map +1 -0
  137. package/lib/src/Entities/GpApi/AccessTokenInfo.d.ts +16 -0
  138. package/lib/src/Entities/GpApi/AccessTokenInfo.js +21 -0
  139. package/lib/src/Entities/GpApi/AccessTokenInfo.js.map +1 -0
  140. package/lib/src/Entities/GpApi/DTO/Card.d.ts +16 -0
  141. package/lib/src/Entities/GpApi/DTO/Card.js +21 -0
  142. package/lib/src/Entities/GpApi/DTO/Card.js.map +1 -0
  143. package/lib/src/Entities/GpApi/DTO/PaymentMethod.d.ts +17 -0
  144. package/lib/src/Entities/GpApi/DTO/PaymentMethod.js +21 -0
  145. package/lib/src/Entities/GpApi/DTO/PaymentMethod.js.map +1 -0
  146. package/lib/src/Entities/GpApi/DTO/index.d.ts +2 -0
  147. package/lib/src/Entities/GpApi/DTO/index.js +19 -0
  148. package/lib/src/Entities/GpApi/DTO/index.js.map +1 -0
  149. package/lib/src/Entities/GpApi/GpApiAccount.d.ts +5 -0
  150. package/lib/src/Entities/GpApi/GpApiAccount.js +13 -0
  151. package/lib/src/Entities/GpApi/GpApiAccount.js.map +1 -0
  152. package/lib/src/Entities/GpApi/GpApiRequest.d.ts +21 -0
  153. package/lib/src/Entities/GpApi/GpApiRequest.js +26 -0
  154. package/lib/src/Entities/GpApi/GpApiRequest.js.map +1 -0
  155. package/lib/src/Entities/GpApi/GpApiTokenResponse.d.ts +52 -0
  156. package/lib/src/Entities/GpApi/GpApiTokenResponse.js +115 -0
  157. package/lib/src/Entities/GpApi/GpApiTokenResponse.js.map +1 -0
  158. package/lib/src/Entities/GpApi/PageResult.d.ts +8 -0
  159. package/lib/src/Entities/GpApi/PageResult.js +13 -0
  160. package/lib/src/Entities/GpApi/PageResult.js.map +1 -0
  161. package/lib/src/Entities/GpApi/index.d.ts +5 -0
  162. package/lib/src/Entities/GpApi/index.js +22 -0
  163. package/lib/src/Entities/GpApi/index.js.map +1 -0
  164. package/lib/src/Entities/HostedPaymentData.d.ts +10 -0
  165. package/lib/src/Entities/HostedPaymentData.js +17 -0
  166. package/lib/src/Entities/HostedPaymentData.js.map +1 -0
  167. package/lib/src/Entities/IRequestBuilder.d.ts +6 -0
  168. package/lib/src/Entities/IRequestBuilder.js +3 -0
  169. package/lib/src/Entities/IRequestBuilder.js.map +1 -0
  170. package/lib/src/Entities/IRequestLogger.d.ts +8 -0
  171. package/lib/src/Entities/IRequestLogger.js +3 -0
  172. package/lib/src/Entities/IRequestLogger.js.map +1 -0
  173. package/lib/src/Entities/LodgingData.d.ts +14 -0
  174. package/lib/src/Entities/LodgingData.js +18 -0
  175. package/lib/src/Entities/LodgingData.js.map +1 -0
  176. package/lib/src/Entities/LodgingItems.d.ts +6 -0
  177. package/lib/src/Entities/LodgingItems.js +11 -0
  178. package/lib/src/Entities/LodgingItems.js.map +1 -0
  179. package/lib/src/Entities/MaskedValueCollection.d.ts +12 -0
  180. package/lib/src/Entities/MaskedValueCollection.js +53 -0
  181. package/lib/src/Entities/MaskedValueCollection.js.map +1 -0
  182. package/lib/src/Entities/MerchantDataCollection.d.ts +16 -0
  183. package/lib/src/Entities/MerchantDataCollection.js +102 -0
  184. package/lib/src/Entities/MerchantDataCollection.js.map +1 -0
  185. package/lib/src/Entities/MerchantKVP.d.ts +11 -0
  186. package/lib/src/Entities/MerchantKVP.js +28 -0
  187. package/lib/src/Entities/MerchantKVP.js.map +1 -0
  188. package/lib/src/Entities/MessageExtension.d.ts +6 -0
  189. package/lib/src/Entities/MessageExtension.js +11 -0
  190. package/lib/src/Entities/MessageExtension.js.map +1 -0
  191. package/lib/src/Entities/MobileData.d.ts +11 -0
  192. package/lib/src/Entities/MobileData.js +15 -0
  193. package/lib/src/Entities/MobileData.js.map +1 -0
  194. package/lib/src/Entities/PayerDetails.d.ts +8 -0
  195. package/lib/src/Entities/PayerDetails.js +12 -0
  196. package/lib/src/Entities/PayerDetails.js.map +1 -0
  197. package/lib/src/Entities/PhoneNumber.d.ts +6 -0
  198. package/lib/src/Entities/PhoneNumber.js +15 -0
  199. package/lib/src/Entities/PhoneNumber.js.map +1 -0
  200. package/lib/src/Entities/ProFac/AccountBalanceResponseData.d.ts +7 -0
  201. package/lib/src/Entities/ProFac/AccountBalanceResponseData.js +12 -0
  202. package/lib/src/Entities/ProFac/AccountBalanceResponseData.js.map +1 -0
  203. package/lib/src/Entities/ProFac/AccountPermissions.d.ts +15 -0
  204. package/lib/src/Entities/ProFac/AccountPermissions.js +19 -0
  205. package/lib/src/Entities/ProFac/AccountPermissions.js.map +1 -0
  206. package/lib/src/Entities/ProFac/BankAccountData.d.ts +10 -0
  207. package/lib/src/Entities/ProFac/BankAccountData.js +42 -0
  208. package/lib/src/Entities/ProFac/BankAccountData.js.map +1 -0
  209. package/lib/src/Entities/ProFac/BankAccountOwnershipData.d.ts +8 -0
  210. package/lib/src/Entities/ProFac/BankAccountOwnershipData.js +15 -0
  211. package/lib/src/Entities/ProFac/BankAccountOwnershipData.js.map +1 -0
  212. package/lib/src/Entities/ProFac/BeneficialOwnerData.d.ts +6 -0
  213. package/lib/src/Entities/ProFac/BeneficialOwnerData.js +12 -0
  214. package/lib/src/Entities/ProFac/BeneficialOwnerData.js.map +1 -0
  215. package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.d.ts +5 -0
  216. package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.js +10 -0
  217. package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.js.map +1 -0
  218. package/lib/src/Entities/ProFac/BusinessData.d.ts +15 -0
  219. package/lib/src/Entities/ProFac/BusinessData.js +50 -0
  220. package/lib/src/Entities/ProFac/BusinessData.js.map +1 -0
  221. package/lib/src/Entities/ProFac/DeviceAttributeInfo.d.ts +4 -0
  222. package/lib/src/Entities/ProFac/DeviceAttributeInfo.js +17 -0
  223. package/lib/src/Entities/ProFac/DeviceAttributeInfo.js.map +1 -0
  224. package/lib/src/Entities/ProFac/DeviceData.d.ts +5 -0
  225. package/lib/src/Entities/ProFac/DeviceData.js +11 -0
  226. package/lib/src/Entities/ProFac/DeviceData.js.map +1 -0
  227. package/lib/src/Entities/ProFac/DeviceInfo.d.ts +6 -0
  228. package/lib/src/Entities/ProFac/DeviceInfo.js +19 -0
  229. package/lib/src/Entities/ProFac/DeviceInfo.js.map +1 -0
  230. package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.d.ts +7 -0
  231. package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.js +15 -0
  232. package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.js.map +1 -0
  233. package/lib/src/Entities/ProFac/GrossBillingInformation.d.ts +8 -0
  234. package/lib/src/Entities/ProFac/GrossBillingInformation.js +10 -0
  235. package/lib/src/Entities/ProFac/GrossBillingInformation.js.map +1 -0
  236. package/lib/src/Entities/ProFac/OrderDevice.d.ts +18 -0
  237. package/lib/src/Entities/ProFac/OrderDevice.js +23 -0
  238. package/lib/src/Entities/ProFac/OrderDevice.js.map +1 -0
  239. package/lib/src/Entities/ProFac/OwnersData.d.ts +12 -0
  240. package/lib/src/Entities/ProFac/OwnersData.js +43 -0
  241. package/lib/src/Entities/ProFac/OwnersData.js.map +1 -0
  242. package/lib/src/Entities/ProFac/PayFacResponseData.d.ts +55 -0
  243. package/lib/src/Entities/ProFac/PayFacResponseData.js +62 -0
  244. package/lib/src/Entities/ProFac/PayFacResponseData.js.map +1 -0
  245. package/lib/src/Entities/ProFac/RenewAccountData.d.ts +10 -0
  246. package/lib/src/Entities/ProFac/RenewAccountData.js +38 -0
  247. package/lib/src/Entities/ProFac/RenewAccountData.js.map +1 -0
  248. package/lib/src/Entities/ProFac/SignificantOwnerData.d.ts +8 -0
  249. package/lib/src/Entities/ProFac/SignificantOwnerData.js +27 -0
  250. package/lib/src/Entities/ProFac/SignificantOwnerData.js.map +1 -0
  251. package/lib/src/Entities/ProFac/ThreatRiskData.d.ts +5 -0
  252. package/lib/src/Entities/ProFac/ThreatRiskData.js +19 -0
  253. package/lib/src/Entities/ProFac/ThreatRiskData.js.map +1 -0
  254. package/lib/src/Entities/ProFac/UserPersonalData.d.ts +26 -0
  255. package/lib/src/Entities/ProFac/UserPersonalData.js +82 -0
  256. package/lib/src/Entities/ProFac/UserPersonalData.js.map +1 -0
  257. package/lib/src/Entities/RecurringEntity.d.ts +14 -0
  258. package/lib/src/Entities/RecurringEntity.js +92 -0
  259. package/lib/src/Entities/RecurringEntity.js.map +1 -0
  260. package/lib/src/Entities/Reporting/BaseSummary.d.ts +8 -0
  261. package/lib/src/Entities/Reporting/BaseSummary.js +13 -0
  262. package/lib/src/Entities/Reporting/BaseSummary.js.map +1 -0
  263. package/lib/src/Entities/Reporting/SearchCriteriaBuilder.d.ts +108 -0
  264. package/lib/src/Entities/Reporting/SearchCriteriaBuilder.js +125 -0
  265. package/lib/src/Entities/Reporting/SearchCriteriaBuilder.js.map +1 -0
  266. package/lib/src/Entities/Reporting/StoredPaymentMethodSummary.d.ts +11 -0
  267. package/lib/src/Entities/Reporting/StoredPaymentMethodSummary.js +16 -0
  268. package/lib/src/Entities/Reporting/StoredPaymentMethodSummary.js.map +1 -0
  269. package/lib/src/Entities/Reporting/index.d.ts +3 -0
  270. package/lib/src/Entities/Reporting/index.js +20 -0
  271. package/lib/src/Entities/Reporting/index.js.map +1 -0
  272. package/lib/src/Entities/Request.d.ts +10 -0
  273. package/lib/src/Entities/Request.js +18 -0
  274. package/lib/src/Entities/Request.js.map +1 -0
  275. package/lib/src/Entities/SSORequestData.d.ts +5 -0
  276. package/lib/src/Entities/SSORequestData.js +19 -0
  277. package/lib/src/Entities/SSORequestData.js.map +1 -0
  278. package/lib/src/Entities/Schedule.d.ts +47 -0
  279. package/lib/src/Entities/Schedule.js +325 -0
  280. package/lib/src/Entities/Schedule.js.map +1 -0
  281. package/lib/src/Entities/ServiceEndpoints.d.ts +12 -0
  282. package/lib/src/Entities/ServiceEndpoints.js +17 -0
  283. package/lib/src/Entities/ServiceEndpoints.js.map +1 -0
  284. package/lib/src/Entities/StoredCredentials.d.ts +9 -0
  285. package/lib/src/Entities/StoredCredentials.js +13 -0
  286. package/lib/src/Entities/StoredCredentials.js.map +1 -0
  287. package/lib/src/Entities/ThreeDSecure.d.ts +66 -0
  288. package/lib/src/Entities/ThreeDSecure.js +162 -0
  289. package/lib/src/Entities/ThreeDSecure.js.map +1 -0
  290. package/lib/src/Entities/Transaction.d.ts +97 -0
  291. package/lib/src/Entities/Transaction.js +158 -0
  292. package/lib/src/Entities/Transaction.js.map +1 -0
  293. package/lib/src/Entities/TransactionStatus.d.ts +13 -0
  294. package/lib/src/Entities/TransactionStatus.js +29 -0
  295. package/lib/src/Entities/TransactionStatus.js.map +1 -0
  296. package/lib/src/Entities/TransactionSummary.d.ts +78 -0
  297. package/lib/src/Entities/TransactionSummary.js +83 -0
  298. package/lib/src/Entities/TransactionSummary.js.map +1 -0
  299. package/lib/src/Entities/UPA/ProcessIndicator.d.ts +7 -0
  300. package/lib/src/Entities/UPA/ProcessIndicator.js +11 -0
  301. package/lib/src/Entities/UPA/ProcessIndicator.js.map +1 -0
  302. package/lib/src/Entities/UPA/UpaParam.d.ts +10 -0
  303. package/lib/src/Entities/UPA/UpaParam.js +14 -0
  304. package/lib/src/Entities/UPA/UpaParam.js.map +1 -0
  305. package/lib/src/Entities/UPA/UpaTransactionData.d.ts +8 -0
  306. package/lib/src/Entities/UPA/UpaTransactionData.js +12 -0
  307. package/lib/src/Entities/UPA/UpaTransactionData.js.map +1 -0
  308. package/lib/src/Entities/UPA/index.d.ts +3 -0
  309. package/lib/src/Entities/UPA/index.js +20 -0
  310. package/lib/src/Entities/UPA/index.js.map +1 -0
  311. package/lib/src/Entities/index.d.ts +38 -0
  312. package/lib/src/Entities/index.js +55 -0
  313. package/lib/src/Entities/index.js.map +1 -0
  314. package/lib/src/Gateways/Gateway.d.ts +16 -0
  315. package/lib/src/Gateways/Gateway.js +94 -0
  316. package/lib/src/Gateways/Gateway.js.map +1 -0
  317. package/lib/src/Gateways/GatewayResponse.d.ts +8 -0
  318. package/lib/src/Gateways/GatewayResponse.js +15 -0
  319. package/lib/src/Gateways/GatewayResponse.js.map +1 -0
  320. package/lib/src/Gateways/GpApiConnector.d.ts +43 -0
  321. package/lib/src/Gateways/GpApiConnector.js +239 -0
  322. package/lib/src/Gateways/GpApiConnector.js.map +1 -0
  323. package/lib/src/Gateways/GpEcomConnector.d.ts +36 -0
  324. package/lib/src/Gateways/GpEcomConnector.js +468 -0
  325. package/lib/src/Gateways/GpEcomConnector.js.map +1 -0
  326. package/lib/src/Gateways/IPayFacProvider.d.ts +5 -0
  327. package/lib/src/Gateways/IPayFacProvider.js +3 -0
  328. package/lib/src/Gateways/IPayFacProvider.js.map +1 -0
  329. package/lib/src/Gateways/IPaymentGateway.d.ts +8 -0
  330. package/lib/src/Gateways/IPaymentGateway.js +3 -0
  331. package/lib/src/Gateways/IPaymentGateway.js.map +1 -0
  332. package/lib/src/Gateways/IRecurringService.d.ts +6 -0
  333. package/lib/src/Gateways/IRecurringService.js +3 -0
  334. package/lib/src/Gateways/IRecurringService.js.map +1 -0
  335. package/lib/src/Gateways/PayPlanConnector.d.ts +42 -0
  336. package/lib/src/Gateways/PayPlanConnector.js +545 -0
  337. package/lib/src/Gateways/PayPlanConnector.js.map +1 -0
  338. package/lib/src/Gateways/PorticoConnector.d.ts +48 -0
  339. package/lib/src/Gateways/PorticoConnector.js +1010 -0
  340. package/lib/src/Gateways/PorticoConnector.js.map +1 -0
  341. package/lib/src/Gateways/ProPayConnector.d.ts +45 -0
  342. package/lib/src/Gateways/ProPayConnector.js +801 -0
  343. package/lib/src/Gateways/ProPayConnector.js.map +1 -0
  344. package/lib/src/Gateways/RestGateway.d.ts +9 -0
  345. package/lib/src/Gateways/RestGateway.js +77 -0
  346. package/lib/src/Gateways/RestGateway.js.map +1 -0
  347. package/lib/src/Gateways/XmlGateway.d.ts +6 -0
  348. package/lib/src/Gateways/XmlGateway.js +54 -0
  349. package/lib/src/Gateways/XmlGateway.js.map +1 -0
  350. package/lib/src/Gateways/https-wrapper.d.ts +3 -0
  351. package/lib/src/Gateways/https-wrapper.js +81 -0
  352. package/lib/src/Gateways/https-wrapper.js.map +1 -0
  353. package/lib/src/Gateways/index.d.ts +9 -0
  354. package/lib/src/Gateways/index.js +26 -0
  355. package/lib/src/Gateways/index.js.map +1 -0
  356. package/lib/src/HostedPaymentConfig.d.ts +12 -0
  357. package/lib/src/HostedPaymentConfig.js +16 -0
  358. package/lib/src/HostedPaymentConfig.js.map +1 -0
  359. package/lib/src/Mapping/EnumMapping.d.ts +10 -0
  360. package/lib/src/Mapping/EnumMapping.js +110 -0
  361. package/lib/src/Mapping/EnumMapping.js.map +1 -0
  362. package/lib/src/Mapping/GpApiMapping.d.ts +16 -0
  363. package/lib/src/Mapping/GpApiMapping.js +381 -0
  364. package/lib/src/Mapping/GpApiMapping.js.map +1 -0
  365. package/lib/src/Mapping/GpEcomMapping.d.ts +9 -0
  366. package/lib/src/Mapping/GpEcomMapping.js +85 -0
  367. package/lib/src/Mapping/GpEcomMapping.js.map +1 -0
  368. package/lib/src/Mapping/index.d.ts +3 -0
  369. package/lib/src/Mapping/index.js +20 -0
  370. package/lib/src/Mapping/index.js.map +1 -0
  371. package/lib/src/PaymentMethods/AlternativePaymentMethod.d.ts +22 -0
  372. package/lib/src/PaymentMethods/AlternativePaymentMethod.js +47 -0
  373. package/lib/src/PaymentMethods/AlternativePaymentMethod.js.map +1 -0
  374. package/lib/src/PaymentMethods/Cash.d.ts +8 -0
  375. package/lib/src/PaymentMethods/Cash.js +16 -0
  376. package/lib/src/PaymentMethods/Cash.js.map +1 -0
  377. package/lib/src/PaymentMethods/Credit.d.ts +109 -0
  378. package/lib/src/PaymentMethods/Credit.js +161 -0
  379. package/lib/src/PaymentMethods/Credit.js.map +1 -0
  380. package/lib/src/PaymentMethods/CreditCardData.d.ts +20 -0
  381. package/lib/src/PaymentMethods/CreditCardData.js +47 -0
  382. package/lib/src/PaymentMethods/CreditCardData.js.map +1 -0
  383. package/lib/src/PaymentMethods/CreditTrackData.d.ts +15 -0
  384. package/lib/src/PaymentMethods/CreditTrackData.js +36 -0
  385. package/lib/src/PaymentMethods/CreditTrackData.js.map +1 -0
  386. package/lib/src/PaymentMethods/Debit.d.ts +48 -0
  387. package/lib/src/PaymentMethods/Debit.js +64 -0
  388. package/lib/src/PaymentMethods/Debit.js.map +1 -0
  389. package/lib/src/PaymentMethods/DebitTrackData.d.ts +9 -0
  390. package/lib/src/PaymentMethods/DebitTrackData.js +24 -0
  391. package/lib/src/PaymentMethods/DebitTrackData.js.map +1 -0
  392. package/lib/src/PaymentMethods/EBT.d.ts +48 -0
  393. package/lib/src/PaymentMethods/EBT.js +68 -0
  394. package/lib/src/PaymentMethods/EBT.js.map +1 -0
  395. package/lib/src/PaymentMethods/EBTCardData.d.ts +16 -0
  396. package/lib/src/PaymentMethods/EBTCardData.js +25 -0
  397. package/lib/src/PaymentMethods/EBTCardData.js.map +1 -0
  398. package/lib/src/PaymentMethods/EBTTrackData.d.ts +8 -0
  399. package/lib/src/PaymentMethods/EBTTrackData.js +11 -0
  400. package/lib/src/PaymentMethods/EBTTrackData.js.map +1 -0
  401. package/lib/src/PaymentMethods/ECheck.d.ts +32 -0
  402. package/lib/src/PaymentMethods/ECheck.js +38 -0
  403. package/lib/src/PaymentMethods/ECheck.js.map +1 -0
  404. package/lib/src/PaymentMethods/GiftCard.d.ts +131 -0
  405. package/lib/src/PaymentMethods/GiftCard.js +189 -0
  406. package/lib/src/PaymentMethods/GiftCard.js.map +1 -0
  407. package/lib/src/PaymentMethods/Interfaces.d.ts +63 -0
  408. package/lib/src/PaymentMethods/Interfaces.js +3 -0
  409. package/lib/src/PaymentMethods/Interfaces.js.map +1 -0
  410. package/lib/src/PaymentMethods/PaymentMethod.d.ts +21 -0
  411. package/lib/src/PaymentMethods/PaymentMethod.js +63 -0
  412. package/lib/src/PaymentMethods/PaymentMethod.js.map +1 -0
  413. package/lib/src/PaymentMethods/RecurringPaymentMethod.d.ts +25 -0
  414. package/lib/src/PaymentMethods/RecurringPaymentMethod.js +69 -0
  415. package/lib/src/PaymentMethods/RecurringPaymentMethod.js.map +1 -0
  416. package/lib/src/PaymentMethods/TransactionReference.d.ts +10 -0
  417. package/lib/src/PaymentMethods/TransactionReference.js +17 -0
  418. package/lib/src/PaymentMethods/TransactionReference.js.map +1 -0
  419. package/lib/src/PaymentMethods/index.d.ts +17 -0
  420. package/lib/src/PaymentMethods/index.js +34 -0
  421. package/lib/src/PaymentMethods/index.js.map +1 -0
  422. package/lib/src/ServiceConfigs/AcceptorConfig.d.ts +29 -0
  423. package/lib/src/ServiceConfigs/AcceptorConfig.js +43 -0
  424. package/lib/src/ServiceConfigs/AcceptorConfig.js.map +1 -0
  425. package/lib/src/ServiceConfigs/Configuration.d.ts +15 -0
  426. package/lib/src/ServiceConfigs/Configuration.js +20 -0
  427. package/lib/src/ServiceConfigs/Configuration.js.map +1 -0
  428. package/lib/src/ServiceConfigs/Gateways/GatewayConfig.d.ts +14 -0
  429. package/lib/src/ServiceConfigs/Gateways/GatewayConfig.js +30 -0
  430. package/lib/src/ServiceConfigs/Gateways/GatewayConfig.js.map +1 -0
  431. package/lib/src/ServiceConfigs/Gateways/GpApiConfig.d.ts +21 -0
  432. package/lib/src/ServiceConfigs/Gateways/GpApiConfig.js +47 -0
  433. package/lib/src/ServiceConfigs/Gateways/GpApiConfig.js.map +1 -0
  434. package/lib/src/ServiceConfigs/Gateways/GpEcomConfig.d.ts +21 -0
  435. package/lib/src/ServiceConfigs/Gateways/GpEcomConfig.js +51 -0
  436. package/lib/src/ServiceConfigs/Gateways/GpEcomConfig.js.map +1 -0
  437. package/lib/src/ServiceConfigs/Gateways/PorticoConfig.d.ts +22 -0
  438. package/lib/src/ServiceConfigs/Gateways/PorticoConfig.js +117 -0
  439. package/lib/src/ServiceConfigs/Gateways/PorticoConfig.js.map +1 -0
  440. package/lib/src/ServiceConfigs/Gateways/index.d.ts +4 -0
  441. package/lib/src/ServiceConfigs/Gateways/index.js +21 -0
  442. package/lib/src/ServiceConfigs/Gateways/index.js.map +1 -0
  443. package/lib/src/ServiceConfigs/ServicesConfigs.d.ts +8 -0
  444. package/lib/src/ServiceConfigs/ServicesConfigs.js +15 -0
  445. package/lib/src/ServiceConfigs/ServicesConfigs.js.map +1 -0
  446. package/lib/src/ServiceConfigs/index.d.ts +4 -0
  447. package/lib/src/ServiceConfigs/index.js +21 -0
  448. package/lib/src/ServiceConfigs/index.js.map +1 -0
  449. package/lib/src/Services/BatchService.d.ts +4 -0
  450. package/lib/src/Services/BatchService.js +15 -0
  451. package/lib/src/Services/BatchService.js.map +1 -0
  452. package/lib/src/Services/CheckService.d.ts +7 -0
  453. package/lib/src/Services/CheckService.js +20 -0
  454. package/lib/src/Services/CheckService.js.map +1 -0
  455. package/lib/src/Services/CreditService.d.ts +13 -0
  456. package/lib/src/Services/CreditService.js +54 -0
  457. package/lib/src/Services/CreditService.js.map +1 -0
  458. package/lib/src/Services/DebitService.d.ts +8 -0
  459. package/lib/src/Services/DebitService.js +28 -0
  460. package/lib/src/Services/DebitService.js.map +1 -0
  461. package/lib/src/Services/DeviceService.d.ts +5 -0
  462. package/lib/src/Services/DeviceService.js +19 -0
  463. package/lib/src/Services/DeviceService.js.map +1 -0
  464. package/lib/src/Services/EBTService.d.ts +9 -0
  465. package/lib/src/Services/EBTService.js +31 -0
  466. package/lib/src/Services/EBTService.js.map +1 -0
  467. package/lib/src/Services/GiftService.d.ts +17 -0
  468. package/lib/src/Services/GiftService.js +54 -0
  469. package/lib/src/Services/GiftService.js.map +1 -0
  470. package/lib/src/Services/GpApiServices.d.ts +4 -0
  471. package/lib/src/Services/GpApiServices.js +44 -0
  472. package/lib/src/Services/GpApiServices.js.map +1 -0
  473. package/lib/src/Services/HostedService.d.ts +10 -0
  474. package/lib/src/Services/HostedService.js +59 -0
  475. package/lib/src/Services/HostedService.js.map +1 -0
  476. package/lib/src/Services/PayFacService.d.ts +26 -0
  477. package/lib/src/Services/PayFacService.js +76 -0
  478. package/lib/src/Services/PayFacService.js.map +1 -0
  479. package/lib/src/Services/RecurringService.d.ts +8 -0
  480. package/lib/src/Services/RecurringService.js +24 -0
  481. package/lib/src/Services/RecurringService.js.map +1 -0
  482. package/lib/src/Services/ReportingService.d.ts +10 -0
  483. package/lib/src/Services/ReportingService.js +34 -0
  484. package/lib/src/Services/ReportingService.js.map +1 -0
  485. package/lib/src/Services/Secure3dService.d.ts +8 -0
  486. package/lib/src/Services/Secure3dService.js +21 -0
  487. package/lib/src/Services/Secure3dService.js.map +1 -0
  488. package/lib/src/Services/index.d.ts +11 -0
  489. package/lib/src/Services/index.js +28 -0
  490. package/lib/src/Services/index.js.map +1 -0
  491. package/lib/src/ServicesContainer.d.ts +20 -0
  492. package/lib/src/ServicesContainer.js +79 -0
  493. package/lib/src/ServicesContainer.js.map +1 -0
  494. package/lib/src/Terminals/Abstractions/IDeviceCommInterface.d.ts +6 -0
  495. package/lib/src/Terminals/Abstractions/IDeviceCommInterface.js +3 -0
  496. package/lib/src/Terminals/Abstractions/IDeviceCommInterface.js.map +1 -0
  497. package/lib/src/Terminals/Abstractions/IDeviceInterface.d.ts +13 -0
  498. package/lib/src/Terminals/Abstractions/IDeviceInterface.js +3 -0
  499. package/lib/src/Terminals/Abstractions/IDeviceInterface.js.map +1 -0
  500. package/lib/src/Terminals/Abstractions/IDeviceMessage.d.ts +4 -0
  501. package/lib/src/Terminals/Abstractions/IDeviceMessage.js +3 -0
  502. package/lib/src/Terminals/Abstractions/IDeviceMessage.js.map +1 -0
  503. package/lib/src/Terminals/Abstractions/IDeviceResponse.d.ts +52 -0
  504. package/lib/src/Terminals/Abstractions/IDeviceResponse.js +3 -0
  505. package/lib/src/Terminals/Abstractions/IDeviceResponse.js.map +1 -0
  506. package/lib/src/Terminals/Abstractions/IRequestIdProvider.d.ts +3 -0
  507. package/lib/src/Terminals/Abstractions/IRequestIdProvider.js +3 -0
  508. package/lib/src/Terminals/Abstractions/IRequestIdProvider.js.map +1 -0
  509. package/lib/src/Terminals/Abstractions/IRequestSubGroup.d.ts +3 -0
  510. package/lib/src/Terminals/Abstractions/IRequestSubGroup.js +3 -0
  511. package/lib/src/Terminals/Abstractions/IRequestSubGroup.js.map +1 -0
  512. package/lib/src/Terminals/Abstractions/ITerminalConfiguration.d.ts +16 -0
  513. package/lib/src/Terminals/Abstractions/ITerminalConfiguration.js +3 -0
  514. package/lib/src/Terminals/Abstractions/ITerminalConfiguration.js.map +1 -0
  515. package/lib/src/Terminals/Abstractions/index.d.ts +7 -0
  516. package/lib/src/Terminals/Abstractions/index.js +24 -0
  517. package/lib/src/Terminals/Abstractions/index.js.map +1 -0
  518. package/lib/src/Terminals/Builders/TerminalAuthBuilder.d.ts +65 -0
  519. package/lib/src/Terminals/Builders/TerminalAuthBuilder.js +172 -0
  520. package/lib/src/Terminals/Builders/TerminalAuthBuilder.js.map +1 -0
  521. package/lib/src/Terminals/Builders/TerminalBuilder.d.ts +12 -0
  522. package/lib/src/Terminals/Builders/TerminalBuilder.js +32 -0
  523. package/lib/src/Terminals/Builders/TerminalBuilder.js.map +1 -0
  524. package/lib/src/Terminals/Builders/TerminalManageBuilder.d.ts +30 -0
  525. package/lib/src/Terminals/Builders/TerminalManageBuilder.js +95 -0
  526. package/lib/src/Terminals/Builders/TerminalManageBuilder.js.map +1 -0
  527. package/lib/src/Terminals/Builders/index.d.ts +2 -0
  528. package/lib/src/Terminals/Builders/index.js +19 -0
  529. package/lib/src/Terminals/Builders/index.js.map +1 -0
  530. package/lib/src/Terminals/ConnectionConfig.d.ts +20 -0
  531. package/lib/src/Terminals/ConnectionConfig.js +49 -0
  532. package/lib/src/Terminals/ConnectionConfig.js.map +1 -0
  533. package/lib/src/Terminals/DeviceController.d.ts +23 -0
  534. package/lib/src/Terminals/DeviceController.js +42 -0
  535. package/lib/src/Terminals/DeviceController.js.map +1 -0
  536. package/lib/src/Terminals/DeviceInterface.d.ts +21 -0
  537. package/lib/src/Terminals/DeviceInterface.js +50 -0
  538. package/lib/src/Terminals/DeviceInterface.js.map +1 -0
  539. package/lib/src/Terminals/DeviceMessage.d.ts +15 -0
  540. package/lib/src/Terminals/DeviceMessage.js +42 -0
  541. package/lib/src/Terminals/DeviceMessage.js.map +1 -0
  542. package/lib/src/Terminals/DeviceResponse.d.ts +10 -0
  543. package/lib/src/Terminals/DeviceResponse.js +16 -0
  544. package/lib/src/Terminals/DeviceResponse.js.map +1 -0
  545. package/lib/src/Terminals/Enums/ControlCodes.d.ts +5 -0
  546. package/lib/src/Terminals/Enums/ControlCodes.js +10 -0
  547. package/lib/src/Terminals/Enums/ControlCodes.js.map +1 -0
  548. package/lib/src/Terminals/Enums/index.d.ts +1 -0
  549. package/lib/src/Terminals/Enums/index.js +18 -0
  550. package/lib/src/Terminals/Enums/index.js.map +1 -0
  551. package/lib/src/Terminals/Enums.d.ts +12 -0
  552. package/lib/src/Terminals/Enums.js +18 -0
  553. package/lib/src/Terminals/Enums.js.map +1 -0
  554. package/lib/src/Terminals/SummaryResponse.d.ts +28 -0
  555. package/lib/src/Terminals/SummaryResponse.js +33 -0
  556. package/lib/src/Terminals/SummaryResponse.js.map +1 -0
  557. package/lib/src/Terminals/TerminalResponse.d.ts +42 -0
  558. package/lib/src/Terminals/TerminalResponse.js +49 -0
  559. package/lib/src/Terminals/TerminalResponse.js.map +1 -0
  560. package/lib/src/Terminals/TerminalUtils.d.ts +4 -0
  561. package/lib/src/Terminals/TerminalUtils.js +24 -0
  562. package/lib/src/Terminals/TerminalUtils.js.map +1 -0
  563. package/lib/src/Terminals/UPA/Entities/UpaMessageId.d.ts +20 -0
  564. package/lib/src/Terminals/UPA/Entities/UpaMessageId.js +25 -0
  565. package/lib/src/Terminals/UPA/Entities/UpaMessageId.js.map +1 -0
  566. package/lib/src/Terminals/UPA/Entities/index.d.ts +1 -0
  567. package/lib/src/Terminals/UPA/Entities/index.js +18 -0
  568. package/lib/src/Terminals/UPA/Entities/index.js.map +1 -0
  569. package/lib/src/Terminals/UPA/Interfaces/UpaMicInterface.d.ts +12 -0
  570. package/lib/src/Terminals/UPA/Interfaces/UpaMicInterface.js +76 -0
  571. package/lib/src/Terminals/UPA/Interfaces/UpaMicInterface.js.map +1 -0
  572. package/lib/src/Terminals/UPA/Interfaces/index.d.ts +1 -0
  573. package/lib/src/Terminals/UPA/Interfaces/index.js +18 -0
  574. package/lib/src/Terminals/UPA/Interfaces/index.js.map +1 -0
  575. package/lib/src/Terminals/UPA/Reponses/TransactionResponse.d.ts +53 -0
  576. package/lib/src/Terminals/UPA/Reponses/TransactionResponse.js +70 -0
  577. package/lib/src/Terminals/UPA/Reponses/TransactionResponse.js.map +1 -0
  578. package/lib/src/Terminals/UPA/Reponses/index.d.ts +1 -0
  579. package/lib/src/Terminals/UPA/Reponses/index.js +18 -0
  580. package/lib/src/Terminals/UPA/Reponses/index.js.map +1 -0
  581. package/lib/src/Terminals/UPA/Request/BaseRequest.d.ts +7 -0
  582. package/lib/src/Terminals/UPA/Request/BaseRequest.js +11 -0
  583. package/lib/src/Terminals/UPA/Request/BaseRequest.js.map +1 -0
  584. package/lib/src/Terminals/UPA/Request/GroupRequest.d.ts +5 -0
  585. package/lib/src/Terminals/UPA/Request/GroupRequest.js +9 -0
  586. package/lib/src/Terminals/UPA/Request/GroupRequest.js.map +1 -0
  587. package/lib/src/Terminals/UPA/Request/RequestParams.d.ts +9 -0
  588. package/lib/src/Terminals/UPA/Request/RequestParams.js +14 -0
  589. package/lib/src/Terminals/UPA/Request/RequestParams.js.map +1 -0
  590. package/lib/src/Terminals/UPA/Request/RootRequest.d.ts +5 -0
  591. package/lib/src/Terminals/UPA/Request/RootRequest.js +9 -0
  592. package/lib/src/Terminals/UPA/Request/RootRequest.js.map +1 -0
  593. package/lib/src/Terminals/UPA/Request/TransactionRequest.d.ts +10 -0
  594. package/lib/src/Terminals/UPA/Request/TransactionRequest.js +15 -0
  595. package/lib/src/Terminals/UPA/Request/TransactionRequest.js.map +1 -0
  596. package/lib/src/Terminals/UPA/Request/index.d.ts +5 -0
  597. package/lib/src/Terminals/UPA/Request/index.js +22 -0
  598. package/lib/src/Terminals/UPA/Request/index.js.map +1 -0
  599. package/lib/src/Terminals/UPA/UpaController.d.ts +16 -0
  600. package/lib/src/Terminals/UPA/UpaController.js +213 -0
  601. package/lib/src/Terminals/UPA/UpaController.js.map +1 -0
  602. package/lib/src/Terminals/UPA/UpaInterface.d.ts +10 -0
  603. package/lib/src/Terminals/UPA/UpaInterface.js +44 -0
  604. package/lib/src/Terminals/UPA/UpaInterface.js.map +1 -0
  605. package/lib/src/Terminals/UPA/UpaMessageType.d.ts +8 -0
  606. package/lib/src/Terminals/UPA/UpaMessageType.js +13 -0
  607. package/lib/src/Terminals/UPA/UpaMessageType.js.map +1 -0
  608. package/lib/src/Terminals/UPA/index.d.ts +7 -0
  609. package/lib/src/Terminals/UPA/index.js +24 -0
  610. package/lib/src/Terminals/UPA/index.js.map +1 -0
  611. package/lib/src/Terminals/index.d.ts +8 -0
  612. package/lib/src/Terminals/index.js +25 -0
  613. package/lib/src/Terminals/index.js.map +1 -0
  614. package/lib/src/Utils/CardUtils.d.ts +13 -0
  615. package/lib/src/Utils/CardUtils.js +221 -0
  616. package/lib/src/Utils/CardUtils.js.map +1 -0
  617. package/lib/src/Utils/CountryUtils.d.ts +9 -0
  618. package/lib/src/Utils/CountryUtils.js +131 -0
  619. package/lib/src/Utils/CountryUtils.js.map +1 -0
  620. package/lib/src/Utils/GenerationUtils.d.ts +6 -0
  621. package/lib/src/Utils/GenerationUtils.js +79 -0
  622. package/lib/src/Utils/GenerationUtils.js.map +1 -0
  623. package/lib/src/Utils/IRawRequestBuilder.d.ts +3 -0
  624. package/lib/src/Utils/IRawRequestBuilder.js +3 -0
  625. package/lib/src/Utils/IRawRequestBuilder.js.map +1 -0
  626. package/lib/src/Utils/InputValidation.d.ts +12 -0
  627. package/lib/src/Utils/InputValidation.js +71 -0
  628. package/lib/src/Utils/InputValidation.js.map +1 -0
  629. package/lib/src/Utils/Logging/Logger.d.ts +32 -0
  630. package/lib/src/Utils/Logging/Logger.js +209 -0
  631. package/lib/src/Utils/Logging/Logger.js.map +1 -0
  632. package/lib/src/Utils/Logging/ProtectSensitiveData.d.ts +11 -0
  633. package/lib/src/Utils/Logging/ProtectSensitiveData.js +23 -0
  634. package/lib/src/Utils/Logging/ProtectSensitiveData.js.map +1 -0
  635. package/lib/src/Utils/Logging/SampleRequestLogger.d.ts +12 -0
  636. package/lib/src/Utils/Logging/SampleRequestLogger.js +38 -0
  637. package/lib/src/Utils/Logging/SampleRequestLogger.js.map +1 -0
  638. package/lib/src/Utils/Logging/index.d.ts +3 -0
  639. package/lib/src/Utils/Logging/index.js +20 -0
  640. package/lib/src/Utils/Logging/index.js.map +1 -0
  641. package/lib/src/Utils/Sha1.d.ts +6 -0
  642. package/lib/src/Utils/Sha1.js +231 -0
  643. package/lib/src/Utils/Sha1.js.map +1 -0
  644. package/lib/src/Utils/StringUtils.d.ts +17 -0
  645. package/lib/src/Utils/StringUtils.js +95 -0
  646. package/lib/src/Utils/StringUtils.js.map +1 -0
  647. package/lib/src/Utils/index.d.ts +6 -0
  648. package/lib/src/Utils/index.js +23 -0
  649. package/lib/src/Utils/index.js.map +1 -0
  650. package/lib/src/index.d.ts +13 -0
  651. package/lib/src/index.js +34 -0
  652. package/lib/src/index.js.map +1 -0
  653. package/lib/test/Data/BaseGpApiTestConfig.d.ts +14 -0
  654. package/lib/test/Data/BaseGpApiTestConfig.js +50 -0
  655. package/lib/test/Data/BaseGpApiTestConfig.js.map +1 -0
  656. package/lib/test/Data/GpApi3DSTestCards.d.ts +17 -0
  657. package/lib/test/Data/GpApi3DSTestCards.js +22 -0
  658. package/lib/test/Data/GpApi3DSTestCards.js.map +1 -0
  659. package/lib/test/Data/TestCards.d.ts +24 -0
  660. package/lib/test/Data/TestCards.js +220 -0
  661. package/lib/test/Data/TestCards.js.map +1 -0
  662. package/lib/test/Data/TestChecks.d.ts +4 -0
  663. package/lib/test/Data/TestChecks.js +27 -0
  664. package/lib/test/Data/TestChecks.js.map +1 -0
  665. package/lib/test/Data/index.d.ts +4 -0
  666. package/lib/test/Data/index.js +21 -0
  667. package/lib/test/Data/index.js.map +1 -0
  668. package/lib/test/Integration/Gateways/AcsResponse.d.ts +12 -0
  669. package/lib/test/Integration/Gateways/AcsResponse.js +33 -0
  670. package/lib/test/Integration/Gateways/AcsResponse.js.map +1 -0
  671. package/lib/test/Integration/Gateways/GpApiConnector/3DS2Test.d.ts +1 -0
  672. package/lib/test/Integration/Gateways/GpApiConnector/3DS2Test.js +1029 -0
  673. package/lib/test/Integration/Gateways/GpApiConnector/3DS2Test.js.map +1 -0
  674. package/lib/test/Integration/Gateways/GpApiConnector/3DSecureTest.d.ts +1 -0
  675. package/lib/test/Integration/Gateways/GpApiConnector/3DSecureTest.js +649 -0
  676. package/lib/test/Integration/Gateways/GpApiConnector/3DSecureTest.js.map +1 -0
  677. package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.d.ts +1 -0
  678. package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.js +109 -0
  679. package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.js.map +1 -0
  680. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.d.ts +1 -0
  681. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.js +1023 -0
  682. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.js.map +1 -0
  683. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardPresentTest.d.ts +1 -0
  684. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardPresentTest.js +439 -0
  685. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardPresentTest.js.map +1 -0
  686. package/lib/test/Integration/Gateways/GpApiConnector/DebitCardTest.d.ts +1 -0
  687. package/lib/test/Integration/Gateways/GpApiConnector/DebitCardTest.js +143 -0
  688. package/lib/test/Integration/Gateways/GpApiConnector/DebitCardTest.js.map +1 -0
  689. package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactionsTest.d.ts +1 -0
  690. package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactionsTest.js +434 -0
  691. package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactionsTest.js.map +1 -0
  692. package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethodsTest.d.ts +1 -0
  693. package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethodsTest.js +217 -0
  694. package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethodsTest.js.map +1 -0
  695. package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.d.ts +1 -0
  696. package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.js +337 -0
  697. package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.js.map +1 -0
  698. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.d.ts +1 -0
  699. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.js +2446 -0
  700. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.js.map +1 -0
  701. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.d.ts +1 -0
  702. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.js +506 -0
  703. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.js.map +1 -0
  704. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.d.ts +1 -0
  705. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.js +1296 -0
  706. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.js.map +1 -0
  707. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.d.ts +1 -0
  708. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.js +847 -0
  709. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.js.map +1 -0
  710. package/lib/test/Integration/Gateways/GpEcomConnector/CreditTest.d.ts +1 -0
  711. package/lib/test/Integration/Gateways/GpEcomConnector/CreditTest.js +215 -0
  712. package/lib/test/Integration/Gateways/GpEcomConnector/CreditTest.js.map +1 -0
  713. package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.d.ts +1 -0
  714. package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.js +99 -0
  715. package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.js.map +1 -0
  716. package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.d.ts +1 -0
  717. package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.js +133 -0
  718. package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.js.map +1 -0
  719. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.d.ts +1 -0
  720. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js +59 -0
  721. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js.map +1 -0
  722. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.d.ts +1 -0
  723. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js +378 -0
  724. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js.map +1 -0
  725. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.d.ts +1 -0
  726. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js +86 -0
  727. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js.map +1 -0
  728. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.d.ts +1 -0
  729. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js +1723 -0
  730. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js.map +1 -0
  731. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.d.ts +1 -0
  732. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js +86 -0
  733. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js.map +1 -0
  734. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.d.ts +1 -0
  735. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js +1760 -0
  736. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js.map +1 -0
  737. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.d.ts +1 -0
  738. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js +420 -0
  739. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js.map +1 -0
  740. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.d.ts +1 -0
  741. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js +2221 -0
  742. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js.map +1 -0
  743. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.d.ts +1 -0
  744. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js +392 -0
  745. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js.map +1 -0
  746. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.d.ts +1 -0
  747. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js +88 -0
  748. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js.map +1 -0
  749. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.d.ts +1 -0
  750. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js +72 -0
  751. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js.map +1 -0
  752. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.d.ts +1 -0
  753. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js +111 -0
  754. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js.map +1 -0
  755. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.d.ts +1 -0
  756. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js +147 -0
  757. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js.map +1 -0
  758. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.d.ts +1 -0
  759. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js +101 -0
  760. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js.map +1 -0
  761. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.d.ts +1 -0
  762. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js +50 -0
  763. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js.map +1 -0
  764. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.d.ts +1 -0
  765. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.js +44 -0
  766. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.js.map +1 -0
  767. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.d.ts +1 -0
  768. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.js +221 -0
  769. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.js.map +1 -0
  770. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.d.ts +1 -0
  771. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.js +60 -0
  772. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.js.map +1 -0
  773. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.d.ts +1 -0
  774. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.js +80 -0
  775. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.js.map +1 -0
  776. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.d.ts +39 -0
  777. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.js +393 -0
  778. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.js.map +1 -0
  779. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.d.ts +1 -0
  780. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.js +44 -0
  781. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.js.map +1 -0
  782. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.d.ts +1 -0
  783. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.js +330 -0
  784. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.js.map +1 -0
  785. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.d.ts +1 -0
  786. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.js +60 -0
  787. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.js.map +1 -0
  788. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.d.ts +1 -0
  789. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.js +80 -0
  790. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.js.map +1 -0
  791. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.d.ts +34 -0
  792. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.js +322 -0
  793. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.js.map +1 -0
  794. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.d.ts +4 -0
  795. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.js +28 -0
  796. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.js.map +1 -0
  797. package/lib/test/Integration/Gateways/Terminals/RequestIdProvider.d.ts +4 -0
  798. package/lib/test/Integration/Gateways/Terminals/RequestIdProvider.js +10 -0
  799. package/lib/test/Integration/Gateways/Terminals/RequestIdProvider.js.map +1 -0
  800. package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.d.ts +1 -0
  801. package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.js +149 -0
  802. package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.js.map +1 -0
  803. package/lib/test/Integration/Gateways/ThreeDSecureAsClient.d.ts +16 -0
  804. package/lib/test/Integration/Gateways/ThreeDSecureAsClient.js +212 -0
  805. package/lib/test/Integration/Gateways/ThreeDSecureAsClient.js.map +1 -0
  806. package/lib/test/Integration/Services/CheckServiceTest.d.ts +1 -0
  807. package/lib/test/Integration/Services/CheckServiceTest.js +45 -0
  808. package/lib/test/Integration/Services/CheckServiceTest.js.map +1 -0
  809. package/lib/test/Integration/Services/CreditServiceTest.d.ts +1 -0
  810. package/lib/test/Integration/Services/CreditServiceTest.js +174 -0
  811. package/lib/test/Integration/Services/CreditServiceTest.js.map +1 -0
  812. package/lib/test/Integration/Services/DebitServiceTest.d.ts +1 -0
  813. package/lib/test/Integration/Services/DebitServiceTest.js +81 -0
  814. package/lib/test/Integration/Services/DebitServiceTest.js.map +1 -0
  815. package/lib/test/Integration/Services/EBTServiceTest.d.ts +1 -0
  816. package/lib/test/Integration/Services/EBTServiceTest.js +64 -0
  817. package/lib/test/Integration/Services/EBTServiceTest.js.map +1 -0
  818. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.d.ts +1 -0
  819. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js +111 -0
  820. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js.map +1 -0
  821. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.d.ts +1 -0
  822. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js +62 -0
  823. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js.map +1 -0
  824. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.d.ts +1 -0
  825. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js +34 -0
  826. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js.map +1 -0
  827. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.d.ts +1 -0
  828. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js +125 -0
  829. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js.map +1 -0
  830. package/package.json +10 -2
  831. package/.eslintignore +0 -9
  832. package/.eslintrc.cjs +0 -39
  833. package/.prettierrc +0 -14
  834. package/.travis.yml +0 -25
  835. package/tsconfig.eslint.json +0 -15
@@ -0,0 +1,1029 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const ava_1 = __importDefault(require("ava"));
7
+ const src_1 = require("../../../../src");
8
+ const Data_1 = require("../../../Data");
9
+ const ThreeDSecureAsClient_1 = require("../ThreeDSecureAsClient");
10
+ const AcsResponse_1 = require("../AcsResponse");
11
+ const runSerially = true;
12
+ const test = runSerially ? ava_1.default.serial : ava_1.default;
13
+ const currency = "GBP";
14
+ const amount = "10.01";
15
+ const date = new Date();
16
+ let gatewayProvider;
17
+ const card = new src_1.CreditCardData();
18
+ card.expMonth = (date.getMonth() + 1).toString().padStart(2, "0");
19
+ card.expYear = (date.getFullYear() + 1).toString();
20
+ card.cardHolderName = "James Mason";
21
+ const shippingAddress = new src_1.Address();
22
+ shippingAddress.streetAddress1 = "Apartment 852";
23
+ shippingAddress.streetAddress2 = "Complex 741";
24
+ shippingAddress.streetAddress3 = "no";
25
+ shippingAddress.city = "Chicago";
26
+ shippingAddress.postalCode = "5001";
27
+ shippingAddress.state = "IL";
28
+ shippingAddress.countryCode = "840";
29
+ const browserData = new src_1.BrowserData();
30
+ browserData.acceptHeader =
31
+ "text/html,application/xhtml+xml,application/xml;q=9,image/webp,img/apng,*/*;q=0.8";
32
+ browserData.colorDepth = src_1.ColorDepth.TwentyFourBits;
33
+ browserData.ipAddress = "123.123.123.123";
34
+ browserData.javaEnabled = true;
35
+ browserData.javaScriptEnabled = true;
36
+ browserData.language = "en";
37
+ browserData.screenHeight = 1080;
38
+ browserData.screenWidth = 1920;
39
+ browserData.challengWindowSize = src_1.ChallengeWindowSize.Windowed600x400;
40
+ browserData.timeZone = "0";
41
+ browserData.userAgent =
42
+ "Mozilla/5.0 (Windows NT 6.1; Win64, x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36";
43
+ test.before(() => {
44
+ const config = Data_1.BaseGpApiTestConfig.gpApiSetupConfig(src_1.Channel.CardNotPresent);
45
+ gatewayProvider = config.gatewayProvider;
46
+ src_1.ServicesContainer.configureService(config);
47
+ });
48
+ test.beforeEach(() => {
49
+ card.number = Data_1.GpApi3DSTestCards.CARD_CHALLENGE_REQUIRED_V2_1;
50
+ });
51
+ test("full cycle v2 frictionless", async (t) => {
52
+ card.number = Data_1.GpApi3DSTestCards.CARD_AUTH_SUCCESSFUL_V2_2;
53
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
54
+ .withCurrency(currency)
55
+ .withAmount(amount)
56
+ .execute();
57
+ assertCheckEnrollment3DSV2(t, secureEcom);
58
+ if (secureEcom instanceof src_1.ThreeDSecure) {
59
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
60
+ const initAuth = await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
61
+ .withAmount(amount)
62
+ .withCurrency(currency)
63
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
64
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
65
+ .withOrderCreateDate(formatedDate)
66
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
67
+ .withBrowserData(browserData)
68
+ .execute();
69
+ t.truthy(initAuth);
70
+ initAuth instanceof src_1.ThreeDSecure &&
71
+ t.is(src_1.Secure3dStatus.SuccessAuthenticated, initAuth.status) &&
72
+ t.is("YES", initAuth.liabilityShift);
73
+ const secureEcom2 = await src_1.Secure3dService.getAuthenticationData()
74
+ .withServerTransactionId(secureEcom.serverTransactionId)
75
+ .withAmount(amount)
76
+ .execute();
77
+ card.threeDSecure = secureEcom2;
78
+ secureEcom2 instanceof src_1.ThreeDSecure &&
79
+ t.is(src_1.Secure3dStatus.SuccessAuthenticated, secureEcom2.status);
80
+ const transaction = await card
81
+ .charge(amount)
82
+ .withCurrency(currency)
83
+ .execute();
84
+ t.truthy(transaction);
85
+ t.is("SUCCESS", transaction.responseCode);
86
+ t.is(src_1.TransactionStatus.CAPTURED, transaction.responseMessage);
87
+ }
88
+ });
89
+ test("full cycle v2 frictionless failed", async (t) => {
90
+ card.number = Data_1.GpApi3DSTestCards.CARD_AUTH_FAILED_V2_2;
91
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
92
+ .withCurrency(currency)
93
+ .withAmount(amount)
94
+ .execute();
95
+ assertCheckEnrollment3DSV2(t, secureEcom);
96
+ if (secureEcom instanceof src_1.ThreeDSecure) {
97
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
98
+ const initAuth = await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
99
+ .withAmount(amount)
100
+ .withCurrency(currency)
101
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
102
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
103
+ .withOrderCreateDate(formatedDate)
104
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
105
+ .withBrowserData(browserData)
106
+ .execute();
107
+ t.truthy(initAuth);
108
+ initAuth instanceof src_1.ThreeDSecure &&
109
+ t.is(src_1.Secure3dStatus.NotAuthenticated, initAuth.status) &&
110
+ t.not("YES", initAuth.liabilityShift);
111
+ const secureEcom2 = await src_1.Secure3dService.getAuthenticationData()
112
+ .withServerTransactionId(secureEcom.serverTransactionId)
113
+ .withAmount(amount)
114
+ .execute();
115
+ card.threeDSecure = secureEcom2;
116
+ secureEcom2 instanceof src_1.ThreeDSecure &&
117
+ t.is(src_1.Secure3dStatus.NotAuthenticated, secureEcom2.status);
118
+ const transaction = await card
119
+ .charge(amount)
120
+ .withCurrency(currency)
121
+ .execute();
122
+ t.truthy(transaction);
123
+ t.is("SUCCESS", transaction.responseCode);
124
+ t.is(src_1.TransactionStatus.CAPTURED, transaction.responseMessage);
125
+ }
126
+ });
127
+ test("full cycle v2 frictionless with card tokenization", async (t) => {
128
+ card.number = Data_1.GpApi3DSTestCards.CARD_AUTH_SUCCESSFUL_V2_2;
129
+ const tokenizeResponse = await card.tokenize().execute();
130
+ const tokenId = tokenizeResponse.token;
131
+ const tokenizedCard = new src_1.CreditCardData();
132
+ tokenizedCard.token = tokenId;
133
+ tokenizedCard.cardHolderName = "James Mason";
134
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(tokenizedCard)
135
+ .withCurrency(currency)
136
+ .withAmount(amount)
137
+ .execute();
138
+ assertCheckEnrollment3DSV2(t, secureEcom);
139
+ t.truthy(secureEcom.payerAuthenticationRequest);
140
+ if (secureEcom instanceof src_1.ThreeDSecure) {
141
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
142
+ const initAuth = await src_1.Secure3dService.initiateAuthentication(tokenizedCard, secureEcom)
143
+ .withAmount(amount)
144
+ .withCurrency(currency)
145
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
146
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
147
+ .withOrderCreateDate(formatedDate)
148
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
149
+ .withBrowserData(browserData)
150
+ .execute();
151
+ t.truthy(initAuth);
152
+ initAuth instanceof src_1.ThreeDSecure &&
153
+ t.is(src_1.Secure3dStatus.SuccessAuthenticated, initAuth.status) &&
154
+ t.is("YES", initAuth.liabilityShift);
155
+ const secureEcom2 = await src_1.Secure3dService.getAuthenticationData()
156
+ .withServerTransactionId(secureEcom.serverTransactionId)
157
+ .withAmount(amount)
158
+ .execute();
159
+ card.threeDSecure = secureEcom2;
160
+ secureEcom2 instanceof src_1.ThreeDSecure &&
161
+ t.is(src_1.Secure3dStatus.SuccessAuthenticated, secureEcom2.status);
162
+ const transaction = await card
163
+ .charge(amount)
164
+ .withCurrency(currency)
165
+ .execute();
166
+ t.truthy(transaction);
167
+ t.is("SUCCESS", transaction.responseCode);
168
+ t.is(src_1.TransactionStatus.CAPTURED, transaction.responseMessage);
169
+ }
170
+ });
171
+ test("full cycle v2 card holder enrolled challenge required", async (t) => {
172
+ card.number = Data_1.GpApi3DSTestCards.CARD_CHALLENGE_REQUIRED_V2_1;
173
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
174
+ .withCurrency(currency)
175
+ .withAmount(amount)
176
+ .execute();
177
+ assertCheckEnrollment3DSV2(t, secureEcom);
178
+ if (secureEcom instanceof src_1.ThreeDSecure) {
179
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
180
+ const response = await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
181
+ .withAmount(amount)
182
+ .withCurrency(currency)
183
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
184
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
185
+ .withOrderCreateDate(formatedDate)
186
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
187
+ .withBrowserData(browserData)
188
+ .execute();
189
+ t.truthy(response);
190
+ assertInitiate3DSV2(t, response);
191
+ t.is(src_1.Secure3dStatus.ChallengeRequired, response.status);
192
+ t.truthy(response.payerAuthenticationRequest);
193
+ t.truthy(response.issuerAcsUrl);
194
+ const authClient = new ThreeDSecureAsClient_1.ThreeDSecureAcsClient(secureEcom.issuerAcsUrl);
195
+ authClient.setGatewayProvider(gatewayProvider);
196
+ const authResponse = await authClient.authenticate_v2(response);
197
+ if (authResponse instanceof AcsResponse_1.AcsResponse) {
198
+ t.true(authResponse.getStatus());
199
+ t.truthy(authResponse.getMerchantData());
200
+ const secureEcom2 = await src_1.Secure3dService.getAuthenticationData()
201
+ .withServerTransactionId(authResponse.getMerchantData())
202
+ .withAmount(amount)
203
+ .execute();
204
+ card.threeDSecure = secureEcom2;
205
+ secureEcom2 instanceof src_1.ThreeDSecure &&
206
+ t.is(src_1.Secure3dStatus.SuccessAuthenticated, secureEcom2.status);
207
+ const transaction = await card
208
+ .charge(amount)
209
+ .withCurrency(currency)
210
+ .execute();
211
+ t.truthy(transaction);
212
+ t.is("SUCCESS", transaction.responseCode);
213
+ t.is(src_1.TransactionStatus.CAPTURED, transaction.responseMessage);
214
+ }
215
+ }
216
+ });
217
+ test("card holder enrolled challenge required v2 2", async (t) => {
218
+ card.number = Data_1.GpApi3DSTestCards.CARD_CHALLENGE_REQUIRED_V2_1;
219
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
220
+ .withCurrency(currency)
221
+ .withAmount(amount)
222
+ .execute();
223
+ assertCheckEnrollment3DSV2(t, secureEcom);
224
+ });
225
+ test("card holder enrolled challenge required v2 - with idempotency key", async (t) => {
226
+ card.number = Data_1.GpApi3DSTestCards.CARD_CHALLENGE_REQUIRED_V2_1;
227
+ const idempotencyKey = src_1.GenerationUtils.getGuuid();
228
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
229
+ .withCurrency(currency)
230
+ .withIdempotencyKey(idempotencyKey)
231
+ .withAmount(amount)
232
+ .execute();
233
+ assertCheckEnrollment3DSV2(t, secureEcom);
234
+ const error = await t.throwsAsync(async () => await src_1.Secure3dService.checkEnrollment(card)
235
+ .withCurrency(currency)
236
+ .withIdempotencyKey(idempotencyKey)
237
+ .withAmount(amount)
238
+ .execute(), {
239
+ instanceOf: src_1.GatewayError,
240
+ });
241
+ t.truthy(error);
242
+ if (error) {
243
+ t.is("40039", error.responseCode);
244
+ t.is(error.responseMessage.includes("Idempotency Key seen before"), true);
245
+ }
246
+ });
247
+ test("card holder enrolled challenge required v2 - with tokenized card", async (t) => {
248
+ const response = await card.tokenize().execute();
249
+ const tokenizedCard = new src_1.CreditCardData();
250
+ tokenizedCard.token = response.token;
251
+ tokenizedCard.cardHolderName = "James Mason";
252
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
253
+ .withCurrency(currency)
254
+ .withAmount(amount)
255
+ .execute();
256
+ assertCheckEnrollment3DSV2(t, secureEcom);
257
+ });
258
+ test("card holder enrolled challenge required v2 - all preference value", async (t) => {
259
+ for (const value of Object.values(src_1.ChallengeRequestIndicator)) {
260
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
261
+ .withCurrency(currency)
262
+ .withAmount(amount)
263
+ .withChallengeRequestIndicator(value)
264
+ .execute();
265
+ assertCheckEnrollment3DSV2(t, secureEcom);
266
+ }
267
+ });
268
+ test("card holder enrolled challenge required v2 - stored credentials", async (t) => {
269
+ const storedCredentials = new src_1.StoredCredential();
270
+ storedCredentials.initiator = src_1.EnumMapping.mapStoredCredentialInitiator(gatewayProvider, src_1.StoredCredentialInitiator.Merchant);
271
+ storedCredentials.type = src_1.StoredCredentialType.INSTALLMENT;
272
+ storedCredentials.sequence = src_1.StoredCredentialSequence.SUBSEQUENT;
273
+ storedCredentials.reason = src_1.StoredCredentialReason.INCREMENTAL;
274
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
275
+ .withCurrency(currency)
276
+ .withAmount(amount)
277
+ .withStoredCredential(storedCredentials)
278
+ .execute();
279
+ assertCheckEnrollment3DSV2(t, secureEcom);
280
+ });
281
+ test("card holder enrolled challenge required v2 - all sources", async (t) => {
282
+ for (const value of Object.values(src_1.AuthenticationSource)) {
283
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
284
+ .withCurrency(currency)
285
+ .withAmount(amount)
286
+ .withAuthenticationSource(value)
287
+ .execute();
288
+ assertCheckEnrollment3DSV2(t, secureEcom);
289
+ }
290
+ });
291
+ test("card holder enrolled challenge required v2 - with null payment method", async (t) => {
292
+ // below validation is not working on PHP and node has another error
293
+ // this.validations
294
+ // .of("transactionType", TransactionType.VerifyEnrolled)
295
+ // .check("paymentMethod")
296
+ // .isNotNull();
297
+ const error = await t.throwsAsync(async () => await src_1.Secure3dService.checkEnrollment(card)
298
+ .withCurrency(currency)
299
+ .withPaymentMethod(null)
300
+ .withAmount(amount)
301
+ .execute(), {
302
+ instanceOf: src_1.BuilderError,
303
+ });
304
+ t.truthy(error);
305
+ if (error) {
306
+ // t.is("40007", error?.responseCode);
307
+ // t.is(
308
+ // error.message.includes(
309
+ // "Status Code: INVALID_REQUEST_DATA - Request expects the following conditionally mandatory fields number,expiry_month,expiry_year.",
310
+ // ),
311
+ // true,
312
+ // );
313
+ t.is(error.message.includes("paymentMethod cannot be null for this transaction type."), true);
314
+ }
315
+ });
316
+ test("card holder enrolled frictionless v2", async (t) => {
317
+ card.number = Data_1.GpApi3DSTestCards.CARD_AUTH_SUCCESSFUL_V2_2;
318
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
319
+ .withCurrency(currency)
320
+ .withAmount(amount)
321
+ .execute();
322
+ assertCheckEnrollment3DSV2(t, secureEcom);
323
+ });
324
+ test("card holder enrolled frictionless v2 - with idempotency key", async (t) => {
325
+ card.number = Data_1.GpApi3DSTestCards.CARD_AUTH_SUCCESSFUL_V2_2;
326
+ const idempotencyKey = src_1.GenerationUtils.getGuuid();
327
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
328
+ .withCurrency(currency)
329
+ .withIdempotencyKey(idempotencyKey)
330
+ .withAmount(amount)
331
+ .execute();
332
+ assertCheckEnrollment3DSV2(t, secureEcom);
333
+ const error = await t.throwsAsync(async () => await src_1.Secure3dService.checkEnrollment(card)
334
+ .withCurrency(currency)
335
+ .withIdempotencyKey(idempotencyKey)
336
+ .withAmount(amount)
337
+ .execute(), {
338
+ instanceOf: src_1.GatewayError,
339
+ });
340
+ t.truthy(error);
341
+ if (error) {
342
+ t.is("40039", error.responseCode);
343
+ t.is(error.responseMessage.includes("Idempotency Key seen before"), true);
344
+ }
345
+ });
346
+ test("card holder enrolled frictionless v2 - with tokenized card", async (t) => {
347
+ card.number = Data_1.GpApi3DSTestCards.CARD_AUTH_SUCCESSFUL_V2_2;
348
+ const response = await card.tokenize().execute();
349
+ const tokenizedCard = new src_1.CreditCardData();
350
+ tokenizedCard.token = response.token;
351
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(tokenizedCard)
352
+ .withCurrency(currency)
353
+ .withAmount(amount)
354
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
355
+ .execute();
356
+ assertCheckEnrollment3DSV2(t, secureEcom);
357
+ });
358
+ test("card holder enrolled frictionless v2 - all preference values", async (t) => {
359
+ card.number = Data_1.GpApi3DSTestCards.CARD_AUTH_SUCCESSFUL_V2_2;
360
+ for (const value of Object.values(src_1.ChallengeRequestIndicator)) {
361
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
362
+ .withCurrency(currency)
363
+ .withAmount(amount)
364
+ .withChallengeRequestIndicator(value)
365
+ .execute();
366
+ assertCheckEnrollment3DSV2(t, secureEcom);
367
+ }
368
+ });
369
+ test("card holder enrolled frictionless v2 - stored credentials", async (t) => {
370
+ card.number = Data_1.GpApi3DSTestCards.CARD_AUTH_SUCCESSFUL_V2_2;
371
+ const storedCredentials = new src_1.StoredCredential();
372
+ storedCredentials.initiator = src_1.EnumMapping.mapStoredCredentialInitiator(gatewayProvider, src_1.StoredCredentialInitiator.Merchant);
373
+ storedCredentials.type = src_1.StoredCredentialType.INSTALLMENT;
374
+ storedCredentials.sequence = src_1.StoredCredentialSequence.SUBSEQUENT;
375
+ storedCredentials.reason = src_1.StoredCredentialReason.INCREMENTAL;
376
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
377
+ .withCurrency(currency)
378
+ .withAmount(amount)
379
+ .withStoredCredential(storedCredentials)
380
+ .execute();
381
+ assertCheckEnrollment3DSV2(t, secureEcom);
382
+ });
383
+ test("card holder enrolled frictionless v2 - all sources", async (t) => {
384
+ for (const value of Object.values(src_1.AuthenticationSource)) {
385
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
386
+ .withCurrency(currency)
387
+ .withAmount(amount)
388
+ .withAuthenticationSource(value)
389
+ .execute();
390
+ assertCheckEnrollment3DSV2(t, secureEcom);
391
+ }
392
+ });
393
+ test("card holder challenge required - post result", async (t) => {
394
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
395
+ .withCurrency(currency)
396
+ .withAmount(amount)
397
+ .execute();
398
+ assertCheckEnrollment3DSV2(t, secureEcom);
399
+ if (!(secureEcom instanceof src_1.Transaction)) {
400
+ t.is(src_1.Secure3dStatus.Enrolled, secureEcom?.enrolled);
401
+ t.is(src_1.Secure3dVersion.TWO, secureEcom.getVersion());
402
+ t.is(src_1.Secure3dStatus.Available, secureEcom.status);
403
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
404
+ const initAuth = await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
405
+ .withAmount(amount)
406
+ .withCurrency(currency)
407
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
408
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
409
+ .withOrderCreateDate(formatedDate)
410
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
411
+ .withBrowserData(browserData)
412
+ .execute();
413
+ t.truthy(initAuth);
414
+ if (initAuth instanceof src_1.ThreeDSecure) {
415
+ t.is(src_1.Secure3dStatus.ChallengeRequired, initAuth.status);
416
+ t.truthy(initAuth.issuerAcsUrl);
417
+ t.truthy(initAuth.payerAuthenticationRequest);
418
+ const authClient = new ThreeDSecureAsClient_1.ThreeDSecureAcsClient(secureEcom.issuerAcsUrl);
419
+ authClient.setGatewayProvider(gatewayProvider);
420
+ const authResponse = await authClient.authenticate_v2(initAuth);
421
+ if (authResponse instanceof AcsResponse_1.AcsResponse) {
422
+ t.true(authResponse.getStatus());
423
+ t.truthy(authResponse.getMerchantData());
424
+ const secureEcom2 = await src_1.Secure3dService.getAuthenticationData()
425
+ .withServerTransactionId(authResponse.getMerchantData())
426
+ .withAmount(amount)
427
+ .execute();
428
+ card.threeDSecure = secureEcom2;
429
+ if (secureEcom2 instanceof src_1.ThreeDSecure) {
430
+ t.is(src_1.Secure3dStatus.SuccessAuthenticated, secureEcom2.status);
431
+ t.is("05", String(secureEcom2.eci));
432
+ t.is("2.1.0", secureEcom2.messageVersion);
433
+ t.truthy(secureEcom2.acsTransactionId);
434
+ t.truthy(secureEcom2.serverTransactionId);
435
+ t.truthy(secureEcom2.directoryServerTransactionId);
436
+ }
437
+ }
438
+ }
439
+ }
440
+ });
441
+ test("card holder challenge required - post result with idempotency key", async (t) => {
442
+ const idempotencyKey = src_1.GenerationUtils.getGuuid();
443
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
444
+ .withCurrency(currency)
445
+ .withAmount(amount)
446
+ .execute();
447
+ assertCheckEnrollment3DSV2(t, secureEcom);
448
+ if (!(secureEcom instanceof src_1.Transaction)) {
449
+ t.is(src_1.Secure3dStatus.Enrolled, secureEcom?.enrolled);
450
+ t.is(src_1.Secure3dVersion.TWO, secureEcom.getVersion());
451
+ t.is(src_1.Secure3dStatus.Available, secureEcom.status);
452
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
453
+ const initAuth = await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
454
+ .withAmount(amount)
455
+ .withCurrency(currency)
456
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
457
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
458
+ .withOrderCreateDate(formatedDate)
459
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
460
+ .withBrowserData(browserData)
461
+ .execute();
462
+ t.truthy(initAuth);
463
+ if (initAuth instanceof src_1.ThreeDSecure) {
464
+ t.is(src_1.Secure3dStatus.ChallengeRequired, initAuth.status);
465
+ t.truthy(initAuth.issuerAcsUrl);
466
+ t.truthy(initAuth.payerAuthenticationRequest);
467
+ const authClient = new ThreeDSecureAsClient_1.ThreeDSecureAcsClient(secureEcom.issuerAcsUrl);
468
+ authClient.setGatewayProvider(gatewayProvider);
469
+ const authResponse = await authClient.authenticate_v2(initAuth);
470
+ if (authResponse instanceof AcsResponse_1.AcsResponse) {
471
+ t.true(authResponse.getStatus());
472
+ t.truthy(authResponse.getMerchantData());
473
+ const secureEcom2 = await src_1.Secure3dService.getAuthenticationData()
474
+ .withServerTransactionId(authResponse.getMerchantData())
475
+ .withIdempotencyKey(idempotencyKey)
476
+ .withAmount(amount)
477
+ .execute();
478
+ card.threeDSecure = secureEcom2;
479
+ if (secureEcom2 instanceof src_1.ThreeDSecure) {
480
+ t.is(src_1.Secure3dStatus.SuccessAuthenticated, secureEcom2.status);
481
+ t.is("05", String(secureEcom2.eci));
482
+ t.is("2.1.0", secureEcom2.messageVersion);
483
+ t.truthy(secureEcom2.acsTransactionId);
484
+ t.truthy(secureEcom2.serverTransactionId);
485
+ t.truthy(secureEcom2.directoryServerTransactionId);
486
+ }
487
+ const error = await t.throwsAsync(async () => await src_1.Secure3dService.getAuthenticationData()
488
+ .withServerTransactionId(secureEcom2.serverTransactionId)
489
+ .withIdempotencyKey(idempotencyKey)
490
+ .execute(), {
491
+ instanceOf: src_1.GatewayError,
492
+ });
493
+ t.truthy(error);
494
+ if (error) {
495
+ t.is("40039", error.responseCode);
496
+ t.is(error.responseMessage.includes("Idempotency Key seen before"), true);
497
+ }
498
+ }
499
+ }
500
+ }
501
+ });
502
+ test("card holder challenge required - post result non existent id", async (t) => {
503
+ const transactionId = "AUT_" + src_1.GenerationUtils.getGuuid();
504
+ const error = await t.throwsAsync(async () => await src_1.Secure3dService.getAuthenticationData()
505
+ .withServerTransactionId(transactionId)
506
+ .execute(), {
507
+ instanceOf: src_1.GatewayError,
508
+ });
509
+ t.truthy(error);
510
+ if (error) {
511
+ t.is("40118", error.responseCode);
512
+ t.is(error.responseMessage.includes(`Authentication ${transactionId} not found at this location.`), true);
513
+ }
514
+ });
515
+ test("card holder challenge required - v2 initiate", async (t) => {
516
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
517
+ .withCurrency(currency)
518
+ .withAmount(amount)
519
+ .execute();
520
+ assertCheckEnrollment3DSV2(t, secureEcom);
521
+ if (secureEcom instanceof src_1.ThreeDSecure) {
522
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
523
+ const response = await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
524
+ .withAmount(amount)
525
+ .withCurrency(currency)
526
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
527
+ .withBrowserData(browserData)
528
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
529
+ .withOrderCreateDate(formatedDate)
530
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
531
+ .execute();
532
+ t.truthy(response);
533
+ assertInitiate3DSV2(t, response);
534
+ }
535
+ });
536
+ test("card holder challenge required - v2 initiate with idempotency key", async (t) => {
537
+ const idempotencyKey = src_1.GenerationUtils.getGuuid();
538
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
539
+ .withCurrency(currency)
540
+ .withAmount(amount)
541
+ .execute();
542
+ assertCheckEnrollment3DSV2(t, secureEcom);
543
+ if (secureEcom instanceof src_1.ThreeDSecure) {
544
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
545
+ const response = await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
546
+ .withAmount(amount)
547
+ .withCurrency(currency)
548
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
549
+ .withBrowserData(browserData)
550
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
551
+ .withOrderCreateDate(formatedDate)
552
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
553
+ .withIdempotencyKey(idempotencyKey)
554
+ .execute();
555
+ t.truthy(response);
556
+ assertInitiate3DSV2(t, response);
557
+ const error = await t.throwsAsync(async () => await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
558
+ .withAmount(amount)
559
+ .withCurrency(currency)
560
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
561
+ .withBrowserData(browserData)
562
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
563
+ .withOrderCreateDate(formatedDate)
564
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
565
+ .withIdempotencyKey(idempotencyKey)
566
+ .execute(), {
567
+ instanceOf: src_1.GatewayError,
568
+ });
569
+ t.truthy(error);
570
+ if (error) {
571
+ t.is("40039", error.responseCode);
572
+ t.is(error.responseMessage.includes("Idempotency Key seen before"), true);
573
+ }
574
+ }
575
+ });
576
+ test("card holder challenge required - v2 initiate tokenized card", async (t) => {
577
+ const response = await card.tokenize().execute();
578
+ const tokenizedCard = new src_1.CreditCardData();
579
+ tokenizedCard.token = response.token;
580
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(tokenizedCard)
581
+ .withCurrency(currency)
582
+ .withAmount(amount)
583
+ .execute();
584
+ assertCheckEnrollment3DSV2(t, secureEcom);
585
+ if (secureEcom instanceof src_1.ThreeDSecure) {
586
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
587
+ const response = await src_1.Secure3dService.initiateAuthentication(tokenizedCard, secureEcom)
588
+ .withAmount(amount)
589
+ .withCurrency(currency)
590
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
591
+ .withBrowserData(browserData)
592
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
593
+ .withOrderCreateDate(formatedDate)
594
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
595
+ .execute();
596
+ t.truthy(response);
597
+ assertInitiate3DSV2(t, response);
598
+ }
599
+ });
600
+ test("card holder challenge required - v2 initiate method url set no", async (t) => {
601
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
602
+ .withCurrency(currency)
603
+ .withAmount(amount)
604
+ .execute();
605
+ assertCheckEnrollment3DSV2(t, secureEcom);
606
+ if (secureEcom instanceof src_1.ThreeDSecure) {
607
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
608
+ const response = await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
609
+ .withAmount(amount)
610
+ .withCurrency(currency)
611
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
612
+ .withBrowserData(browserData)
613
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.No)
614
+ .withOrderCreateDate(formatedDate)
615
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
616
+ .execute();
617
+ t.truthy(response);
618
+ assertInitiate3DSV2(t, response);
619
+ }
620
+ });
621
+ test("card holder challenge required - v2 initiate method url set unavailable", async (t) => {
622
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
623
+ .withCurrency(currency)
624
+ .withAmount(amount)
625
+ .execute();
626
+ assertCheckEnrollment3DSV2(t, secureEcom);
627
+ if (secureEcom instanceof src_1.ThreeDSecure) {
628
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
629
+ const response = await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
630
+ .withAmount(amount)
631
+ .withCurrency(currency)
632
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
633
+ .withBrowserData(browserData)
634
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Unavailable)
635
+ .withOrderCreateDate(formatedDate)
636
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
637
+ .execute();
638
+ t.truthy(response);
639
+ assertInitiate3DSV2(t, response);
640
+ }
641
+ });
642
+ test("card holder challenge required - v2 initiate without shipping address", async (t) => {
643
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
644
+ .withCurrency(currency)
645
+ .withAmount(amount)
646
+ .execute();
647
+ assertCheckEnrollment3DSV2(t, secureEcom);
648
+ if (secureEcom instanceof src_1.ThreeDSecure) {
649
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
650
+ const response = await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
651
+ .withAmount(amount)
652
+ .withCurrency(currency)
653
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
654
+ .withBrowserData(browserData)
655
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
656
+ .withOrderCreateDate(formatedDate)
657
+ .execute();
658
+ t.truthy(response);
659
+ assertInitiate3DSV2(t, response);
660
+ }
661
+ });
662
+ test("card holder challenge required - v2 initiate with gift card", async (t) => {
663
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
664
+ .withCurrency(currency)
665
+ .withAmount(amount)
666
+ .execute();
667
+ assertCheckEnrollment3DSV2(t, secureEcom);
668
+ if (secureEcom instanceof src_1.ThreeDSecure) {
669
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
670
+ const response = await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
671
+ .withAmount(amount)
672
+ .withCurrency(currency)
673
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
674
+ .withBrowserData(browserData)
675
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
676
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
677
+ .withOrderCreateDate(formatedDate)
678
+ .withGiftCardAmount(2)
679
+ .withGiftCardCount(1)
680
+ .withGiftCardCurrency(currency)
681
+ .execute();
682
+ t.truthy(response);
683
+ assertInitiate3DSV2(t, response);
684
+ }
685
+ });
686
+ test("card holder challenge required - v2 initiate with shipping method", async (t) => {
687
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
688
+ .withCurrency(currency)
689
+ .withAmount(amount)
690
+ .execute();
691
+ assertCheckEnrollment3DSV2(t, secureEcom);
692
+ if (secureEcom instanceof src_1.ThreeDSecure) {
693
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
694
+ const response = await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
695
+ .withAmount(amount)
696
+ .withCurrency(currency)
697
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
698
+ .withBrowserData(browserData)
699
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
700
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
701
+ .withShippingMethod(src_1.ShippingMethod.DigitalGoods)
702
+ .withOrderCreateDate(formatedDate)
703
+ .execute();
704
+ t.truthy(response);
705
+ assertInitiate3DSV2(t, response);
706
+ }
707
+ });
708
+ test("card holder challenge required - v2 initiate with delivery email", async (t) => {
709
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
710
+ .withCurrency(currency)
711
+ .withAmount(amount)
712
+ .execute();
713
+ assertCheckEnrollment3DSV2(t, secureEcom);
714
+ if (secureEcom instanceof src_1.ThreeDSecure) {
715
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
716
+ const response = await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
717
+ .withAmount(amount)
718
+ .withCurrency(currency)
719
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
720
+ .withBrowserData(browserData)
721
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
722
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
723
+ .withDeliveryEmail("james.mason@example.com")
724
+ .withDeliveryTimeFrame(src_1.DeliveryTimeFrame.SameDay)
725
+ .withOrderCreateDate(formatedDate)
726
+ .execute();
727
+ t.truthy(response);
728
+ assertInitiate3DSV2(t, response);
729
+ }
730
+ });
731
+ test("card holder challenge required - v2 initiate all preference values", async (t) => {
732
+ for (const value of Object.values(src_1.ChallengeRequestIndicator)) {
733
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
734
+ .withCurrency(currency)
735
+ .withAmount(amount)
736
+ .execute();
737
+ assertCheckEnrollment3DSV2(t, secureEcom);
738
+ if (secureEcom instanceof src_1.ThreeDSecure) {
739
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
740
+ const response = await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
741
+ .withAmount(amount)
742
+ .withCurrency(currency)
743
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
744
+ .withBrowserData(browserData)
745
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
746
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
747
+ .withChallengeRequestIndicator(value)
748
+ .withOrderCreateDate(formatedDate)
749
+ .execute();
750
+ t.truthy(response);
751
+ assertInitiate3DSV2(t, response);
752
+ }
753
+ }
754
+ });
755
+ test("card holder challenge required - v2 initiate all source values", async (t) => {
756
+ // fails 'MERCHANT_INITIATED and STORED_RECURRING failing, issue raised with UCP team.'
757
+ for (const value of Object.values(src_1.AuthenticationSource)) {
758
+ const storedCredentials = new src_1.StoredCredential();
759
+ storedCredentials.initiator = src_1.EnumMapping.mapStoredCredentialInitiator(gatewayProvider, src_1.StoredCredentialInitiator.Payer);
760
+ storedCredentials.type = src_1.StoredCredentialType.SPLIT_OR_DELAYED_SHIPMENT;
761
+ storedCredentials.sequence = src_1.StoredCredentialSequence.FIRST;
762
+ storedCredentials.reason = src_1.StoredCredentialReason.INCREMENTAL;
763
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
764
+ .withCurrency(currency)
765
+ .withAmount(amount)
766
+ .withAuthenticationSource(value)
767
+ .withStoredCredential(storedCredentials)
768
+ .execute();
769
+ assertCheckEnrollment3DSV2(t, secureEcom);
770
+ if (secureEcom instanceof src_1.ThreeDSecure) {
771
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
772
+ const response = await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
773
+ .withAmount(amount)
774
+ .withCurrency(currency)
775
+ .withAuthenticationSource(value)
776
+ .withBrowserData(browserData)
777
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
778
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
779
+ .withOrderCreateDate(formatedDate)
780
+ .withStoredCredential(storedCredentials)
781
+ .execute();
782
+ t.truthy(response);
783
+ assertInitiate3DSV2(t, response);
784
+ }
785
+ }
786
+ });
787
+ test("card holder enrolled challenge required - frictionless - v2 initiate", async (t) => {
788
+ card.number = Data_1.GpApi3DSTestCards.CARD_AUTH_SUCCESSFUL_V2_2;
789
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
790
+ .withCurrency(currency)
791
+ .withAmount(amount)
792
+ .execute();
793
+ assertCheckEnrollment3DSV2(t, secureEcom);
794
+ if (secureEcom instanceof src_1.ThreeDSecure) {
795
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
796
+ const initAuth = await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
797
+ .withAmount(amount)
798
+ .withCurrency(currency)
799
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
800
+ .withBrowserData(browserData)
801
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
802
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
803
+ .withShippingMethod(src_1.ShippingMethod.DigitalGoods)
804
+ .withOrderCreateDate(formatedDate)
805
+ .execute();
806
+ t.truthy(initAuth);
807
+ if (initAuth instanceof src_1.ThreeDSecure) {
808
+ t.is(src_1.Secure3dStatus.SuccessAuthenticated, initAuth.status);
809
+ t.truthy(initAuth.issuerAcsUrl);
810
+ t.truthy(initAuth.payerAuthenticationRequest);
811
+ t.truthy(initAuth.acsTransactionId);
812
+ t.truthy(initAuth.providerServerTransRef);
813
+ t.truthy(initAuth.acsReferenceNumber);
814
+ t.is("05", String(initAuth.eci));
815
+ t.is("2.2.0", initAuth.messageVersion);
816
+ }
817
+ }
818
+ });
819
+ test("card holder enrolled challenge required - frictionless - v2 initiate without payment method", async (t) => {
820
+ const card = new src_1.CreditCardData();
821
+ const secureEcom = new src_1.ThreeDSecure();
822
+ secureEcom.serverTransactionId = "AUT_" + src_1.GenerationUtils.getGuuid();
823
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
824
+ const error = await t.throwsAsync(async () => await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
825
+ .withAmount(amount)
826
+ .withCurrency(currency)
827
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
828
+ .withBrowserData(browserData)
829
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
830
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
831
+ .withShippingMethod(src_1.ShippingMethod.DigitalGoods)
832
+ .withOrderCreateDate(formatedDate)
833
+ .execute(), {
834
+ instanceOf: src_1.GatewayError,
835
+ });
836
+ t.truthy(error);
837
+ if (error) {
838
+ t.is("40005", error.responseCode);
839
+ t.is(error.responseMessage.includes("Request expects the following fields number"), true);
840
+ }
841
+ });
842
+ test("card holder enrolled challenge required - v2 initiate non existent id", async (t) => {
843
+ const secureEcom = new src_1.ThreeDSecure();
844
+ secureEcom.serverTransactionId = "AUT_" + src_1.GenerationUtils.getGuuid();
845
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
846
+ const error = await t.throwsAsync(async () => await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
847
+ .withAmount(amount)
848
+ .withCurrency(currency)
849
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
850
+ .withBrowserData(browserData)
851
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
852
+ .withOrderCreateDate(formatedDate)
853
+ .execute(), {
854
+ instanceOf: src_1.GatewayError,
855
+ });
856
+ t.truthy(error);
857
+ if (error) {
858
+ t.is("40118", error.responseCode);
859
+ t.is(error.responseMessage.includes(`Authentication ${secureEcom.serverTransactionId} not found at this location.`), true);
860
+ }
861
+ });
862
+ test("challenge required v2 - initiate with mobile sdk", async (t) => {
863
+ card.number = Data_1.GpApi3DSTestCards.CARD_CHALLENGE_REQUIRED_V2_1;
864
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
865
+ .withCurrency(currency)
866
+ .withAmount(amount)
867
+ .execute();
868
+ assertCheckEnrollment3DSV2(t, secureEcom);
869
+ const mobileData = new src_1.MobileData();
870
+ mobileData.encodedData =
871
+ "ew0KCSJEViI6ICIxLjAiLA0KCSJERCI6IHsNCgkJIkMwMDEiOiAiQW5kcm9pZCIsDQoJCSJDMDAyIjogIkhUQyBPbmVfTTgiLA0KCQkiQzAwNCI6ICI1LjAuMSIsDQoJCSJDMDA1IjogImVuX1VTIiwNCgkJIkMwMDYiOiAiRWFzdGVybiBTdGFuZGFyZCBUaW1lIiwNCgkJIkMwMDciOiAiMDY3OTc5MDMtZmI2MS00MWVkLTk0YzItNGQyYjc0ZTI3ZDE4IiwNCgkJIkMwMDkiOiAiSm9obidzIEFuZHJvaWQgRGV2aWNlIg0KCX0sDQoJIkRQTkEiOiB7DQoJCSJDMDEwIjogIlJFMDEiLA0KCQkiQzAxMSI6ICJSRTAzIg0KCX0sDQoJIlNXIjogWyJTVzAxIiwgIlNXMDQiXQ0KfQ0K";
872
+ mobileData.applicationReference = "f283b3ec-27da-42a1-acea-f3f70e75bbdc";
873
+ mobileData.sdkInterface = src_1.SdkInterface.Both;
874
+ mobileData.sdkUiTypes = [src_1.SdkUiType.Oob];
875
+ mobileData.ephemeralPublicKey = `{
876
+ "kty": "EC",
877
+ "crv": "P-256",
878
+ "x": "WWcpTjbOqiu_1aODllw5rYTq5oLXE_T0huCPjMIRbkI",
879
+ "y": "Wz_7anIeadV8SJZUfr4drwjzuWoUbOsHp5GdRZBAAiw"
880
+ }`;
881
+ mobileData.maximumTimeout = 50;
882
+ mobileData.referenceNumber = "3DS_LOA_SDK_PPFU_020100_00007";
883
+ mobileData.sdkTransReference = "b2385523-a66c-4907-ac3c-91848e8c0067";
884
+ if (secureEcom instanceof src_1.ThreeDSecure) {
885
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
886
+ const response = await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
887
+ .withAmount(amount)
888
+ .withCurrency(currency)
889
+ .withAuthenticationSource(src_1.AuthenticationSource.MobileSdk)
890
+ .withMobileData(mobileData)
891
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
892
+ .withOrderCreateDate(formatedDate)
893
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
894
+ .execute();
895
+ t.truthy(response);
896
+ assertInitiate3DSV2(t, response);
897
+ t.truthy(response.payerAuthenticationRequest);
898
+ t.truthy(response.acsInterface);
899
+ t.truthy(response.acsUiTemplate);
900
+ t.truthy(response.providerServerTransRef);
901
+ t.is("NATIVE", response.acsInterface);
902
+ t.is("OUT_OF_BAND", response.acsUiTemplate);
903
+ }
904
+ });
905
+ test("challenge required v2 - initiate with mobile data and browser data", async (t) => {
906
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
907
+ .withCurrency(currency)
908
+ .withAmount(amount)
909
+ .execute();
910
+ assertCheckEnrollment3DSV2(t, secureEcom);
911
+ const mobileData = new src_1.MobileData();
912
+ mobileData.encodedData =
913
+ "ew0KCSJEViI6ICIxLjAiLA0KCSJERCI6IHsNCgkJIkMwMDEiOiAiQW5kcm9pZCIsDQoJCSJDMDAyIjogIkhUQyBPbmVfTTgiLA0KCQkiQzAwNCI6ICI1LjAuMSIsDQoJCSJDMDA1IjogImVuX1VTIiwNCgkJIkMwMDYiOiAiRWFzdGVybiBTdGFuZGFyZCBUaW1lIiwNCgkJIkMwMDciOiAiMDY3OTc5MDMtZmI2MS00MWVkLTk0YzItNGQyYjc0ZTI3ZDE4IiwNCgkJIkMwMDkiOiAiSm9obidzIEFuZHJvaWQgRGV2aWNlIg0KCX0sDQoJIkRQTkEiOiB7DQoJCSJDMDEwIjogIlJFMDEiLA0KCQkiQzAxMSI6ICJSRTAzIg0KCX0sDQoJIlNXIjogWyJTVzAxIiwgIlNXMDQiXQ0KfQ0K";
914
+ mobileData.applicationReference = "f283b3ec-27da-42a1-acea-f3f70e75bbdc";
915
+ mobileData.sdkInterface = src_1.SdkInterface.Browser;
916
+ mobileData.sdkUiTypes = [src_1.SdkUiType.HtmlOther];
917
+ mobileData.ephemeralPublicKey = `{
918
+ "kty": "EC",
919
+ "crv": "P-256",
920
+ "x": "WWcpTjbOqiu_1aODllw5rYTq5oLXE_T0huCPjMIRbkI",
921
+ "y": "Wz_7anIeadV8SJZUfr4drwjzuWoUbOsHp5GdRZBAAiw"
922
+ }`;
923
+ mobileData.maximumTimeout = 50;
924
+ mobileData.referenceNumber = "3DS_LOA_SDK_PPFU_020100_00007";
925
+ mobileData.sdkTransReference = "b2385523-a66c-4907-ac3c-91848e8c0067";
926
+ if (secureEcom instanceof src_1.ThreeDSecure) {
927
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
928
+ const response = await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
929
+ .withAmount(amount)
930
+ .withCurrency(currency)
931
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
932
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
933
+ .withOrderCreateDate(formatedDate)
934
+ .withMobileData(mobileData)
935
+ .withBrowserData(browserData)
936
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
937
+ .execute();
938
+ t.truthy(response);
939
+ assertInitiate3DSV2(t, response);
940
+ }
941
+ });
942
+ test("challenge required v2 - initiate with mobile data and source browser", async (t) => {
943
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
944
+ .withCurrency(currency)
945
+ .withAmount(amount)
946
+ .execute();
947
+ assertCheckEnrollment3DSV2(t, secureEcom);
948
+ const mobileData = new src_1.MobileData();
949
+ mobileData.encodedData =
950
+ "ew0KCSJEViI6ICIxLjAiLA0KCSJERCI6IHsNCgkJIkMwMDEiOiAiQW5kcm9pZCIsDQoJCSJDMDAyIjogIkhUQyBPbmVfTTgiLA0KCQkiQzAwNCI6ICI1LjAuMSIsDQoJCSJDMDA1IjogImVuX1VTIiwNCgkJIkMwMDYiOiAiRWFzdGVybiBTdGFuZGFyZCBUaW1lIiwNCgkJIkMwMDciOiAiMDY3OTc5MDMtZmI2MS00MWVkLTk0YzItNGQyYjc0ZTI3ZDE4IiwNCgkJIkMwMDkiOiAiSm9obidzIEFuZHJvaWQgRGV2aWNlIg0KCX0sDQoJIkRQTkEiOiB7DQoJCSJDMDEwIjogIlJFMDEiLA0KCQkiQzAxMSI6ICJSRTAzIg0KCX0sDQoJIlNXIjogWyJTVzAxIiwgIlNXMDQiXQ0KfQ0K";
951
+ mobileData.applicationReference = "f283b3ec-27da-42a1-acea-f3f70e75bbdc";
952
+ mobileData.sdkInterface = src_1.SdkInterface.Browser;
953
+ mobileData.sdkUiTypes = [src_1.SdkUiType.HtmlOther];
954
+ mobileData.ephemeralPublicKey = `{
955
+ "kty": "EC",
956
+ "crv": "P-256",
957
+ "x": "WWcpTjbOqiu_1aODllw5rYTq5oLXE_T0huCPjMIRbkI",
958
+ "y": "Wz_7anIeadV8SJZUfr4drwjzuWoUbOsHp5GdRZBAAiw"
959
+ }`;
960
+ mobileData.maximumTimeout = 50;
961
+ mobileData.referenceNumber = "3DS_LOA_SDK_PPFU_020100_00007";
962
+ mobileData.sdkTransReference = "b2385523-a66c-4907-ac3c-91848e8c0067";
963
+ if (secureEcom instanceof src_1.ThreeDSecure) {
964
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
965
+ const error = await t.throwsAsync(async () => await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
966
+ .withAmount(amount)
967
+ .withCurrency(currency)
968
+ .withAuthenticationSource(src_1.AuthenticationSource.Browser)
969
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
970
+ .withOrderCreateDate(formatedDate)
971
+ .withMobileData(mobileData)
972
+ .execute(), {
973
+ instanceOf: src_1.GatewayError,
974
+ });
975
+ t.truthy(error);
976
+ if (error) {
977
+ t.is("40233", error.responseCode);
978
+ t.is(error.responseMessage.includes("Required Data Element browser_data"), true);
979
+ }
980
+ }
981
+ });
982
+ test("challenge required v2 - initiate with source mobile SDK without mobile data", async (t) => {
983
+ const secureEcom = await src_1.Secure3dService.checkEnrollment(card)
984
+ .withCurrency(currency)
985
+ .withAmount(amount)
986
+ .execute();
987
+ assertCheckEnrollment3DSV2(t, secureEcom);
988
+ if (secureEcom instanceof src_1.ThreeDSecure) {
989
+ const formatedDate = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
990
+ const error = await t.throwsAsync(async () => await src_1.Secure3dService.initiateAuthentication(card, secureEcom)
991
+ .withAmount(amount)
992
+ .withCurrency(currency)
993
+ .withAuthenticationSource(src_1.AuthenticationSource.MobileSdk)
994
+ .withMethodUrlCompletion(src_1.MethodUrlCompletion.Yes)
995
+ .withOrderCreateDate(formatedDate)
996
+ .execute(), {
997
+ instanceOf: src_1.GatewayError,
998
+ });
999
+ t.truthy(error);
1000
+ if (error) {
1001
+ t.is("40233", error.responseCode);
1002
+ t.is(error.responseMessage.includes("Required Data Element sdk_information"), true);
1003
+ }
1004
+ }
1005
+ });
1006
+ const assertCheckEnrollment3DSV2 = (t, secureEcom) => {
1007
+ t.truthy(secureEcom);
1008
+ if (!(secureEcom instanceof src_1.Transaction)) {
1009
+ t.is(src_1.Secure3dStatus.Enrolled, secureEcom?.enrolled);
1010
+ t.is(src_1.Secure3dVersion.TWO, secureEcom?.getVersion());
1011
+ t.is(src_1.Secure3dStatus.Available, secureEcom.status);
1012
+ t.truthy(secureEcom.issuerAcsUrl);
1013
+ t.truthy(secureEcom.payerAuthenticationRequest);
1014
+ t.falsy(secureEcom.eci);
1015
+ }
1016
+ };
1017
+ const assertInitiate3DSV2 = (t, initAuth) => {
1018
+ t.truthy(initAuth);
1019
+ if (!(initAuth instanceof src_1.Transaction)) {
1020
+ t.is(src_1.Secure3dStatus.ChallengeRequired, initAuth.status);
1021
+ t.is("2.1.0", initAuth.messageVersion);
1022
+ t.truthy(initAuth.issuerAcsUrl);
1023
+ t.truthy(initAuth.payerAuthenticationRequest);
1024
+ t.truthy(initAuth.acsTransactionId);
1025
+ t.falsy(initAuth.eci);
1026
+ }
1027
+ };
1028
+ test.after(() => Data_1.BaseGpApiTestConfig.resetGpApiConfig());
1029
+ //# sourceMappingURL=3DS2Test.js.map