globalpayments-api 3.7.0 → 3.8.1

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 (311) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/LICENSE.md +257 -257
  3. package/README.md +141 -141
  4. package/lib/src/Builders/BaseBuilder/Validations.js +1 -1
  5. package/lib/src/Builders/BaseBuilder/Validations.js.map +1 -1
  6. package/lib/src/Builders/ManagementBuilder.d.ts +26 -6
  7. package/lib/src/Builders/ManagementBuilder.js +66 -34
  8. package/lib/src/Builders/ManagementBuilder.js.map +1 -1
  9. package/lib/src/Builders/RequestBuilder/GpApi/GpApiManagementRequestBuilder.js +19 -0
  10. package/lib/src/Builders/RequestBuilder/GpApi/GpApiManagementRequestBuilder.js.map +1 -1
  11. package/lib/src/Builders/RequestBuilder/GpApi/GpApiReportRequestBuilder.d.ts +2 -0
  12. package/lib/src/Builders/RequestBuilder/GpApi/GpApiReportRequestBuilder.js +86 -0
  13. package/lib/src/Builders/RequestBuilder/GpApi/GpApiReportRequestBuilder.js.map +1 -1
  14. package/lib/src/Builders/TransactionReportBuilder.d.ts +5 -2
  15. package/lib/src/Builders/TransactionReportBuilder.js +19 -0
  16. package/lib/src/Builders/TransactionReportBuilder.js.map +1 -1
  17. package/lib/src/Entities/AdditionalTaxDetails.d.ts +5 -0
  18. package/lib/src/Entities/AdditionalTaxDetails.js +10 -0
  19. package/lib/src/Entities/AdditionalTaxDetails.js.map +1 -0
  20. package/lib/src/Entities/CommercialData.d.ts +26 -0
  21. package/lib/src/Entities/CommercialData.js +36 -0
  22. package/lib/src/Entities/CommercialData.js.map +1 -0
  23. package/lib/src/Entities/CommercialLineItem.d.ts +21 -0
  24. package/lib/src/Entities/CommercialLineItem.js +24 -0
  25. package/lib/src/Entities/CommercialLineItem.js.map +1 -0
  26. package/lib/src/Entities/DiscountDetails.d.ts +8 -0
  27. package/lib/src/Entities/DiscountDetails.js +13 -0
  28. package/lib/src/Entities/DiscountDetails.js.map +1 -0
  29. package/lib/src/Entities/DisputeDocument.d.ts +5 -0
  30. package/lib/src/Entities/DisputeDocument.js +10 -0
  31. package/lib/src/Entities/DisputeDocument.js.map +1 -0
  32. package/lib/src/Entities/Document.d.ts +10 -0
  33. package/lib/src/Entities/Document.js +13 -0
  34. package/lib/src/Entities/Document.js.map +1 -0
  35. package/lib/src/Entities/Enums/DisputeSortProperty.d.ts +12 -0
  36. package/lib/src/Entities/Enums/DisputeSortProperty.js +17 -0
  37. package/lib/src/Entities/Enums/DisputeSortProperty.js.map +1 -0
  38. package/lib/src/Entities/Enums/DisputeStage.d.ts +11 -0
  39. package/lib/src/Entities/Enums/DisputeStage.js +16 -0
  40. package/lib/src/Entities/Enums/DisputeStage.js.map +1 -0
  41. package/lib/src/Entities/Enums/DisputeStatus.d.ts +7 -0
  42. package/lib/src/Entities/Enums/DisputeStatus.js +12 -0
  43. package/lib/src/Entities/Enums/DisputeStatus.js.map +1 -0
  44. package/lib/src/Entities/Enums/DocumentCategory.d.ts +5 -0
  45. package/lib/src/Entities/Enums/DocumentCategory.js +10 -0
  46. package/lib/src/Entities/Enums/DocumentCategory.js.map +1 -0
  47. package/lib/src/Entities/Enums/FileType.d.ts +11 -0
  48. package/lib/src/Entities/Enums/FileType.js +16 -0
  49. package/lib/src/Entities/Enums/FileType.js.map +1 -0
  50. package/lib/src/Entities/Enums.d.ts +17 -1
  51. package/lib/src/Entities/Enums.js +20 -2
  52. package/lib/src/Entities/Enums.js.map +1 -1
  53. package/lib/src/Entities/HostedPaymentData.d.ts +3 -0
  54. package/lib/src/Entities/HostedPaymentData.js +3 -0
  55. package/lib/src/Entities/HostedPaymentData.js.map +1 -1
  56. package/lib/src/Entities/Reporting/DisputeSummary.d.ts +53 -0
  57. package/lib/src/Entities/Reporting/DisputeSummary.js +64 -0
  58. package/lib/src/Entities/Reporting/DisputeSummary.js.map +1 -0
  59. package/lib/src/Entities/Reporting/SearchCriteriaBuilder.d.ts +4 -2
  60. package/lib/src/Entities/Reporting/SearchCriteriaBuilder.js +2 -0
  61. package/lib/src/Entities/Reporting/SearchCriteriaBuilder.js.map +1 -1
  62. package/lib/src/Entities/Reporting/index.d.ts +1 -0
  63. package/lib/src/Entities/Reporting/index.js +1 -0
  64. package/lib/src/Entities/Reporting/index.js.map +1 -1
  65. package/lib/src/Entities/Transaction.js +3 -0
  66. package/lib/src/Entities/Transaction.js.map +1 -1
  67. package/lib/src/Entities/TransactionSummary.d.ts +1 -0
  68. package/lib/src/Entities/TransactionSummary.js +1 -0
  69. package/lib/src/Entities/TransactionSummary.js.map +1 -1
  70. package/lib/src/Entities/index.d.ts +7 -0
  71. package/lib/src/Entities/index.js +7 -0
  72. package/lib/src/Entities/index.js.map +1 -1
  73. package/lib/src/Gateways/GpApiConnector.js +3 -0
  74. package/lib/src/Gateways/GpApiConnector.js.map +1 -1
  75. package/lib/src/Gateways/GpEcomConnector.js +9 -0
  76. package/lib/src/Gateways/GpEcomConnector.js.map +1 -1
  77. package/lib/src/Gateways/PayPlanConnector.d.ts +1 -1
  78. package/lib/src/Gateways/PorticoConnector.d.ts +3 -3
  79. package/lib/src/Gateways/PorticoConnector.js +117 -4
  80. package/lib/src/Gateways/PorticoConnector.js.map +1 -1
  81. package/lib/src/Mapping/GpApiMapping.d.ts +2 -1
  82. package/lib/src/Mapping/GpApiMapping.js +75 -2
  83. package/lib/src/Mapping/GpApiMapping.js.map +1 -1
  84. package/lib/src/Services/ReportingService.d.ts +6 -1
  85. package/lib/src/Services/ReportingService.js +15 -0
  86. package/lib/src/Services/ReportingService.js.map +1 -1
  87. package/lib/test/Integration/Gateways/GpApiConnector/{3DS2Test.js → 3DS2.test.js} +338 -341
  88. package/lib/test/Integration/Gateways/GpApiConnector/3DS2.test.js.map +1 -0
  89. package/lib/test/Integration/Gateways/GpApiConnector/{3DSecureTest.js → 3DSecure.test.js} +167 -173
  90. package/lib/test/Integration/Gateways/GpApiConnector/3DSecure.test.js.map +1 -0
  91. package/lib/test/Integration/Gateways/GpApiConnector/AccessToken.test.js +130 -0
  92. package/lib/test/Integration/Gateways/GpApiConnector/AccessToken.test.js.map +1 -0
  93. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresent.test.js +1070 -0
  94. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresent.test.js.map +1 -0
  95. package/lib/test/Integration/Gateways/GpApiConnector/{DebitCardTest.js → DebitCard.test.js} +27 -33
  96. package/lib/test/Integration/Gateways/GpApiConnector/DebitCard.test.js.map +1 -0
  97. package/lib/test/Integration/Gateways/GpApiConnector/{GpApiCertificationTest.js → GpApiCertification.test.js} +211 -208
  98. package/lib/test/Integration/Gateways/GpApiConnector/GpApiCertification.test.js.map +1 -0
  99. package/lib/test/Integration/Gateways/GpApiConnector/GpApiTokenManagement.test.js +151 -0
  100. package/lib/test/Integration/Gateways/GpApiConnector/GpApiTokenManagement.test.js.map +1 -0
  101. package/lib/test/Integration/Gateways/GpApiConnector/{ReportingDepositsTest.js → ReportingDeposits.test.js} +103 -103
  102. package/lib/test/Integration/Gateways/GpApiConnector/ReportingDeposits.test.js.map +1 -0
  103. package/lib/test/Integration/Gateways/GpApiConnector/ReportingDisputes.test.js +571 -0
  104. package/lib/test/Integration/Gateways/GpApiConnector/ReportingDisputes.test.js.map +1 -0
  105. package/lib/test/Integration/Gateways/GpApiConnector/{ReportingSettlementTransactionsTest.js → ReportingSettlementTransactions.test.js} +104 -108
  106. package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactions.test.js.map +1 -0
  107. package/lib/test/Integration/Gateways/GpApiConnector/{ReportingStoredPaymentMethodsTest.js → ReportingStoredPaymentMethods.test.js} +75 -76
  108. package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethods.test.js.map +1 -0
  109. package/lib/test/Integration/Gateways/GpApiConnector/{ReportingTransactionsTest.js → ReportingTransactions.test.js} +97 -95
  110. package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactions.test.js.map +1 -0
  111. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{AuthTest.js → Auth.test.js} +441 -461
  112. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/Auth.test.js.map +1 -0
  113. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{AvsTest.js → Avs.test.js} +274 -218
  114. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/Avs.test.js.map +1 -0
  115. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{CreditTest.js → Credit.test.js} +317 -321
  116. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/Credit.test.js.map +1 -0
  117. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{HoldTest.js → Hold.test.js} +290 -257
  118. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/Hold.test.js.map +1 -0
  119. package/lib/test/Integration/Gateways/GpEcomConnector/{CreditTest.js → Credit.test.js} +76 -84
  120. package/lib/test/Integration/Gateways/GpEcomConnector/Credit.test.js.map +1 -0
  121. package/lib/test/Integration/Gateways/GpEcomConnector/Hpp.test.js +137 -0
  122. package/lib/test/Integration/Gateways/GpEcomConnector/Hpp.test.js.map +1 -0
  123. package/lib/test/Integration/Gateways/GpEcomConnector/Recurring.test.js +124 -0
  124. package/lib/test/Integration/Gateways/GpEcomConnector/Recurring.test.js.map +1 -0
  125. package/lib/test/Integration/Gateways/PorticoConnector/Ach.test.js +54 -0
  126. package/lib/test/Integration/Gateways/PorticoConnector/Ach.test.js.map +1 -0
  127. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/Check.test.js +357 -0
  128. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/Check.test.js.map +1 -0
  129. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{EcommerceTest.js → Ecommerce.test.js} +403 -459
  130. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/Ecommerce.test.js.map +1 -0
  131. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{EcommerceCheckTest.js → EcommerceCheck.test.js} +17 -23
  132. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheck.test.js.map +1 -0
  133. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{MotoTest.js → Moto.test.js} +377 -650
  134. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/Moto.test.js.map +1 -0
  135. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{MotoCheckTest.js → MotoCheck.test.js} +16 -22
  136. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheck.test.js.map +1 -0
  137. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/Recurring.test.js +393 -0
  138. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/Recurring.test.js.map +1 -0
  139. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{RetailTest.js → Retail.test.js} +481 -600
  140. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/Retail.test.js.map +1 -0
  141. package/lib/test/Integration/Gateways/PorticoConnector/Credit.test.js +433 -0
  142. package/lib/test/Integration/Gateways/PorticoConnector/Credit.test.js.map +1 -0
  143. package/lib/test/Integration/Gateways/PorticoConnector/{DebitTest.js → Debit.test.js} +32 -37
  144. package/lib/test/Integration/Gateways/PorticoConnector/Debit.test.js.map +1 -0
  145. package/lib/test/Integration/Gateways/PorticoConnector/{EbtTest.js → Ebt.test.js} +30 -39
  146. package/lib/test/Integration/Gateways/PorticoConnector/Ebt.test.js.map +1 -0
  147. package/lib/test/Integration/Gateways/PorticoConnector/{EcommerceTest.js → Ecommerce.test.js} +38 -45
  148. package/lib/test/Integration/Gateways/PorticoConnector/Ecommerce.test.js.map +1 -0
  149. package/lib/test/Integration/Gateways/PorticoConnector/Gift.test.js +121 -0
  150. package/lib/test/Integration/Gateways/PorticoConnector/Gift.test.js.map +1 -0
  151. package/lib/test/Integration/Gateways/PorticoConnector/{PorticoManagementTokenTest.js → PorticoManagementToken.test.js} +8 -16
  152. package/lib/test/Integration/Gateways/PorticoConnector/PorticoManagementToken.test.js.map +1 -0
  153. package/lib/test/Integration/Gateways/PorticoConnector/Recurring.test.js +87 -0
  154. package/lib/test/Integration/Gateways/PorticoConnector/Recurring.test.js.map +1 -0
  155. package/lib/test/Integration/Gateways/PorticoConnector/{ReportingTest.js → Reporting.test.js} +12 -18
  156. package/lib/test/Integration/Gateways/PorticoConnector/Reporting.test.js.map +1 -0
  157. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{GetInformationCertificationTest.js → GetInformationCertification.test.js} +12 -18
  158. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertification.test.js.map +1 -0
  159. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{ProPayAccountCertificationTest.js → ProPayAccountCertification.test.js} +49 -64
  160. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertification.test.js.map +1 -0
  161. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{ProPayFundCertificationTest.js → ProPayFundCertification.test.js} +14 -22
  162. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertification.test.js.map +1 -0
  163. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{ProPayInNetworkTransactionCertificationTest.js → ProPayInNetworkTransactionCertification.test.js} +18 -26
  164. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertification.test.js.map +1 -0
  165. package/lib/test/Integration/Gateways/ProPayConnector/{GetInformationTest.js → GetInformation.test.js} +11 -18
  166. package/lib/test/Integration/Gateways/ProPayConnector/GetInformation.test.js.map +1 -0
  167. package/lib/test/Integration/Gateways/ProPayConnector/{ProPayAccountTest.js → ProPayAccount.test.js} +63 -83
  168. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccount.test.js.map +1 -0
  169. package/lib/test/Integration/Gateways/ProPayConnector/{ProPayFundsTest.js → ProPayFunds.test.js} +15 -22
  170. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFunds.test.js.map +1 -0
  171. package/lib/test/Integration/Gateways/ProPayConnector/{ProPayInNetworkTransactionTest.js → ProPayInNetworkTransaction.test.js} +17 -25
  172. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransaction.test.js.map +1 -0
  173. package/lib/test/Integration/Gateways/Terminals/UPA/UpaMic.test.js +165 -0
  174. package/lib/test/Integration/Gateways/Terminals/UPA/UpaMic.test.js.map +1 -0
  175. package/lib/test/Integration/Services/{CheckServiceTest.js → CheckService.test.js} +11 -18
  176. package/lib/test/Integration/Services/CheckService.test.js.map +1 -0
  177. package/lib/test/Integration/Services/{CreditServiceTest.js → CreditService.test.js} +48 -64
  178. package/lib/test/Integration/Services/CreditService.test.js.map +1 -0
  179. package/lib/test/Integration/Services/{DebitServiceTest.js → DebitService.test.js} +28 -32
  180. package/lib/test/Integration/Services/DebitService.test.js.map +1 -0
  181. package/lib/test/Integration/Services/{EBTServiceTest.js → EBTService.test.js} +16 -26
  182. package/lib/test/Integration/Services/EBTService.test.js.map +1 -0
  183. package/lib/test/Unit/Builders/AuthorizationBuilder/Validation.test.js +122 -0
  184. package/lib/test/Unit/Builders/AuthorizationBuilder/Validation.test.js.map +1 -0
  185. package/lib/test/Unit/Builders/ReportBuilder/Validation.test.js +66 -0
  186. package/lib/test/Unit/Builders/ReportBuilder/Validation.test.js.map +1 -0
  187. package/lib/test/Unit/Gateways/GpEcomConnector/{CreditTest.js → Credit.test.js} +13 -15
  188. package/lib/test/Unit/Gateways/GpEcomConnector/Credit.test.js.map +1 -0
  189. package/lib/test/Unit/Gateways/PorticoConnector/InputValidation.test.js +128 -0
  190. package/lib/test/Unit/Gateways/PorticoConnector/InputValidation.test.js.map +1 -0
  191. package/package.json +7 -17
  192. package/lib/test/Integration/Gateways/GpApiConnector/3DS2Test.js.map +0 -1
  193. package/lib/test/Integration/Gateways/GpApiConnector/3DSecureTest.js.map +0 -1
  194. package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.js +0 -109
  195. package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.js.map +0 -1
  196. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.js +0 -1025
  197. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.js.map +0 -1
  198. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardPresentTest.js +0 -439
  199. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardPresentTest.js.map +0 -1
  200. package/lib/test/Integration/Gateways/GpApiConnector/DebitCardTest.js.map +0 -1
  201. package/lib/test/Integration/Gateways/GpApiConnector/GpApiCertificationTest.js.map +0 -1
  202. package/lib/test/Integration/Gateways/GpApiConnector/GpApiTokenManagementTest.js +0 -149
  203. package/lib/test/Integration/Gateways/GpApiConnector/GpApiTokenManagementTest.js.map +0 -1
  204. package/lib/test/Integration/Gateways/GpApiConnector/ReportingDepositsTest.js.map +0 -1
  205. package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactionsTest.js.map +0 -1
  206. package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethodsTest.js.map +0 -1
  207. package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.js.map +0 -1
  208. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.js.map +0 -1
  209. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.js.map +0 -1
  210. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.js.map +0 -1
  211. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.js.map +0 -1
  212. package/lib/test/Integration/Gateways/GpEcomConnector/CreditTest.js.map +0 -1
  213. package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.js +0 -99
  214. package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.js.map +0 -1
  215. package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.js +0 -133
  216. package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.js.map +0 -1
  217. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js +0 -59
  218. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js.map +0 -1
  219. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js +0 -378
  220. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js.map +0 -1
  221. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js.map +0 -1
  222. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js.map +0 -1
  223. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js.map +0 -1
  224. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js.map +0 -1
  225. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js +0 -420
  226. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js.map +0 -1
  227. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js.map +0 -1
  228. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js +0 -392
  229. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js.map +0 -1
  230. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js.map +0 -1
  231. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js.map +0 -1
  232. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js.map +0 -1
  233. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js +0 -147
  234. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js.map +0 -1
  235. package/lib/test/Integration/Gateways/PorticoConnector/PorticoManagementTokenTest.js.map +0 -1
  236. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js +0 -101
  237. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js.map +0 -1
  238. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js.map +0 -1
  239. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.js.map +0 -1
  240. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.js.map +0 -1
  241. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.js.map +0 -1
  242. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.js.map +0 -1
  243. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.js.map +0 -1
  244. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.js.map +0 -1
  245. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.js.map +0 -1
  246. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.js.map +0 -1
  247. package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.js +0 -149
  248. package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.js.map +0 -1
  249. package/lib/test/Integration/Services/CheckServiceTest.js.map +0 -1
  250. package/lib/test/Integration/Services/CreditServiceTest.js.map +0 -1
  251. package/lib/test/Integration/Services/DebitServiceTest.js.map +0 -1
  252. package/lib/test/Integration/Services/EBTServiceTest.js.map +0 -1
  253. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js +0 -111
  254. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js.map +0 -1
  255. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js +0 -62
  256. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js.map +0 -1
  257. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js.map +0 -1
  258. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js +0 -125
  259. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js.map +0 -1
  260. /package/lib/test/Integration/Gateways/GpApiConnector/{3DS2Test.d.ts → 3DS2.test.d.ts} +0 -0
  261. /package/lib/test/Integration/Gateways/GpApiConnector/{3DSecureTest.d.ts → 3DSecure.test.d.ts} +0 -0
  262. /package/lib/test/Integration/Gateways/GpApiConnector/{AccessTokenTest.d.ts → AccessToken.test.d.ts} +0 -0
  263. /package/lib/test/Integration/Gateways/GpApiConnector/{CreditCardNotPresentTest.d.ts → CreditCardNotPresent.test.d.ts} +0 -0
  264. /package/lib/test/Integration/Gateways/GpApiConnector/{CreditCardPresentTest.d.ts → DebitCard.test.d.ts} +0 -0
  265. /package/lib/test/Integration/Gateways/GpApiConnector/{DebitCardTest.d.ts → GpApiCertification.test.d.ts} +0 -0
  266. /package/lib/test/Integration/Gateways/GpApiConnector/{GpApiCertificationTest.d.ts → GpApiTokenManagement.test.d.ts} +0 -0
  267. /package/lib/test/Integration/Gateways/GpApiConnector/{GpApiTokenManagementTest.d.ts → ReportingDeposits.test.d.ts} +0 -0
  268. /package/lib/test/Integration/Gateways/GpApiConnector/{ReportingDepositsTest.d.ts → ReportingDisputes.test.d.ts} +0 -0
  269. /package/lib/test/Integration/Gateways/GpApiConnector/{ReportingSettlementTransactionsTest.d.ts → ReportingSettlementTransactions.test.d.ts} +0 -0
  270. /package/lib/test/Integration/Gateways/GpApiConnector/{ReportingStoredPaymentMethodsTest.d.ts → ReportingStoredPaymentMethods.test.d.ts} +0 -0
  271. /package/lib/test/Integration/Gateways/GpApiConnector/{ReportingTransactionsTest.d.ts → ReportingTransactions.test.d.ts} +0 -0
  272. /package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{AuthTest.d.ts → Auth.test.d.ts} +0 -0
  273. /package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{AvsTest.d.ts → Avs.test.d.ts} +0 -0
  274. /package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{CreditTest.d.ts → Credit.test.d.ts} +0 -0
  275. /package/lib/test/Integration/Gateways/GpEcomConnector/Certification/{HoldTest.d.ts → Hold.test.d.ts} +0 -0
  276. /package/lib/test/Integration/Gateways/GpEcomConnector/{CreditTest.d.ts → Credit.test.d.ts} +0 -0
  277. /package/lib/test/Integration/Gateways/GpEcomConnector/{HppTest.d.ts → Hpp.test.d.ts} +0 -0
  278. /package/lib/test/Integration/Gateways/GpEcomConnector/{RecurringTest.d.ts → Recurring.test.d.ts} +0 -0
  279. /package/lib/test/Integration/Gateways/PorticoConnector/{AchTest.d.ts → Ach.test.d.ts} +0 -0
  280. /package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{CheckTest.d.ts → Check.test.d.ts} +0 -0
  281. /package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{EcommerceCheckTest.d.ts → Ecommerce.test.d.ts} +0 -0
  282. /package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{EcommerceTest.d.ts → EcommerceCheck.test.d.ts} +0 -0
  283. /package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{MotoCheckTest.d.ts → Moto.test.d.ts} +0 -0
  284. /package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{MotoTest.d.ts → MotoCheck.test.d.ts} +0 -0
  285. /package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{RecurringTest.d.ts → Recurring.test.d.ts} +0 -0
  286. /package/lib/test/Integration/Gateways/PorticoConnector/Certifications/{RetailTest.d.ts → Retail.test.d.ts} +0 -0
  287. /package/lib/test/Integration/Gateways/PorticoConnector/{CreditTest.d.ts → Credit.test.d.ts} +0 -0
  288. /package/lib/test/Integration/Gateways/PorticoConnector/{DebitTest.d.ts → Debit.test.d.ts} +0 -0
  289. /package/lib/test/Integration/Gateways/PorticoConnector/{EbtTest.d.ts → Ebt.test.d.ts} +0 -0
  290. /package/lib/test/Integration/Gateways/PorticoConnector/{EcommerceTest.d.ts → Ecommerce.test.d.ts} +0 -0
  291. /package/lib/test/Integration/Gateways/PorticoConnector/{GiftTest.d.ts → Gift.test.d.ts} +0 -0
  292. /package/lib/test/Integration/Gateways/PorticoConnector/{PorticoManagementTokenTest.d.ts → PorticoManagementToken.test.d.ts} +0 -0
  293. /package/lib/test/Integration/Gateways/PorticoConnector/{RecurringTest.d.ts → Recurring.test.d.ts} +0 -0
  294. /package/lib/test/Integration/Gateways/PorticoConnector/{ReportingTest.d.ts → Reporting.test.d.ts} +0 -0
  295. /package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{GetInformationCertificationTest.d.ts → GetInformationCertification.test.d.ts} +0 -0
  296. /package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{ProPayAccountCertificationTest.d.ts → ProPayAccountCertification.test.d.ts} +0 -0
  297. /package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{ProPayFundCertificationTest.d.ts → ProPayFundCertification.test.d.ts} +0 -0
  298. /package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{ProPayInNetworkTransactionCertificationTest.d.ts → ProPayInNetworkTransactionCertification.test.d.ts} +0 -0
  299. /package/lib/test/Integration/Gateways/ProPayConnector/{GetInformationTest.d.ts → GetInformation.test.d.ts} +0 -0
  300. /package/lib/test/Integration/Gateways/ProPayConnector/{ProPayAccountTest.d.ts → ProPayAccount.test.d.ts} +0 -0
  301. /package/lib/test/Integration/Gateways/ProPayConnector/{ProPayFundsTest.d.ts → ProPayFunds.test.d.ts} +0 -0
  302. /package/lib/test/Integration/Gateways/ProPayConnector/{ProPayInNetworkTransactionTest.d.ts → ProPayInNetworkTransaction.test.d.ts} +0 -0
  303. /package/lib/test/Integration/Gateways/Terminals/UPA/{UpaMicTest.d.ts → UpaMic.test.d.ts} +0 -0
  304. /package/lib/test/Integration/Services/{CheckServiceTest.d.ts → CheckService.test.d.ts} +0 -0
  305. /package/lib/test/Integration/Services/{CreditServiceTest.d.ts → CreditService.test.d.ts} +0 -0
  306. /package/lib/test/Integration/Services/{DebitServiceTest.d.ts → DebitService.test.d.ts} +0 -0
  307. /package/lib/test/Integration/Services/{EBTServiceTest.d.ts → EBTService.test.d.ts} +0 -0
  308. /package/lib/test/Unit/Builders/AuthorizationBuilder/{ValidationTest.d.ts → Validation.test.d.ts} +0 -0
  309. /package/lib/test/Unit/Builders/ReportBuilder/{ValidationTest.d.ts → Validation.test.d.ts} +0 -0
  310. /package/lib/test/Unit/Gateways/GpEcomConnector/{CreditTest.d.ts → Credit.test.d.ts} +0 -0
  311. /package/lib/test/Unit/Gateways/PorticoConnector/{InputValidationTest.d.ts → InputValidation.test.d.ts} +0 -0
@@ -1,10 +1,6 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const ava_1 = __importDefault(require("ava"));
7
- const src_1 = require("../../../../../src/");
3
+ const src_1 = require("../../../../../src");
8
4
  const ServiceConfigs_1 = require("../../../../../src/ServiceConfigs");
9
5
  const config = new ServiceConfigs_1.GpEcomConfig();
10
6
  config.merchantId = "heartlandgpsandbox";
@@ -14,15 +10,14 @@ config.refundPassword = "refund";
14
10
  config.rebatePassword = "rebate";
15
11
  config.timeout = 5000;
16
12
  config.channel = "ECOM";
17
- ava_1.default.before(() => {
13
+ beforeAll(() => {
18
14
  src_1.ServicesContainer.configureService(config);
19
15
  });
20
16
  const throttle = () => new Promise((resolve) => setTimeout(resolve, 1500));
21
- ava_1.default.beforeEach(async () => {
17
+ beforeEach(async () => {
22
18
  await throttle();
23
19
  });
24
- (0, ava_1.default)("JAVA_AVS_001a", async (t) => {
25
- t.plan(2);
20
+ test("JAVA_AVS_001a", async () => {
26
21
  // billing address
27
22
  const billingAddress = new src_1.Address();
28
23
  billingAddress.streetAddress1 = "Flat 123 House 456";
@@ -40,21 +35,25 @@ ava_1.default.beforeEach(async () => {
40
35
  card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
41
36
  card.cardHolderName = "James Mason";
42
37
  // request
43
- const error = await t.throwsAsync(async () => await card
44
- .charge(100.01)
45
- .withCurrency("GBP")
46
- .withCustomerId("100")
47
- .withProductId("999")
48
- .withClientTransactionId("test")
49
- .withCustomerIpAddress("123.123.123.123")
50
- .withAddress(billingAddress)
51
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
52
- .withDescription("JAVA-AVS-001a")
53
- .execute(), { instanceOf: src_1.GatewayError });
54
- t.truthy(error?.message);
38
+ try {
39
+ await card
40
+ .charge(100.01)
41
+ .withCurrency("GBP")
42
+ .withCustomerId("100")
43
+ .withProductId("999")
44
+ .withClientTransactionId("test")
45
+ .withCustomerIpAddress("123.123.123.123")
46
+ .withAddress(billingAddress)
47
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
48
+ .withDescription("JAVA-AVS-001a")
49
+ .execute();
50
+ }
51
+ catch (error) {
52
+ expect(error?.message).toBeTruthy();
53
+ expect(error instanceof src_1.GatewayError).toBe(true);
54
+ }
55
55
  });
56
- (0, ava_1.default)("JAVA_AVS_001b", async (t) => {
57
- t.plan(2);
56
+ test("JAVA_AVS_001b", async () => {
58
57
  // billing address
59
58
  const billingAddress = new src_1.Address();
60
59
  billingAddress.streetAddress1 = "Flat #123 House No. 456";
@@ -72,21 +71,25 @@ ava_1.default.beforeEach(async () => {
72
71
  card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
73
72
  card.cardHolderName = "James Mason";
74
73
  // request
75
- const error = await t.throwsAsync(async () => await card
76
- .charge(100.01)
77
- .withCurrency("GBP")
78
- .withCustomerId("100")
79
- .withProductId("999")
80
- .withClientTransactionId("test")
81
- .withCustomerIpAddress("123.123.123.123")
82
- .withAddress(billingAddress)
83
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
84
- .withDescription("JAVA-AVS-001b")
85
- .execute(), { instanceOf: src_1.GatewayError });
86
- t.truthy(error?.message);
74
+ try {
75
+ await card
76
+ .charge(100.01)
77
+ .withCurrency("GBP")
78
+ .withCustomerId("100")
79
+ .withProductId("999")
80
+ .withClientTransactionId("test")
81
+ .withCustomerIpAddress("123.123.123.123")
82
+ .withAddress(billingAddress)
83
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
84
+ .withDescription("JAVA-AVS-001b")
85
+ .execute();
86
+ }
87
+ catch (error) {
88
+ expect(error?.message).toBeTruthy();
89
+ expect(error instanceof src_1.GatewayError).toBe(true);
90
+ }
87
91
  });
88
- (0, ava_1.default)("JAVA_AVS_001c", async (t) => {
89
- t.plan(2);
92
+ test("JAVA_AVS_001c", async () => {
90
93
  // billing address
91
94
  const billingAddress = new src_1.Address();
92
95
  billingAddress.streetAddress1 = "# Flat #123 House No. #456";
@@ -104,21 +107,25 @@ ava_1.default.beforeEach(async () => {
104
107
  card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
105
108
  card.cardHolderName = "James Mason";
106
109
  // request
107
- const error = await t.throwsAsync(async () => await card
108
- .charge(100.01)
109
- .withCurrency("GBP")
110
- .withCustomerId("100")
111
- .withProductId("999")
112
- .withClientTransactionId("test")
113
- .withCustomerIpAddress("123.123.123.123")
114
- .withAddress(billingAddress)
115
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
116
- .withDescription("JAVA-AVS-001c")
117
- .execute(), { instanceOf: src_1.GatewayError });
118
- t.truthy(error?.message);
110
+ try {
111
+ await card
112
+ .charge(100.01)
113
+ .withCurrency("GBP")
114
+ .withCustomerId("100")
115
+ .withProductId("999")
116
+ .withClientTransactionId("test")
117
+ .withCustomerIpAddress("123.123.123.123")
118
+ .withAddress(billingAddress)
119
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
120
+ .withDescription("JAVA-AVS-001c")
121
+ .execute();
122
+ }
123
+ catch (error) {
124
+ expect(error?.message).toBeTruthy();
125
+ expect(error instanceof src_1.GatewayError).toBe(true);
126
+ }
119
127
  });
120
- (0, ava_1.default)("JAVA_AVS_001d", async (t) => {
121
- t.plan(2);
128
+ test("JAVA_AVS_001d", async () => {
122
129
  // billing address
123
130
  const billingAddress = new src_1.Address();
124
131
  billingAddress.country = "GB";
@@ -134,21 +141,25 @@ ava_1.default.beforeEach(async () => {
134
141
  card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
135
142
  card.cardHolderName = "James Mason";
136
143
  // request
137
- const error = await t.throwsAsync(async () => await card
138
- .charge(100.01)
139
- .withCurrency("GBP")
140
- .withCustomerId("100")
141
- .withProductId("999")
142
- .withClientTransactionId("test")
143
- .withCustomerIpAddress("123.123.123.123")
144
- .withAddress(billingAddress)
145
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
146
- .withDescription("JAVA-AVS-001d")
147
- .execute(), { instanceOf: src_1.GatewayError });
148
- t.truthy(error?.message);
144
+ try {
145
+ await card
146
+ .charge(100.01)
147
+ .withCurrency("GBP")
148
+ .withCustomerId("100")
149
+ .withProductId("999")
150
+ .withClientTransactionId("test")
151
+ .withCustomerIpAddress("123.123.123.123")
152
+ .withAddress(billingAddress)
153
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
154
+ .withDescription("JAVA-AVS-001d")
155
+ .execute();
156
+ }
157
+ catch (error) {
158
+ expect(error?.message).toBeTruthy();
159
+ expect(error instanceof src_1.GatewayError).toBe(true);
160
+ }
149
161
  });
150
- (0, ava_1.default)("JAVA_AVS_001e", async (t) => {
151
- t.plan(2);
162
+ test("JAVA_AVS_001e", async () => {
152
163
  // billing address
153
164
  const billingAddress = new src_1.Address();
154
165
  /* eslint-disable */
@@ -170,21 +181,25 @@ ava_1.default.beforeEach(async () => {
170
181
  card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
171
182
  card.cardHolderName = "James Mason";
172
183
  // request
173
- const error = await t.throwsAsync(async () => await card
174
- .charge(100.01)
175
- .withCurrency("GBP")
176
- .withCustomerId("100")
177
- .withProductId("999")
178
- .withClientTransactionId("test")
179
- .withCustomerIpAddress("123.123.123.123")
180
- .withAddress(billingAddress)
181
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
182
- .withDescription("JAVA-AVS-001e")
183
- .execute(), { instanceOf: src_1.GatewayError });
184
- t.truthy(error?.message);
184
+ try {
185
+ await card
186
+ .charge(100.01)
187
+ .withCurrency("GBP")
188
+ .withCustomerId("100")
189
+ .withProductId("999")
190
+ .withClientTransactionId("test")
191
+ .withCustomerIpAddress("123.123.123.123")
192
+ .withAddress(billingAddress)
193
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
194
+ .withDescription("JAVA-AVS-001e")
195
+ .execute();
196
+ }
197
+ catch (error) {
198
+ expect(error?.message).toBeTruthy();
199
+ expect(error instanceof src_1.GatewayError).toBe(true);
200
+ }
185
201
  });
186
- (0, ava_1.default)("JAVA_AVS_001f", async (t) => {
187
- t.plan(2);
202
+ test("JAVA_AVS_001f", async () => {
188
203
  // billing address
189
204
  const billingAddress = new src_1.Address();
190
205
  billingAddress.streetAddress1 = "ABCDEFGHIJ";
@@ -202,21 +217,25 @@ ava_1.default.beforeEach(async () => {
202
217
  card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
203
218
  card.cardHolderName = "James Mason";
204
219
  // request
205
- const error = await t.throwsAsync(async () => await card
206
- .charge(100.01)
207
- .withCurrency("GBP")
208
- .withCustomerId("100")
209
- .withProductId("999")
210
- .withClientTransactionId("test")
211
- .withCustomerIpAddress("123.123.123.123")
212
- .withAddress(billingAddress)
213
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
214
- .withDescription("JAVA-AVS-001f")
215
- .execute(), { instanceOf: src_1.GatewayError });
216
- t.truthy(error?.message);
220
+ try {
221
+ await card
222
+ .charge(100.01)
223
+ .withCurrency("GBP")
224
+ .withCustomerId("100")
225
+ .withProductId("999")
226
+ .withClientTransactionId("test")
227
+ .withCustomerIpAddress("123.123.123.123")
228
+ .withAddress(billingAddress)
229
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
230
+ .withDescription("JAVA-AVS-001f")
231
+ .execute();
232
+ }
233
+ catch (error) {
234
+ expect(error?.message).toBeTruthy();
235
+ expect(error instanceof src_1.GatewayError).toBe(true);
236
+ }
217
237
  });
218
- (0, ava_1.default)("JAVA_AVS_001g", async (t) => {
219
- t.plan(2);
238
+ test("JAVA_AVS_001g", async () => {
220
239
  // billing address
221
240
  const billingAddress = new src_1.Address();
222
241
  /* eslint-disable */
@@ -238,21 +257,25 @@ ava_1.default.beforeEach(async () => {
238
257
  card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
239
258
  card.cardHolderName = "James Mason";
240
259
  // request
241
- const error = await t.throwsAsync(async () => await card
242
- .charge(100.01)
243
- .withCurrency("GBP")
244
- .withCustomerId("100")
245
- .withProductId("999")
246
- .withClientTransactionId("test")
247
- .withCustomerIpAddress("123.123.123.123")
248
- .withAddress(billingAddress)
249
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
250
- .withDescription("JAVA-AVS-001g")
251
- .execute(), { instanceOf: src_1.GatewayError });
252
- t.truthy(error?.message);
260
+ try {
261
+ await card
262
+ .charge(100.01)
263
+ .withCurrency("GBP")
264
+ .withCustomerId("100")
265
+ .withProductId("999")
266
+ .withClientTransactionId("test")
267
+ .withCustomerIpAddress("123.123.123.123")
268
+ .withAddress(billingAddress)
269
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
270
+ .withDescription("JAVA-AVS-001g")
271
+ .execute();
272
+ }
273
+ catch (error) {
274
+ expect(error?.message).toBeTruthy();
275
+ expect(error instanceof src_1.GatewayError).toBe(true);
276
+ }
253
277
  });
254
- (0, ava_1.default)("JAVA_AVS_003a", async (t) => {
255
- t.plan(2);
278
+ test("JAVA_AVS_003a", async () => {
256
279
  // billing address
257
280
  const billingAddress = new src_1.Address();
258
281
  billingAddress.streetAddress1 = "Flat 123 House 456";
@@ -270,21 +293,25 @@ ava_1.default.beforeEach(async () => {
270
293
  card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
271
294
  card.cardHolderName = "James Mason";
272
295
  // request
273
- const error = await t.throwsAsync(async () => await card
274
- .charge(100.01)
275
- .withCurrency("GBP")
276
- .withCustomerId("100")
277
- .withProductId("999")
278
- .withClientTransactionId("test")
279
- .withCustomerIpAddress("123.123.123.123")
280
- .withAddress(billingAddress)
281
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
282
- .withDescription("JAVA-AVS-003a")
283
- .execute(), { instanceOf: src_1.GatewayError });
284
- t.truthy(error?.message);
296
+ try {
297
+ await card
298
+ .charge(100.01)
299
+ .withCurrency("GBP")
300
+ .withCustomerId("100")
301
+ .withProductId("999")
302
+ .withClientTransactionId("test")
303
+ .withCustomerIpAddress("123.123.123.123")
304
+ .withAddress(billingAddress)
305
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
306
+ .withDescription("JAVA-AVS-003a")
307
+ .execute();
308
+ }
309
+ catch (error) {
310
+ expect(error?.message).toBeTruthy();
311
+ expect(error instanceof src_1.GatewayError).toBe(true);
312
+ }
285
313
  });
286
- (0, ava_1.default)("JAVA_AVS_003b", async (t) => {
287
- t.plan(2);
314
+ test("JAVA_AVS_003b", async () => {
288
315
  // billing address
289
316
  const billingAddress = new src_1.Address();
290
317
  billingAddress.streetAddress1 = "Flat 123 House 456";
@@ -302,21 +329,25 @@ ava_1.default.beforeEach(async () => {
302
329
  card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
303
330
  card.cardHolderName = "James Mason";
304
331
  // request
305
- const error = await t.throwsAsync(async () => await card
306
- .charge(100.01)
307
- .withCurrency("GBP")
308
- .withCustomerId("100")
309
- .withProductId("999")
310
- .withClientTransactionId("test")
311
- .withCustomerIpAddress("123.123.123.123")
312
- .withAddress(billingAddress)
313
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
314
- .withDescription("JAVA-AVS-003b")
315
- .execute(), { instanceOf: src_1.GatewayError });
316
- t.truthy(error?.message);
332
+ try {
333
+ await card
334
+ .charge(100.01)
335
+ .withCurrency("GBP")
336
+ .withCustomerId("100")
337
+ .withProductId("999")
338
+ .withClientTransactionId("test")
339
+ .withCustomerIpAddress("123.123.123.123")
340
+ .withAddress(billingAddress)
341
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
342
+ .withDescription("JAVA-AVS-003b")
343
+ .execute();
344
+ }
345
+ catch (error) {
346
+ expect(error?.message).toBeTruthy();
347
+ expect(error instanceof src_1.GatewayError).toBe(true);
348
+ }
317
349
  });
318
- (0, ava_1.default)("JAVA_AVS_003c", async (t) => {
319
- t.plan(2);
350
+ test("JAVA_AVS_003c", async () => {
320
351
  // billing address
321
352
  const billingAddress = new src_1.Address();
322
353
  billingAddress.streetAddress1 = "Flat 123 House 456";
@@ -334,21 +365,25 @@ ava_1.default.beforeEach(async () => {
334
365
  card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
335
366
  card.cardHolderName = "James Mason";
336
367
  // request
337
- const error = await t.throwsAsync(async () => await card
338
- .charge(100.01)
339
- .withCurrency("GBP")
340
- .withCustomerId("100")
341
- .withProductId("999")
342
- .withClientTransactionId("test")
343
- .withCustomerIpAddress("123.123.123.123")
344
- .withAddress(billingAddress)
345
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
346
- .withDescription("JAVA-AVS-003c")
347
- .execute(), { instanceOf: src_1.GatewayError });
348
- t.truthy(error?.message);
368
+ try {
369
+ await card
370
+ .charge(100.01)
371
+ .withCurrency("GBP")
372
+ .withCustomerId("100")
373
+ .withProductId("999")
374
+ .withClientTransactionId("test")
375
+ .withCustomerIpAddress("123.123.123.123")
376
+ .withAddress(billingAddress)
377
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
378
+ .withDescription("JAVA-AVS-003c")
379
+ .execute();
380
+ }
381
+ catch (error) {
382
+ expect(error?.message).toBeTruthy();
383
+ expect(error instanceof src_1.GatewayError).toBe(true);
384
+ }
349
385
  });
350
- (0, ava_1.default)("JAVA_AVS_003d", async (t) => {
351
- t.plan(2);
386
+ test("JAVA_AVS_003d", async () => {
352
387
  // billing address
353
388
  const billingAddress = new src_1.Address();
354
389
  billingAddress.streetAddress1 = "Flat 123 House 456";
@@ -366,21 +401,25 @@ ava_1.default.beforeEach(async () => {
366
401
  card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
367
402
  card.cardHolderName = "James Mason";
368
403
  // request
369
- const error = await t.throwsAsync(async () => await card
370
- .charge(100.01)
371
- .withCurrency("GBP")
372
- .withCustomerId("100")
373
- .withProductId("999")
374
- .withClientTransactionId("test")
375
- .withCustomerIpAddress("123.123.123.123")
376
- .withAddress(billingAddress)
377
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
378
- .withDescription("JAVA-AVS-003d")
379
- .execute(), { instanceOf: src_1.GatewayError });
380
- t.truthy(error?.message);
404
+ try {
405
+ await card
406
+ .charge(100.01)
407
+ .withCurrency("GBP")
408
+ .withCustomerId("100")
409
+ .withProductId("999")
410
+ .withClientTransactionId("test")
411
+ .withCustomerIpAddress("123.123.123.123")
412
+ .withAddress(billingAddress)
413
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
414
+ .withDescription("JAVA-AVS-003d")
415
+ .execute();
416
+ }
417
+ catch (error) {
418
+ expect(error?.message).toBeTruthy();
419
+ expect(error instanceof src_1.GatewayError).toBe(true);
420
+ }
381
421
  });
382
- (0, ava_1.default)("JAVA_AVS_003e", async (t) => {
383
- t.plan(2);
422
+ test("JAVA_AVS_003e", async () => {
384
423
  // billing address
385
424
  const billingAddress = new src_1.Address();
386
425
  billingAddress.streetAddress1 = "Flat 123 House 456";
@@ -398,21 +437,25 @@ ava_1.default.beforeEach(async () => {
398
437
  card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
399
438
  card.cardHolderName = "James Mason";
400
439
  // request
401
- const error = await t.throwsAsync(async () => await card
402
- .charge(100.01)
403
- .withCurrency("GBP")
404
- .withCustomerId("100")
405
- .withProductId("999")
406
- .withClientTransactionId("test")
407
- .withCustomerIpAddress("123.123.123.123")
408
- .withAddress(billingAddress)
409
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
410
- .withDescription("JAVA-AVS-003e")
411
- .execute(), { instanceOf: src_1.GatewayError });
412
- t.truthy(error?.message);
440
+ try {
441
+ await card
442
+ .charge(100.01)
443
+ .withCurrency("GBP")
444
+ .withCustomerId("100")
445
+ .withProductId("999")
446
+ .withClientTransactionId("test")
447
+ .withCustomerIpAddress("123.123.123.123")
448
+ .withAddress(billingAddress)
449
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
450
+ .withDescription("JAVA-AVS-003e")
451
+ .execute();
452
+ }
453
+ catch (error) {
454
+ expect(error?.message).toBeTruthy();
455
+ expect(error instanceof src_1.GatewayError).toBe(true);
456
+ }
413
457
  });
414
- (0, ava_1.default)("JAVA_AVS_003f", async (t) => {
415
- t.plan(2);
458
+ test("JAVA_AVS_003f", async () => {
416
459
  // billing address
417
460
  const billingAddress = new src_1.Address();
418
461
  billingAddress.streetAddress1 = "Flat 123 House 456";
@@ -430,21 +473,25 @@ ava_1.default.beforeEach(async () => {
430
473
  card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
431
474
  card.cardHolderName = "James Mason";
432
475
  // request
433
- const error = await t.throwsAsync(async () => await card
434
- .charge(100.01)
435
- .withCurrency("GBP")
436
- .withCustomerId("100")
437
- .withProductId("999")
438
- .withClientTransactionId("test")
439
- .withCustomerIpAddress("123.123.123.123")
440
- .withAddress(billingAddress)
441
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
442
- .withDescription("JAVA-AVS-003f")
443
- .execute(), { instanceOf: src_1.GatewayError });
444
- t.truthy(error?.message);
476
+ try {
477
+ await card
478
+ .charge(100.01)
479
+ .withCurrency("GBP")
480
+ .withCustomerId("100")
481
+ .withProductId("999")
482
+ .withClientTransactionId("test")
483
+ .withCustomerIpAddress("123.123.123.123")
484
+ .withAddress(billingAddress)
485
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
486
+ .withDescription("JAVA-AVS-003f")
487
+ .execute();
488
+ }
489
+ catch (error) {
490
+ expect(error?.message).toBeTruthy();
491
+ expect(error instanceof src_1.GatewayError).toBe(true);
492
+ }
445
493
  });
446
- (0, ava_1.default)("JAVA_AVS_003g", async (t) => {
447
- t.plan(2);
494
+ test("JAVA_AVS_003g", async () => {
448
495
  // billing address
449
496
  const billingAddress = new src_1.Address();
450
497
  billingAddress.country = "GB";
@@ -460,21 +507,25 @@ ava_1.default.beforeEach(async () => {
460
507
  card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
461
508
  card.cardHolderName = "James Mason";
462
509
  // request
463
- const error = await t.throwsAsync(async () => await card
464
- .charge(100.01)
465
- .withCurrency("GBP")
466
- .withCustomerId("100")
467
- .withProductId("999")
468
- .withClientTransactionId("test")
469
- .withCustomerIpAddress("123.123.123.123")
470
- .withAddress(billingAddress)
471
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
472
- .withDescription("JAVA-AVS-003e")
473
- .execute(), { instanceOf: src_1.GatewayError });
474
- t.truthy(error?.message);
510
+ try {
511
+ await card
512
+ .charge(100.01)
513
+ .withCurrency("GBP")
514
+ .withCustomerId("100")
515
+ .withProductId("999")
516
+ .withClientTransactionId("test")
517
+ .withCustomerIpAddress("123.123.123.123")
518
+ .withAddress(billingAddress)
519
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
520
+ .withDescription("JAVA-AVS-003e")
521
+ .execute();
522
+ }
523
+ catch (error) {
524
+ expect(error?.message).toBeTruthy();
525
+ expect(error instanceof src_1.GatewayError).toBe(true);
526
+ }
475
527
  });
476
- (0, ava_1.default)("JAVA_AVS_003h", async (t) => {
477
- t.plan(2);
528
+ test("JAVA_AVS_003h", async () => {
478
529
  // billing address
479
530
  const billingAddress = new src_1.Address();
480
531
  billingAddress.country = "GB";
@@ -490,17 +541,22 @@ ava_1.default.beforeEach(async () => {
490
541
  card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
491
542
  card.cardHolderName = "James Mason";
492
543
  // request
493
- const error = await t.throwsAsync(async () => await card
494
- .charge(100.01)
495
- .withCurrency("GBP")
496
- .withCustomerId("100")
497
- .withProductId("999")
498
- .withClientTransactionId("test")
499
- .withCustomerIpAddress("123.123.123.123")
500
- .withAddress(billingAddress)
501
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
502
- .withDescription("JAVA-AVS-003f")
503
- .execute(), { instanceOf: src_1.GatewayError });
504
- t.truthy(error?.message);
544
+ try {
545
+ await card
546
+ .charge(100.01)
547
+ .withCurrency("GBP")
548
+ .withCustomerId("100")
549
+ .withProductId("999")
550
+ .withClientTransactionId("test")
551
+ .withCustomerIpAddress("123.123.123.123")
552
+ .withAddress(billingAddress)
553
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
554
+ .withDescription("JAVA-AVS-003f")
555
+ .execute();
556
+ }
557
+ catch (error) {
558
+ expect(error?.message).toBeTruthy();
559
+ expect(error instanceof src_1.GatewayError).toBe(true);
560
+ }
505
561
  });
506
- //# sourceMappingURL=AvsTest.js.map
562
+ //# sourceMappingURL=Avs.test.js.map