globalpayments-api 3.5.3 → 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 (269) hide show
  1. package/CHANGELOG.md +113 -107
  2. package/lib/src/Builders/BaseBuilder/ValidationClause.d.ts +1 -0
  3. package/lib/src/Builders/BaseBuilder/ValidationClause.js +25 -1
  4. package/lib/src/Builders/BaseBuilder/ValidationClause.js.map +1 -1
  5. package/lib/src/Builders/RequestBuilder/GpApi/GpApiSecureRequestBuilder.d.ts +20 -0
  6. package/lib/src/Builders/RequestBuilder/GpApi/GpApiSecureRequestBuilder.js +413 -0
  7. package/lib/src/Builders/RequestBuilder/GpApi/GpApiSecureRequestBuilder.js.map +1 -0
  8. package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.d.ts +2 -2
  9. package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.js +2 -0
  10. package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.js.map +1 -1
  11. package/lib/src/Builders/Secure3dBuilder.d.ts +90 -0
  12. package/lib/src/Builders/Secure3dBuilder.js +423 -0
  13. package/lib/src/Builders/Secure3dBuilder.js.map +1 -0
  14. package/lib/src/Builders/SecureBuilder.d.ts +446 -0
  15. package/lib/src/Builders/SecureBuilder.js +729 -0
  16. package/lib/src/Builders/SecureBuilder.js.map +1 -0
  17. package/lib/src/Builders/index.d.ts +2 -0
  18. package/lib/src/Builders/index.js +2 -0
  19. package/lib/src/Builders/index.js.map +1 -1
  20. package/lib/src/ConfiguredServices.d.ts +5 -1
  21. package/lib/src/ConfiguredServices.js +20 -0
  22. package/lib/src/ConfiguredServices.js.map +1 -1
  23. package/lib/src/Entities/BrowserData.d.ts +13 -0
  24. package/lib/src/Entities/BrowserData.js +18 -0
  25. package/lib/src/Entities/BrowserData.js.map +1 -0
  26. package/lib/src/Entities/Enums/IsoCountries.d.ts +9 -0
  27. package/lib/src/Entities/Enums/IsoCountries.js +1941 -0
  28. package/lib/src/Entities/Enums/IsoCountries.js.map +1 -0
  29. package/lib/src/Entities/Enums.d.ts +149 -0
  30. package/lib/src/Entities/Enums.js +173 -2
  31. package/lib/src/Entities/Enums.js.map +1 -1
  32. package/lib/src/Entities/IRequestBuilder.d.ts +3 -3
  33. package/lib/src/Entities/MerchantDataCollection.d.ts +16 -0
  34. package/lib/src/Entities/MerchantDataCollection.js +102 -0
  35. package/lib/src/Entities/MerchantDataCollection.js.map +1 -0
  36. package/lib/src/Entities/MerchantKVP.d.ts +11 -0
  37. package/lib/src/Entities/MerchantKVP.js +28 -0
  38. package/lib/src/Entities/MerchantKVP.js.map +1 -0
  39. package/lib/src/Entities/MessageExtension.d.ts +6 -0
  40. package/lib/src/Entities/MessageExtension.js +11 -0
  41. package/lib/src/Entities/MessageExtension.js.map +1 -0
  42. package/lib/src/Entities/MobileData.d.ts +11 -0
  43. package/lib/src/Entities/MobileData.js +15 -0
  44. package/lib/src/Entities/MobileData.js.map +1 -0
  45. package/lib/src/Entities/ThreeDSecure.d.ts +66 -0
  46. package/lib/src/Entities/ThreeDSecure.js +162 -0
  47. package/lib/src/Entities/ThreeDSecure.js.map +1 -0
  48. package/lib/src/Entities/Transaction.d.ts +2 -1
  49. package/lib/src/Entities/Transaction.js +1 -0
  50. package/lib/src/Entities/Transaction.js.map +1 -1
  51. package/lib/src/Entities/index.d.ts +7 -0
  52. package/lib/src/Entities/index.js +7 -0
  53. package/lib/src/Entities/index.js.map +1 -1
  54. package/lib/src/Gateways/GpApiConnector.d.ts +2 -1
  55. package/lib/src/Gateways/GpApiConnector.js +7 -0
  56. package/lib/src/Gateways/GpApiConnector.js.map +1 -1
  57. package/lib/src/Gateways/PayPlanConnector.d.ts +1 -1
  58. package/lib/src/Gateways/PorticoConnector.d.ts +5 -5
  59. package/lib/src/Mapping/EnumMapping.d.ts +3 -1
  60. package/lib/src/Mapping/EnumMapping.js +26 -0
  61. package/lib/src/Mapping/EnumMapping.js.map +1 -1
  62. package/lib/src/Mapping/GpApiMapping.d.ts +1 -0
  63. package/lib/src/Mapping/GpApiMapping.js +96 -0
  64. package/lib/src/Mapping/GpApiMapping.js.map +1 -1
  65. package/lib/src/Mapping/GpEcomMapping.d.ts +1 -1
  66. package/lib/src/PaymentMethods/Credit.d.ts +2 -2
  67. package/lib/src/PaymentMethods/Credit.js.map +1 -1
  68. package/lib/src/PaymentMethods/Interfaces.d.ts +4 -0
  69. package/lib/src/PaymentMethods/PaymentMethod.d.ts +2 -0
  70. package/lib/src/PaymentMethods/PaymentMethod.js +6 -0
  71. package/lib/src/PaymentMethods/PaymentMethod.js.map +1 -1
  72. package/lib/src/ServiceConfigs/Gateways/GpApiConfig.js +2 -0
  73. package/lib/src/ServiceConfigs/Gateways/GpApiConfig.js.map +1 -1
  74. package/lib/src/Services/Secure3dService.d.ts +8 -0
  75. package/lib/src/Services/Secure3dService.js +21 -0
  76. package/lib/src/Services/Secure3dService.js.map +1 -0
  77. package/lib/src/Services/index.d.ts +1 -0
  78. package/lib/src/Services/index.js +1 -0
  79. package/lib/src/Services/index.js.map +1 -1
  80. package/lib/src/ServicesContainer.d.ts +2 -1
  81. package/lib/src/ServicesContainer.js +15 -0
  82. package/lib/src/ServicesContainer.js.map +1 -1
  83. package/lib/src/Utils/CountryUtils.d.ts +9 -0
  84. package/lib/src/Utils/CountryUtils.js +131 -0
  85. package/lib/src/Utils/CountryUtils.js.map +1 -0
  86. package/lib/src/Utils/StringUtils.d.ts +2 -0
  87. package/lib/src/Utils/StringUtils.js +15 -0
  88. package/lib/src/Utils/StringUtils.js.map +1 -1
  89. package/lib/src/Utils/index.d.ts +1 -0
  90. package/lib/src/Utils/index.js +1 -0
  91. package/lib/src/Utils/index.js.map +1 -1
  92. package/lib/test/Data/BaseGpApiTestConfig.d.ts +14 -0
  93. package/lib/test/Data/BaseGpApiTestConfig.js +50 -0
  94. package/lib/test/Data/BaseGpApiTestConfig.js.map +1 -0
  95. package/lib/test/Data/GpApi3DSTestCards.d.ts +17 -0
  96. package/lib/test/Data/GpApi3DSTestCards.js +22 -0
  97. package/lib/test/Data/GpApi3DSTestCards.js.map +1 -0
  98. package/lib/test/Data/TestCards.d.ts +24 -0
  99. package/lib/test/Data/TestCards.js +220 -0
  100. package/lib/test/Data/TestCards.js.map +1 -0
  101. package/lib/test/Data/TestChecks.d.ts +4 -0
  102. package/lib/test/Data/TestChecks.js +27 -0
  103. package/lib/test/Data/TestChecks.js.map +1 -0
  104. package/lib/test/Data/index.d.ts +4 -0
  105. package/lib/test/Data/index.js +21 -0
  106. package/lib/test/Data/index.js.map +1 -0
  107. package/lib/test/Integration/Gateways/AcsResponse.d.ts +12 -0
  108. package/lib/test/Integration/Gateways/AcsResponse.js +33 -0
  109. package/lib/test/Integration/Gateways/AcsResponse.js.map +1 -0
  110. package/lib/test/Integration/Gateways/GpApiConnector/3DS2Test.d.ts +1 -0
  111. package/lib/test/Integration/Gateways/GpApiConnector/3DS2Test.js +1029 -0
  112. package/lib/test/Integration/Gateways/GpApiConnector/3DS2Test.js.map +1 -0
  113. package/lib/test/Integration/Gateways/GpApiConnector/3DSecureTest.d.ts +1 -0
  114. package/lib/test/Integration/Gateways/GpApiConnector/3DSecureTest.js +649 -0
  115. package/lib/test/Integration/Gateways/GpApiConnector/3DSecureTest.js.map +1 -0
  116. package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.d.ts +1 -0
  117. package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.js +109 -0
  118. package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.js.map +1 -0
  119. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.d.ts +1 -0
  120. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.js +1023 -0
  121. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.js.map +1 -0
  122. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardPresentTest.d.ts +1 -0
  123. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardPresentTest.js +439 -0
  124. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardPresentTest.js.map +1 -0
  125. package/lib/test/Integration/Gateways/GpApiConnector/DebitCardTest.d.ts +1 -0
  126. package/lib/test/Integration/Gateways/GpApiConnector/DebitCardTest.js +143 -0
  127. package/lib/test/Integration/Gateways/GpApiConnector/DebitCardTest.js.map +1 -0
  128. package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactionsTest.d.ts +1 -0
  129. package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactionsTest.js +434 -0
  130. package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactionsTest.js.map +1 -0
  131. package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethodsTest.d.ts +1 -0
  132. package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethodsTest.js +217 -0
  133. package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethodsTest.js.map +1 -0
  134. package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.d.ts +1 -0
  135. package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.js +337 -0
  136. package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.js.map +1 -0
  137. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.d.ts +1 -0
  138. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.js +2446 -0
  139. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.js.map +1 -0
  140. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.d.ts +1 -0
  141. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.js +506 -0
  142. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.js.map +1 -0
  143. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.d.ts +1 -0
  144. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.js +1296 -0
  145. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.js.map +1 -0
  146. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.d.ts +1 -0
  147. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.js +847 -0
  148. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.js.map +1 -0
  149. package/lib/test/Integration/Gateways/GpEcomConnector/CreditTest.d.ts +1 -0
  150. package/lib/test/Integration/Gateways/GpEcomConnector/CreditTest.js +215 -0
  151. package/lib/test/Integration/Gateways/GpEcomConnector/CreditTest.js.map +1 -0
  152. package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.d.ts +1 -0
  153. package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.js +99 -0
  154. package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.js.map +1 -0
  155. package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.d.ts +1 -0
  156. package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.js +133 -0
  157. package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.js.map +1 -0
  158. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.d.ts +1 -0
  159. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js +59 -0
  160. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js.map +1 -0
  161. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.d.ts +1 -0
  162. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js +378 -0
  163. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js.map +1 -0
  164. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.d.ts +1 -0
  165. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js +86 -0
  166. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js.map +1 -0
  167. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.d.ts +1 -0
  168. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js +1723 -0
  169. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js.map +1 -0
  170. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.d.ts +1 -0
  171. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js +86 -0
  172. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js.map +1 -0
  173. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.d.ts +1 -0
  174. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js +1760 -0
  175. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js.map +1 -0
  176. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.d.ts +1 -0
  177. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js +420 -0
  178. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js.map +1 -0
  179. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.d.ts +1 -0
  180. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js +2221 -0
  181. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js.map +1 -0
  182. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.d.ts +1 -0
  183. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js +392 -0
  184. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js.map +1 -0
  185. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.d.ts +1 -0
  186. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js +88 -0
  187. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js.map +1 -0
  188. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.d.ts +1 -0
  189. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js +72 -0
  190. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js.map +1 -0
  191. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.d.ts +1 -0
  192. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js +111 -0
  193. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js.map +1 -0
  194. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.d.ts +1 -0
  195. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js +147 -0
  196. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js.map +1 -0
  197. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.d.ts +1 -0
  198. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js +101 -0
  199. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js.map +1 -0
  200. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.d.ts +1 -0
  201. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js +50 -0
  202. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js.map +1 -0
  203. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.d.ts +1 -0
  204. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.js +44 -0
  205. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.js.map +1 -0
  206. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.d.ts +1 -0
  207. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.js +221 -0
  208. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.js.map +1 -0
  209. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.d.ts +1 -0
  210. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.js +60 -0
  211. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.js.map +1 -0
  212. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.d.ts +1 -0
  213. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.js +80 -0
  214. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.js.map +1 -0
  215. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.d.ts +39 -0
  216. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.js +393 -0
  217. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.js.map +1 -0
  218. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.d.ts +1 -0
  219. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.js +44 -0
  220. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.js.map +1 -0
  221. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.d.ts +1 -0
  222. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.js +330 -0
  223. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.js.map +1 -0
  224. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.d.ts +1 -0
  225. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.js +60 -0
  226. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.js.map +1 -0
  227. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.d.ts +1 -0
  228. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.js +80 -0
  229. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.js.map +1 -0
  230. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.d.ts +34 -0
  231. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.js +322 -0
  232. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.js.map +1 -0
  233. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.d.ts +4 -0
  234. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.js +28 -0
  235. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.js.map +1 -0
  236. package/lib/test/Integration/Gateways/Terminals/RequestIdProvider.d.ts +4 -0
  237. package/lib/test/Integration/Gateways/Terminals/RequestIdProvider.js +10 -0
  238. package/lib/test/Integration/Gateways/Terminals/RequestIdProvider.js.map +1 -0
  239. package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.d.ts +1 -0
  240. package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.js +149 -0
  241. package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.js.map +1 -0
  242. package/lib/test/Integration/Gateways/ThreeDSecureAsClient.d.ts +16 -0
  243. package/lib/test/Integration/Gateways/ThreeDSecureAsClient.js +212 -0
  244. package/lib/test/Integration/Gateways/ThreeDSecureAsClient.js.map +1 -0
  245. package/lib/test/Integration/Services/CheckServiceTest.d.ts +1 -0
  246. package/lib/test/Integration/Services/CheckServiceTest.js +45 -0
  247. package/lib/test/Integration/Services/CheckServiceTest.js.map +1 -0
  248. package/lib/test/Integration/Services/CreditServiceTest.d.ts +1 -0
  249. package/lib/test/Integration/Services/CreditServiceTest.js +174 -0
  250. package/lib/test/Integration/Services/CreditServiceTest.js.map +1 -0
  251. package/lib/test/Integration/Services/DebitServiceTest.d.ts +1 -0
  252. package/lib/test/Integration/Services/DebitServiceTest.js +81 -0
  253. package/lib/test/Integration/Services/DebitServiceTest.js.map +1 -0
  254. package/lib/test/Integration/Services/EBTServiceTest.d.ts +1 -0
  255. package/lib/test/Integration/Services/EBTServiceTest.js +64 -0
  256. package/lib/test/Integration/Services/EBTServiceTest.js.map +1 -0
  257. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.d.ts +1 -0
  258. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js +111 -0
  259. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js.map +1 -0
  260. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.d.ts +1 -0
  261. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js +62 -0
  262. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js.map +1 -0
  263. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.d.ts +1 -0
  264. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js +34 -0
  265. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js.map +1 -0
  266. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.d.ts +1 -0
  267. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js +125 -0
  268. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js.map +1 -0
  269. package/package.json +72 -71
@@ -0,0 +1,2446 @@
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 ServiceConfigs_1 = require("../../../../../src/ServiceConfigs");
9
+ const throttle = (i) => new Promise((resolve) => setTimeout(resolve, i * 1500));
10
+ const config = new ServiceConfigs_1.GpEcomConfig();
11
+ config.merchantId = "heartlandgpsandbox";
12
+ config.accountId = "api";
13
+ config.sharedSecret = "secret";
14
+ config.refundPassword = "refund";
15
+ config.rebatePassword = "rebate";
16
+ config.timeout = 20000;
17
+ // const test = ava.serial;
18
+ ava_1.default.before(() => {
19
+ src_1.ServicesContainer.configureService(config);
20
+ });
21
+ let i = 0;
22
+ ava_1.default.beforeEach(async () => {
23
+ await throttle(i);
24
+ i += 0.1;
25
+ });
26
+ // test("JAVA_Auth_006a", async (t) => {
27
+ // t.plan(2);
28
+ // // create card
29
+ // const card = new CreditCardData();
30
+ // card.number = "4263970000005262";
31
+ // card.expMonth = "12";
32
+ // card.expYear = "2029";
33
+ // card.cvn = "123";
34
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
35
+ // card.cardHolderName = "James Mason";
36
+ // // request
37
+ // const response = await card
38
+ // .charge(100.01)
39
+ // .withCurrency("GBP")
40
+ // .withDescription("JAVA-Auth-006a")
41
+ // .execute();
42
+ // t.truthy(response);
43
+ // t.is("00", response.responseCode);
44
+ // });
45
+ // test("JAVA_Auth_006b", async (t) => {
46
+ // t.plan(2);
47
+ // // create card
48
+ // const card = new CreditCardData();
49
+ // card.number = "4263970000005262";
50
+ // card.expMonth = "12";
51
+ // card.expYear = "2029";
52
+ // card.cvn = "123";
53
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
54
+ // card.cardHolderName = "James Mason";
55
+ // // request
56
+ // const response = await card
57
+ // .charge(100.01)
58
+ // .withCurrency("EUR")
59
+ // .withDescription("JAVA-Auth-006b")
60
+ // .execute();
61
+ // t.truthy(response);
62
+ // t.is("00", response.responseCode);
63
+ // });
64
+ // test("JAVA_Auth_006c", async (t) => {
65
+ // t.plan(2);
66
+ // // create card
67
+ // const card = new CreditCardData();
68
+ // card.number = "4263970000005262";
69
+ // card.expMonth = "12";
70
+ // card.expYear = "2029";
71
+ // card.cvn = "123";
72
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
73
+ // card.cardHolderName = "James Mason";
74
+ // // request
75
+ // const response = await card
76
+ // .charge(100.01)
77
+ // .withCurrency("USD")
78
+ // .withDescription("JAVA-Auth-006c")
79
+ // .execute();
80
+ // t.truthy(response);
81
+ // t.is("00", response.responseCode);
82
+ // });
83
+ // test("JAVA_Auth_006d", async (t) => {
84
+ // t.plan(2);
85
+ // // create card
86
+ // const card = new CreditCardData();
87
+ // card.number = "4263970000005262";
88
+ // card.expMonth = "12";
89
+ // card.expYear = "2029";
90
+ // card.cvn = "123";
91
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
92
+ // card.cardHolderName = "James Mason";
93
+ // // request
94
+ // const response = await card
95
+ // .charge(100.01)
96
+ // .withCurrency("GBP")
97
+ // .withDescription("JAVA-Auth-006d")
98
+ // .execute();
99
+ // t.truthy(response);
100
+ // t.is("00", response.responseCode);
101
+ // });
102
+ // test("JAVA_Auth_006e", async (t) => {
103
+ // t.plan(2);
104
+ // // create card
105
+ // const card = new CreditCardData();
106
+ // card.number = "4263970000005262";
107
+ // card.expMonth = "12";
108
+ // card.expYear = "2029";
109
+ // card.cvn = "123";
110
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
111
+ // card.cardHolderName = "James Mason";
112
+ // // request
113
+ // const response = await card
114
+ // .charge(100.01)
115
+ // .withCurrency("EUR")
116
+ // .withDescription("JAVA-Auth-006e")
117
+ // .execute();
118
+ // t.truthy(response);
119
+ // t.is("00", response.responseCode);
120
+ // });
121
+ // test("JAVA_Auth_006f", async (t) => {
122
+ // t.plan(2);
123
+ // // create card
124
+ // const card = new CreditCardData();
125
+ // card.number = "4263970000005262";
126
+ // card.expMonth = "12";
127
+ // card.expYear = "2029";
128
+ // card.cvn = "123";
129
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
130
+ // card.cardHolderName = "James Mason";
131
+ // // request
132
+ // const response = await card
133
+ // .charge(100.01)
134
+ // .withCurrency("USD")
135
+ // .withDescription("JAVA-Auth-006f")
136
+ // .execute();
137
+ // t.truthy(response);
138
+ // t.is("00", response.responseCode);
139
+ // });
140
+ // test("JAVA_Auth_006g", async (t) => {
141
+ // t.plan(2);
142
+ // // create card
143
+ // const card = new CreditCardData();
144
+ // card.number = "4263970000005262";
145
+ // card.expMonth = "12";
146
+ // card.expYear = "2029";
147
+ // card.cvn = "123";
148
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
149
+ // card.cardHolderName = "James Mason";
150
+ // // request
151
+ // const response = await card
152
+ // .charge(100.01)
153
+ // .withCurrency("GBP")
154
+ // .withDescription("JAVA-Auth-006g")
155
+ // .execute();
156
+ // t.truthy(response);
157
+ // t.is("00", response.responseCode);
158
+ // });
159
+ // test("JAVA_Auth_006h", async (t) => {
160
+ // t.plan(2);
161
+ // // create card
162
+ // const card = new CreditCardData();
163
+ // card.number = "4263970000005262";
164
+ // card.expMonth = "12";
165
+ // card.expYear = "2029";
166
+ // card.cvn = "123";
167
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
168
+ // card.cardHolderName = "James Mason";
169
+ // // request
170
+ // const response = await card
171
+ // .charge(100.01)
172
+ // .withCurrency("EUR")
173
+ // .withDescription("JAVA-Auth-006h")
174
+ // .execute();
175
+ // t.truthy(response);
176
+ // t.is("00", response.responseCode);
177
+ // });
178
+ // test("JAVA_Auth_006i", async (t) => {
179
+ // t.plan(2);
180
+ // // create card
181
+ // const card = new CreditCardData();
182
+ // card.number = "4263970000005262";
183
+ // card.expMonth = "12";
184
+ // card.expYear = "2029";
185
+ // card.cvn = "123";
186
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
187
+ // card.cardHolderName = "James Mason";
188
+ // // request
189
+ // const response = await card
190
+ // .charge(100.01)
191
+ // .withCurrency("USD")
192
+ // .withDescription("JAVA-Auth-006i")
193
+ // .execute();
194
+ // t.truthy(response);
195
+ // t.is("00", response.responseCode);
196
+ // });
197
+ // test("JAVA_Auth_006j", async (t) => {
198
+ // t.plan(2);
199
+ // // create card
200
+ // const card = new CreditCardData();
201
+ // card.number = "4263970000005262";
202
+ // card.expMonth = "12";
203
+ // card.expYear = "2029";
204
+ // card.cvn = "123";
205
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
206
+ // card.cardHolderName = "James Mason";
207
+ // // request
208
+ // const response = await card
209
+ // .charge(100.01)
210
+ // .withCurrency("GBP")
211
+ // .withDescription("JAVA-Auth-006j")
212
+ // .execute();
213
+ // t.truthy(response);
214
+ // t.is("00", response.responseCode);
215
+ // });
216
+ // test("JAVA_Auth_006k", async (t) => {
217
+ // t.plan(2);
218
+ // // create card
219
+ // const card = new CreditCardData();
220
+ // card.number = "4263970000005262";
221
+ // card.expMonth = "12";
222
+ // card.expYear = "2029";
223
+ // card.cvn = "123";
224
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
225
+ // card.cardHolderName = "James Mason";
226
+ // // request
227
+ // const response = await card
228
+ // .charge(100.01)
229
+ // .withCurrency("EUR")
230
+ // .withDescription("JAVA-Auth-006k")
231
+ // .execute();
232
+ // t.truthy(response);
233
+ // t.is("00", response.responseCode);
234
+ // });
235
+ // test("JAVA_Auth_007a", async (t) => {
236
+ // t.plan(2);
237
+ // // create card
238
+ // const card = new CreditCardData();
239
+ // card.number = "4263970000005262";
240
+ // card.expMonth = "12";
241
+ // card.expYear = "2029";
242
+ // card.cvn = "123";
243
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
244
+ // card.cardHolderName = "James Mason";
245
+ // // request
246
+ // const response = await card
247
+ // .charge(100.01)
248
+ // .withCurrency("GBP")
249
+ // .withDescription("JAVA-Auth-007a")
250
+ // .execute();
251
+ // t.truthy(response);
252
+ // t.is("00", response.responseCode);
253
+ // });
254
+ // test("JAVA_Auth_007b", async (t) => {
255
+ // t.plan(2);
256
+ // // create card
257
+ // const card = new CreditCardData();
258
+ // card.number = "4263970000005262";
259
+ // card.expMonth = "12";
260
+ // card.expYear = "2029";
261
+ // card.cvn = "123";
262
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
263
+ // card.cardHolderName = "James Mason";
264
+ // // request
265
+ // const response = await card
266
+ // .charge(100.01)
267
+ // .withCurrency("EUR")
268
+ // .withDescription("JAVA-Auth-007b")
269
+ // .execute();
270
+ // t.truthy(response);
271
+ // t.is("00", response.responseCode);
272
+ // });
273
+ // test("JAVA_Auth_007c", async (t) => {
274
+ // t.plan(2);
275
+ // // create card
276
+ // const card = new CreditCardData();
277
+ // card.number = "4263970000005262";
278
+ // card.expMonth = "12";
279
+ // card.expYear = "2029";
280
+ // card.cvn = "123";
281
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
282
+ // card.cardHolderName = "James Mason";
283
+ // // request
284
+ // const response = await card
285
+ // .charge(100.01)
286
+ // .withCurrency("USD")
287
+ // .withDescription("JAVA-Auth-007c")
288
+ // .execute();
289
+ // t.truthy(response);
290
+ // t.is("00", response.responseCode);
291
+ // });
292
+ // test("JAVA_Auth_007d", async (t) => {
293
+ // t.plan(2);
294
+ // // create card
295
+ // const card = new CreditCardData();
296
+ // card.number = "4263970000005262";
297
+ // card.expMonth = "12";
298
+ // card.expYear = "2029";
299
+ // card.cvn = "123";
300
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
301
+ // card.cardHolderName = "James Mason";
302
+ // // request
303
+ // const response = await card
304
+ // .charge(100.01)
305
+ // .withCurrency("GBP")
306
+ // .withDescription("JAVA-Auth-007d")
307
+ // .execute();
308
+ // t.truthy(response);
309
+ // t.is("00", response.responseCode);
310
+ // });
311
+ // test("JAVA_Auth_007e", async (t) => {
312
+ // t.plan(2);
313
+ // // create card
314
+ // const card = new CreditCardData();
315
+ // card.number = "4263970000005262";
316
+ // card.expMonth = "12";
317
+ // card.expYear = "2029";
318
+ // card.cvn = "123";
319
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
320
+ // card.cardHolderName = "James Mason";
321
+ // // request
322
+ // const response = await card
323
+ // .charge(100.01)
324
+ // .withCurrency("EUR")
325
+ // .withDescription("JAVA-Auth-007e")
326
+ // .execute();
327
+ // t.truthy(response);
328
+ // t.is("00", response.responseCode);
329
+ // });
330
+ // test("JAVA_Auth_008a", async (t) => {
331
+ // t.plan(2);
332
+ // // create card
333
+ // const card = new CreditCardData();
334
+ // card.number = "4263970000005262";
335
+ // card.expMonth = "12";
336
+ // card.expYear = "2029";
337
+ // card.cvn = "123";
338
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
339
+ // card.cardHolderName = "James Mason";
340
+ // // request
341
+ // const response = await card
342
+ // .charge(100.01)
343
+ // .withCurrency("USD")
344
+ // .withDescription("JAVA-Auth-008a")
345
+ // .execute();
346
+ // t.truthy(response);
347
+ // t.is("00", response.responseCode);
348
+ // });
349
+ // test("JAVA_Auth_008b", async (t) => {
350
+ // t.plan(2);
351
+ // // create card
352
+ // const card = new CreditCardData();
353
+ // card.number = "4263970000005262";
354
+ // card.expMonth = "12";
355
+ // card.expYear = "2029";
356
+ // card.cvn = "123";
357
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
358
+ // card.cardHolderName = "James Mason";
359
+ // // request
360
+ // const response = await card
361
+ // .charge(100.01)
362
+ // .withCurrency("GBP")
363
+ // .withDescription("JAVA-Auth-008b")
364
+ // .execute();
365
+ // t.truthy(response);
366
+ // t.is("00", response.responseCode);
367
+ // });
368
+ // test("JAVA_Auth_008c", async (t) => {
369
+ // t.plan(2);
370
+ // // create card
371
+ // const card = new CreditCardData();
372
+ // card.number = "4263970000005262";
373
+ // card.expMonth = "12";
374
+ // card.expYear = "2029";
375
+ // card.cvn = "123";
376
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
377
+ // card.cardHolderName = "James Mason";
378
+ // // request
379
+ // const response = await card
380
+ // .charge(100.01)
381
+ // .withCurrency("EUR")
382
+ // .withDescription("JAVA-Auth-008c")
383
+ // .execute();
384
+ // t.truthy(response);
385
+ // t.is("00", response.responseCode);
386
+ // });
387
+ // test("JAVA_Auth_008d", async (t) => {
388
+ // t.plan(2);
389
+ // // create card
390
+ // const card = new CreditCardData();
391
+ // card.number = "4263970000005262";
392
+ // card.expMonth = "12";
393
+ // card.expYear = "2029";
394
+ // card.cvn = "123";
395
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
396
+ // card.cardHolderName = "James Mason";
397
+ // // request
398
+ // const response = await card
399
+ // .charge(100.01)
400
+ // .withCurrency("USD")
401
+ // .withDescription("JAVA-Auth-008d")
402
+ // .execute();
403
+ // t.truthy(response);
404
+ // t.is("00", response.responseCode);
405
+ // });
406
+ // test("JAVA_Auth_008e", async (t) => {
407
+ // t.plan(2);
408
+ // // create card
409
+ // const card = new CreditCardData();
410
+ // card.number = "4263970000005262";
411
+ // card.expMonth = "12";
412
+ // card.expYear = "2029";
413
+ // card.cvn = "123";
414
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
415
+ // card.cardHolderName = "James Mason";
416
+ // // request
417
+ // const response = await card
418
+ // .charge(100.01)
419
+ // .withCurrency("GBP")
420
+ // .withDescription("JAVA-Auth-008e")
421
+ // .execute();
422
+ // t.truthy(response);
423
+ // t.is("00", response.responseCode);
424
+ // });
425
+ // test("JAVA_Auth_009a", async (t) => {
426
+ // t.plan(2);
427
+ // const config = new GpEcomConfig();
428
+ // config.merchantId = "heartlandgpsandbox";
429
+ // config.accountId = "api";
430
+ // config.sharedSecret = "secret";
431
+ // config.refundPassword = "refund";
432
+ // config.rebatePassword = "rebate";
433
+ // config.timeout = 20000;
434
+ // config.channel = "ECOM";
435
+ // ServicesContainer.configureService(config, "withChannelEcom");
436
+ // // create card
437
+ // const card = new CreditCardData();
438
+ // card.number = "4263970000005262";
439
+ // card.expMonth = "12";
440
+ // card.expYear = "2029";
441
+ // card.cvn = "123";
442
+ // card.cvnPresenceIndicator = CvnPresenceIndicator.Present;
443
+ // card.cardHolderName = "James Mason";
444
+ // // request
445
+ // const response = await card
446
+ // .charge(100.01)
447
+ // .withCurrency("EUR")
448
+ // .withDescription("JAVA-Auth-009a")
449
+ // .execute("withChannelEcom");
450
+ // t.truthy(response);
451
+ // t.is("00", response.responseCode);
452
+ // });
453
+ (0, ava_1.default)("JAVA_Auth_009b", async (t) => {
454
+ t.plan(2);
455
+ const config = new ServiceConfigs_1.GpEcomConfig();
456
+ config.merchantId = "heartlandgpsandbox";
457
+ config.accountId = "api";
458
+ config.sharedSecret = "secret";
459
+ config.refundPassword = "refund";
460
+ config.rebatePassword = "rebate";
461
+ config.timeout = 20000;
462
+ config.channel = "ECOM";
463
+ src_1.ServicesContainer.configureService(config, "withAnotherChannelEcom");
464
+ // create card
465
+ const card = new src_1.CreditCardData();
466
+ card.number = "4263970000005262";
467
+ card.expMonth = "12";
468
+ card.expYear = "2020";
469
+ card.cvn = "123";
470
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
471
+ card.cardHolderName = "James Mason";
472
+ // request
473
+ const error = await t.throwsAsync(() => card
474
+ .charge(100.01)
475
+ .withCurrency("USD")
476
+ .withDescription("JAVA-Auth-009b")
477
+ .execute("withAnotherChannelEcom"), { instanceOf: src_1.GatewayError });
478
+ t.truthy(error?.message);
479
+ });
480
+ (0, ava_1.default)("JAVA_Auth_009c", async (t) => {
481
+ t.plan(2);
482
+ const config = new ServiceConfigs_1.GpEcomConfig();
483
+ config.merchantId = "heartlandgpsandbox";
484
+ config.accountId = "api";
485
+ config.sharedSecret = "secret";
486
+ config.refundPassword = "refund";
487
+ config.rebatePassword = "rebate";
488
+ config.timeout = 20000;
489
+ config.channel = "ECOM";
490
+ src_1.ServicesContainer.configureService(config, "with3rdChannelEcom");
491
+ // create card
492
+ const card = new src_1.CreditCardData();
493
+ card.number = "4263970000005262";
494
+ card.expMonth = "12";
495
+ card.expYear = "2029";
496
+ card.cvn = "123";
497
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
498
+ card.cardHolderName = "James Mason";
499
+ // request
500
+ const res = await card
501
+ .charge(100.01)
502
+ .withCurrency("GBP")
503
+ .withDescription("JAVA-Auth-009c")
504
+ .execute("with3rdChannelEcom");
505
+ t.truthy(res);
506
+ t.is("00", res.responseCode);
507
+ });
508
+ (0, ava_1.default)("JAVA_Auth_009d", async (t) => {
509
+ t.plan(2);
510
+ // create card
511
+ const card = new src_1.CreditCardData();
512
+ card.number = "4263970000005262";
513
+ card.expMonth = "12";
514
+ card.expYear = "2029";
515
+ card.cvn = "123";
516
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
517
+ card.cardHolderName = "James Mason";
518
+ // request
519
+ const response = await card
520
+ .charge(100.01)
521
+ .withCurrency("GBP")
522
+ .withDescription("JAVA-Auth-009d")
523
+ .execute();
524
+ t.truthy(response);
525
+ t.is("00", response.responseCode);
526
+ });
527
+ (0, ava_1.default)("JAVA_Auth_010a", async (t) => {
528
+ t.plan(2);
529
+ // create card
530
+ const card = new src_1.CreditCardData();
531
+ card.number = "4263970000005262";
532
+ card.expMonth = "12";
533
+ card.expYear = "2029";
534
+ card.cvn = "123";
535
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
536
+ card.cardHolderName = "James Mason";
537
+ // request
538
+ const response = await card
539
+ .charge(100.01)
540
+ .withCurrency("USD")
541
+ .withDescription("JAVA-Auth-010a")
542
+ .execute();
543
+ t.truthy(response);
544
+ t.is("00", response.responseCode);
545
+ });
546
+ (0, ava_1.default)("JAVA_Auth_010b", async (t) => {
547
+ t.plan(2);
548
+ // create card
549
+ const card = new src_1.CreditCardData();
550
+ card.number = "4263970000005262";
551
+ card.expMonth = "12";
552
+ card.expYear = "2029";
553
+ card.cvn = "123";
554
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
555
+ card.cardHolderName = "James Mason";
556
+ // request
557
+ const response = await card
558
+ .charge(100.01)
559
+ .withCurrency("GBP")
560
+ .withDescription("JAVA-Auth-010b")
561
+ .execute();
562
+ t.truthy(response);
563
+ t.is("00", response.responseCode);
564
+ });
565
+ (0, ava_1.default)("JAVA_Auth_010c", async (t) => {
566
+ t.plan(2);
567
+ // create card
568
+ const card = new src_1.CreditCardData();
569
+ card.number = "4263970000005262";
570
+ card.expMonth = "12";
571
+ card.expYear = "2029";
572
+ card.cvn = "123";
573
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
574
+ card.cardHolderName = "James Mason";
575
+ // request
576
+ const response = await card
577
+ .charge(100.01)
578
+ .withCurrency("EUR")
579
+ .withDescription("JAVA-Auth-010c")
580
+ .execute();
581
+ t.truthy(response);
582
+ t.is("00", response.responseCode);
583
+ });
584
+ (0, ava_1.default)("JAVA_Auth_010d", async (t) => {
585
+ t.plan(2);
586
+ // create card
587
+ const card = new src_1.CreditCardData();
588
+ card.number = "4263970000005262";
589
+ card.expMonth = "12";
590
+ card.expYear = "2029";
591
+ card.cvn = "123";
592
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
593
+ card.cardHolderName = "James Mason";
594
+ // request
595
+ const response = await card
596
+ .charge(100.01)
597
+ .withCurrency("USD")
598
+ .withDescription("JAVA-Auth-010d")
599
+ .execute();
600
+ t.truthy(response);
601
+ t.is("00", response.responseCode);
602
+ });
603
+ (0, ava_1.default)("JAVA_Auth_010e", async (t) => {
604
+ t.plan(2);
605
+ // create card
606
+ const card = new src_1.CreditCardData();
607
+ card.number = "4263970000005262";
608
+ card.expMonth = "12";
609
+ card.expYear = "2029";
610
+ card.cvn = "123";
611
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
612
+ card.cardHolderName = "James Mason";
613
+ // request
614
+ const response = await card
615
+ .charge(100.01)
616
+ .withCurrency("GBP")
617
+ .withDescription("JAVA-Auth-010e")
618
+ .execute();
619
+ t.truthy(response);
620
+ t.is("00", response.responseCode);
621
+ });
622
+ (0, ava_1.default)("JAVA_Auth_011a", async (t) => {
623
+ t.plan(2);
624
+ // create card
625
+ const card = new src_1.CreditCardData();
626
+ card.number = "4263970000005262";
627
+ card.expMonth = "12";
628
+ card.expYear = "2029";
629
+ card.cvn = "123";
630
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
631
+ card.cardHolderName = "James Mason";
632
+ // request
633
+ const response = await card
634
+ .charge(100.01)
635
+ .withCurrency("EUR")
636
+ .withDescription("JAVA-Auth-011a")
637
+ .execute();
638
+ t.truthy(response);
639
+ t.is("00", response.responseCode);
640
+ });
641
+ (0, ava_1.default)("JAVA_Auth_011b", async (t) => {
642
+ t.plan(2);
643
+ // create card
644
+ const card = new src_1.CreditCardData();
645
+ card.number = "4263970000005262";
646
+ card.expMonth = "12";
647
+ card.expYear = "2029";
648
+ card.cvn = "123";
649
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
650
+ card.cardHolderName = "James Mason";
651
+ // request
652
+ const response = await card
653
+ .charge(100.01)
654
+ .withCurrency("USD")
655
+ .withDescription("JAVA-Auth-011b")
656
+ .execute();
657
+ t.truthy(response);
658
+ t.is("00", response.responseCode);
659
+ });
660
+ (0, ava_1.default)("JAVA_Auth_011c", async (t) => {
661
+ t.plan(2);
662
+ // create card
663
+ const card = new src_1.CreditCardData();
664
+ card.number = "4263970000005262";
665
+ card.expMonth = "12";
666
+ card.expYear = "2029";
667
+ card.cvn = "123";
668
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
669
+ card.cardHolderName = "James Mason";
670
+ // request
671
+ const response = await card
672
+ .charge(100.01)
673
+ .withCurrency("GBP")
674
+ .withDescription("JAVA-Auth-011c")
675
+ .execute();
676
+ t.truthy(response);
677
+ t.is("00", response.responseCode);
678
+ });
679
+ (0, ava_1.default)("JAVA_Auth_011d", async (t) => {
680
+ t.plan(2);
681
+ // create card
682
+ const card = new src_1.CreditCardData();
683
+ card.number = "4263970000005262";
684
+ card.expMonth = "12";
685
+ card.expYear = "2029";
686
+ card.cvn = "123";
687
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
688
+ card.cardHolderName = "James Mason";
689
+ // request
690
+ const error = t.throws(() => card
691
+ .charge()
692
+ .withCurrency("EUR")
693
+ .withDescription("JAVA-Auth-011d")
694
+ .execute(), { instanceOf: src_1.BuilderError });
695
+ t.truthy(error?.message);
696
+ });
697
+ (0, ava_1.default)("JAVA_Auth_012a", async (t) => {
698
+ t.plan(2);
699
+ // create card
700
+ const card = new src_1.CreditCardData();
701
+ card.number = "4263970000005262";
702
+ card.expMonth = "12";
703
+ card.expYear = "2029";
704
+ card.cvn = "123";
705
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
706
+ card.cardHolderName = "James Mason";
707
+ // request
708
+ const response = await card
709
+ .charge(100.01)
710
+ .withCurrency("USD")
711
+ .withDescription("JAVA-Auth-012a")
712
+ .execute();
713
+ t.truthy(response);
714
+ t.is("00", response.responseCode);
715
+ });
716
+ (0, ava_1.default)("JAVA_Auth_012b", async (t) => {
717
+ t.plan(2);
718
+ // create card
719
+ const card = new src_1.CreditCardData();
720
+ card.number = "4263970000005262";
721
+ card.expMonth = "12";
722
+ card.expYear = "2029";
723
+ card.cvn = "123";
724
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
725
+ card.cardHolderName = "James Mason";
726
+ // request
727
+ const error = await t.throwsAsync(() => card
728
+ .charge(100.01)
729
+ .withCurrency("EURO")
730
+ .withDescription("JAVA-Auth-012b")
731
+ .execute(), { instanceOf: src_1.GatewayError });
732
+ t.truthy(error?.message);
733
+ });
734
+ (0, ava_1.default)("JAVA_Auth_012c", async (t) => {
735
+ t.plan(2);
736
+ // create card
737
+ const card = new src_1.CreditCardData();
738
+ card.number = "4263970000005262";
739
+ card.expMonth = "12";
740
+ card.expYear = "2019";
741
+ card.cvn = "123";
742
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
743
+ card.cardHolderName = "James Mason";
744
+ // request
745
+ const error = await t.throwsAsync(() => card
746
+ .charge(100.01)
747
+ .withCurrency("EUR")
748
+ .withDescription("JAVA-Auth-012c")
749
+ .execute(), { instanceOf: src_1.GatewayError });
750
+ t.truthy(error?.message);
751
+ });
752
+ (0, ava_1.default)("JAVA_Auth_012d", async (t) => {
753
+ t.plan(2);
754
+ // create card
755
+ const card = new src_1.CreditCardData();
756
+ card.number = "4263970000005262";
757
+ card.expMonth = "12";
758
+ card.expYear = "2029";
759
+ card.cvn = "123";
760
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
761
+ card.cardHolderName = "James Mason";
762
+ // request
763
+ const error = t.throws(() => card.charge(100.01).withDescription("JAVA-Auth-012d").execute(), { instanceOf: src_1.BuilderError });
764
+ t.truthy(error?.message);
765
+ });
766
+ (0, ava_1.default)("JAVA_Auth_013a", async (t) => {
767
+ t.plan(2);
768
+ // create card
769
+ const card = new src_1.CreditCardData();
770
+ card.number = "4263970000005262";
771
+ card.expMonth = "12";
772
+ card.expYear = "2029";
773
+ card.cvn = "123";
774
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
775
+ card.cardHolderName = "James Mason";
776
+ // request
777
+ const response = await card
778
+ .charge(100.01)
779
+ .withCurrency("GBP")
780
+ .withDescription("JAVA-Auth-013a")
781
+ .execute();
782
+ t.truthy(response);
783
+ t.is("00", response.responseCode);
784
+ });
785
+ (0, ava_1.default)("JAVA_Auth_013b1", async (t) => {
786
+ t.plan(2);
787
+ // create card
788
+ const card = new src_1.CreditCardData();
789
+ card.number = "424242000000000000000";
790
+ card.expMonth = "12";
791
+ card.expYear = "2029";
792
+ card.cvn = "123";
793
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
794
+ card.cardHolderName = "James Mason";
795
+ // request
796
+ const error = await t.throwsAsync(async () => await card
797
+ .charge(100.01)
798
+ .withCurrency("EUR")
799
+ .withDescription("JAVA-Auth-013b1")
800
+ .execute(), { instanceOf: src_1.GatewayError });
801
+ t.truthy(error?.message);
802
+ });
803
+ (0, ava_1.default)("JAVA_Auth_013b2", async (t) => {
804
+ t.plan(2);
805
+ // create card
806
+ const card = new src_1.CreditCardData();
807
+ card.number = "42424242424";
808
+ card.expMonth = "12";
809
+ card.expYear = "2029";
810
+ card.cvn = "123";
811
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
812
+ card.cardHolderName = "James Mason";
813
+ // request
814
+ const error = await t.throwsAsync(async () => await card
815
+ .charge(100.01)
816
+ .withCurrency("USD")
817
+ .withDescription("JAVA-Auth-013b2")
818
+ .execute(), { instanceOf: src_1.GatewayError });
819
+ t.truthy(error?.message);
820
+ });
821
+ (0, ava_1.default)("JAVA_Auth_013c", async (t) => {
822
+ t.plan(2);
823
+ // create card
824
+ const card = new src_1.CreditCardData();
825
+ card.number = "4263970000005262#";
826
+ card.expMonth = "12";
827
+ card.expYear = "2029";
828
+ card.cvn = "123";
829
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
830
+ card.cardHolderName = "James Mason";
831
+ // request
832
+ const error = await t.throwsAsync(async () => await card
833
+ .charge(100.01)
834
+ .withCurrency("GBP")
835
+ .withDescription("JAVA-Auth-013c")
836
+ .execute(), { instanceOf: src_1.GatewayError });
837
+ t.truthy(error?.message);
838
+ });
839
+ (0, ava_1.default)("JAVA_Auth_014a", async (t) => {
840
+ t.plan(2);
841
+ // create card
842
+ const card = new src_1.CreditCardData();
843
+ card.number = "4263970000005262";
844
+ card.expMonth = "12";
845
+ card.expYear = "2029";
846
+ card.cvn = "123";
847
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
848
+ card.cardHolderName = "James Mason";
849
+ // request
850
+ const response = await card
851
+ .charge(100.01)
852
+ .withCurrency("EUR")
853
+ .withDescription("JAVA-Auth-014a")
854
+ .execute();
855
+ t.truthy(response);
856
+ t.is("00", response.responseCode);
857
+ });
858
+ (0, ava_1.default)("JAVA_Auth_014b", async (t) => {
859
+ t.plan(2);
860
+ // create card
861
+ const card = new src_1.CreditCardData();
862
+ card.number = "4263970000005262";
863
+ card.expMonth = "12";
864
+ card.expYear = "2029";
865
+ card.cvn = "123";
866
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
867
+ // request
868
+ const error = await t.throwsAsync(async () => await card
869
+ .charge(100.01)
870
+ .withCurrency("USD")
871
+ .withDescription("JAVA-Auth-014b")
872
+ .execute(), { instanceOf: src_1.GatewayError });
873
+ t.truthy(error?.message);
874
+ });
875
+ (0, ava_1.default)("JAVA_Auth_014c", async (t) => {
876
+ t.plan(2);
877
+ // create card
878
+ const card = new src_1.CreditCardData();
879
+ card.number = "4263970000005262";
880
+ card.expMonth = "12";
881
+ card.expYear = "2029";
882
+ card.cvn = "123";
883
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
884
+ card.cardHolderName =
885
+ "3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep";
886
+ // request
887
+ const error = await t.throwsAsync(async () => await card
888
+ .charge(100.01)
889
+ .withCurrency("GBP")
890
+ .withDescription("JAVA-Auth-014c")
891
+ .execute(), { instanceOf: src_1.GatewayError });
892
+ t.truthy(error?.message);
893
+ });
894
+ (0, ava_1.default)("JAVA_Auth_014d", async (t) => {
895
+ t.plan(2);
896
+ // create card
897
+ const card = new src_1.CreditCardData();
898
+ card.number = "4263970000005262";
899
+ card.expMonth = "12";
900
+ card.expYear = "2029";
901
+ card.cvn = "123";
902
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
903
+ card.cardHolderName = "James~Mason";
904
+ // request
905
+ const response = await card
906
+ .charge(100.01)
907
+ .withCurrency("EUR")
908
+ .withDescription("JAVA-Auth-014d")
909
+ .execute();
910
+ t.truthy(response);
911
+ t.is("00", response.responseCode);
912
+ });
913
+ (0, ava_1.default)("JAVA_Auth_015a", async (t) => {
914
+ t.plan(2);
915
+ // create card
916
+ const card = new src_1.CreditCardData();
917
+ card.number = "4263970000005262";
918
+ card.expMonth = "12";
919
+ card.expYear = "2029";
920
+ card.cvn = "123";
921
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
922
+ card.cardHolderName = "James Mason";
923
+ // request
924
+ const response = await card
925
+ .charge(100.01)
926
+ .withCurrency("USD")
927
+ .withDescription("JAVA-Auth-015a")
928
+ .execute();
929
+ t.truthy(response);
930
+ t.is("00", response.responseCode);
931
+ });
932
+ (0, ava_1.default)("JAVA_Auth_015b", async (t) => {
933
+ t.plan(2);
934
+ // create card
935
+ const card = new src_1.CreditCardData();
936
+ card.number = "4263970000005262";
937
+ card.expMonth = "12";
938
+ card.expYear = "2029";
939
+ card.cvn = "123";
940
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
941
+ card.cardHolderName = "James Mason";
942
+ // request
943
+ const response = await card
944
+ .charge(100.01)
945
+ .withCurrency("GBP")
946
+ .withDescription("JAVA-Auth-015b")
947
+ .execute();
948
+ t.truthy(response);
949
+ t.is("00", response.responseCode);
950
+ });
951
+ (0, ava_1.default)("JAVA_Auth_015c", async (t) => {
952
+ t.plan(2);
953
+ // create card
954
+ const card = new src_1.CreditCardData();
955
+ card.number = "4263970000005262";
956
+ card.expMonth = "20";
957
+ card.expYear = "2012";
958
+ card.cvn = "123";
959
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
960
+ card.cardHolderName = "James Mason";
961
+ // request
962
+ const error = await t.throwsAsync(async () => await card
963
+ .charge(100.01)
964
+ .withCurrency("EUR")
965
+ .withDescription("JAVA-Auth-015c")
966
+ .execute(), { instanceOf: src_1.GatewayError });
967
+ t.truthy(error?.message);
968
+ });
969
+ (0, ava_1.default)("JAVA_Auth_015d", async (t) => {
970
+ t.plan(2);
971
+ // create card
972
+ const card = new src_1.CreditCardData();
973
+ card.number = "4263970000005262";
974
+ card.cvn = "123";
975
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
976
+ card.cardHolderName = "James Mason";
977
+ // request
978
+ const error = await t.throwsAsync(async () => await card
979
+ .charge(100.01)
980
+ .withCurrency("USD")
981
+ .withDescription("JAVA-Auth-015d")
982
+ .execute(), { instanceOf: src_1.GatewayError });
983
+ t.truthy(error?.message);
984
+ });
985
+ (0, ava_1.default)("JAVA_Auth_016a", async (t) => {
986
+ t.plan(2);
987
+ // create card
988
+ const card = new src_1.CreditCardData();
989
+ card.number = "4263970000005262";
990
+ card.expMonth = "12";
991
+ card.expYear = "2029";
992
+ card.cvn = "123";
993
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
994
+ card.cardHolderName = "James Mason";
995
+ // request
996
+ const response = await card
997
+ .charge(100.01)
998
+ .withCurrency("GBP")
999
+ .withDescription("JAVA-Auth-016a")
1000
+ .execute();
1001
+ t.truthy(response);
1002
+ t.is("00", response.responseCode);
1003
+ });
1004
+ (0, ava_1.default)("JAVA_Auth_016b", async (t) => {
1005
+ t.plan(2);
1006
+ // create card
1007
+ const card = new src_1.CreditCardData();
1008
+ card.number = "4263970000005262";
1009
+ card.expMonth = "12";
1010
+ card.expYear = "2029";
1011
+ card.cvn = "123";
1012
+ card.cardHolderName = "James Mason";
1013
+ // request
1014
+ const response = await card
1015
+ .charge(100.01)
1016
+ .withCurrency("EUR")
1017
+ .withDescription("JAVA-Auth-016b")
1018
+ .execute();
1019
+ t.truthy(response);
1020
+ t.is("00", response.responseCode);
1021
+ });
1022
+ (0, ava_1.default)("JAVA_Auth_016c", async (t) => {
1023
+ t.plan(2);
1024
+ // create card
1025
+ const card = new src_1.CreditCardData();
1026
+ card.number = "4263970000005262";
1027
+ card.expMonth = "12";
1028
+ card.expYear = "2029";
1029
+ card.cvn = "123";
1030
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1031
+ card.cardHolderName = "James Mason";
1032
+ // request
1033
+ const response = await card
1034
+ .charge(100.01)
1035
+ .withCurrency("USD")
1036
+ .withDescription("JAVA-Auth-016c")
1037
+ .execute();
1038
+ t.truthy(response);
1039
+ t.is("00", response.responseCode);
1040
+ });
1041
+ (0, ava_1.default)("JAVA_Auth_017a", async (t) => {
1042
+ t.plan(2);
1043
+ // create card
1044
+ const card = new src_1.CreditCardData();
1045
+ card.number = "4263970000005262";
1046
+ card.expMonth = "12";
1047
+ card.expYear = "2029";
1048
+ card.cvn = "123";
1049
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1050
+ card.cardHolderName = "James Mason";
1051
+ // request
1052
+ const response = await card
1053
+ .charge(100.01)
1054
+ .withCurrency("GBP")
1055
+ .withDescription("JAVA-Auth-017a")
1056
+ .execute();
1057
+ t.truthy(response);
1058
+ t.is("00", response.responseCode);
1059
+ });
1060
+ (0, ava_1.default)("JAVA_Auth_018a", async (t) => {
1061
+ t.plan(2);
1062
+ // create card
1063
+ const card = new src_1.CreditCardData();
1064
+ card.number = "4263970000005262";
1065
+ card.expMonth = "12";
1066
+ card.expYear = "2029";
1067
+ card.cvn = "123";
1068
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1069
+ card.cardHolderName = "James Mason";
1070
+ // request
1071
+ const response = await card
1072
+ .charge(100.01)
1073
+ .withCurrency("EUR")
1074
+ .withDescription("JAVA-Auth-018a")
1075
+ .execute();
1076
+ t.truthy(response);
1077
+ t.is("00", response.responseCode);
1078
+ });
1079
+ (0, ava_1.default)("JAVA_Auth_019a", async (t) => {
1080
+ t.plan(2);
1081
+ // create card
1082
+ const card = new src_1.CreditCardData();
1083
+ card.number = "4263970000005262";
1084
+ card.expMonth = "12";
1085
+ card.expYear = "2029";
1086
+ card.cvn = "123";
1087
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1088
+ card.cardHolderName = "James Mason";
1089
+ // request
1090
+ const response = await card
1091
+ .charge(100.01)
1092
+ .withCurrency("USD")
1093
+ .withDescription("JAVA-Auth-019a")
1094
+ .execute();
1095
+ t.truthy(response);
1096
+ t.is("00", response.responseCode);
1097
+ });
1098
+ (0, ava_1.default)("JAVA_Auth_019b1", async (t) => {
1099
+ t.plan(2);
1100
+ // create card
1101
+ const card = new src_1.CreditCardData();
1102
+ card.number = "4263970000005262";
1103
+ card.expMonth = "12";
1104
+ card.expYear = "2029";
1105
+ card.cvn = "1234";
1106
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1107
+ card.cardHolderName = "James Mason";
1108
+ // request
1109
+ const error = await t.throwsAsync(async () => await card
1110
+ .charge(100.01)
1111
+ .withCurrency("GBP")
1112
+ .withDescription("JAVA-Auth-019b1")
1113
+ .execute(), { instanceOf: src_1.GatewayError });
1114
+ t.truthy(error?.message);
1115
+ });
1116
+ (0, ava_1.default)("JAVA_Auth_019b2", async (t) => {
1117
+ t.plan(2);
1118
+ // create card
1119
+ const card = new src_1.CreditCardData();
1120
+ card.number = "4263970000005262";
1121
+ card.expMonth = "12";
1122
+ card.expYear = "2029";
1123
+ card.cvn = "123";
1124
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1125
+ card.cardHolderName = "James Mason";
1126
+ // request
1127
+ const response = await card
1128
+ .charge(100.01)
1129
+ .withCurrency("GBP")
1130
+ .withDescription("JAVA-Auth-019b2")
1131
+ .execute();
1132
+ t.truthy(response);
1133
+ t.is("00", response.responseCode);
1134
+ });
1135
+ (0, ava_1.default)("JAVA_Auth_019c", async (t) => {
1136
+ t.plan(2);
1137
+ // create card
1138
+ const card = new src_1.CreditCardData();
1139
+ card.number = "4263970000005262";
1140
+ card.expMonth = "12";
1141
+ card.expYear = "2029";
1142
+ card.cvn = "12345";
1143
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1144
+ card.cardHolderName = "James Mason";
1145
+ // request
1146
+ const error = await t.throwsAsync(async () => await card
1147
+ .charge(100.01)
1148
+ .withCurrency("EUR")
1149
+ .withDescription("JAVA-Auth-019c")
1150
+ .execute(), { instanceOf: src_1.GatewayError });
1151
+ t.truthy(error?.message);
1152
+ });
1153
+ (0, ava_1.default)("JAVA_Auth_019d", async (t) => {
1154
+ t.plan(2);
1155
+ // create card
1156
+ const card = new src_1.CreditCardData();
1157
+ card.number = "374101000000608";
1158
+ card.expMonth = "12";
1159
+ card.expYear = "2029";
1160
+ card.cvn = "1234";
1161
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1162
+ card.cardHolderName = "James Mason";
1163
+ // request
1164
+ const response = await card
1165
+ .charge(100.01)
1166
+ .withCurrency("USD")
1167
+ .withDescription("JAVA-Auth-019d")
1168
+ .execute();
1169
+ t.truthy(response);
1170
+ t.is("00", response.responseCode);
1171
+ });
1172
+ (0, ava_1.default)("JAVA_Auth_020a1", async (t) => {
1173
+ t.plan(2);
1174
+ // create card
1175
+ const card = new src_1.CreditCardData();
1176
+ card.number = "4263970000005262";
1177
+ card.expMonth = "12";
1178
+ card.expYear = "2029";
1179
+ card.cvn = "123";
1180
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1181
+ card.cardHolderName = "James Mason";
1182
+ // request
1183
+ const response = await card
1184
+ .charge(100.01)
1185
+ .withCurrency("GBP")
1186
+ .withDescription("JAVA-Auth-020a1")
1187
+ .execute();
1188
+ t.truthy(response);
1189
+ t.is("00", response.responseCode);
1190
+ });
1191
+ (0, ava_1.default)("JAVA_Auth_020a2", async (t) => {
1192
+ t.plan(2);
1193
+ // create card
1194
+ const card = new src_1.CreditCardData();
1195
+ card.number = "4263970000005262";
1196
+ card.expMonth = "12";
1197
+ card.expYear = "2029";
1198
+ card.cvn = "";
1199
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Illegible;
1200
+ card.cardHolderName = "James Mason";
1201
+ // request
1202
+ const response = await card
1203
+ .charge(100.01)
1204
+ .withCurrency("EUR")
1205
+ .withDescription("JAVA-Auth-020a2")
1206
+ .execute();
1207
+ t.truthy(response);
1208
+ t.is("00", response.responseCode);
1209
+ });
1210
+ (0, ava_1.default)("JAVA_Auth_020a3", async (t) => {
1211
+ t.plan(2);
1212
+ // create card
1213
+ const card = new src_1.CreditCardData();
1214
+ card.number = "4263970000005262";
1215
+ card.expMonth = "12";
1216
+ card.expYear = "2029";
1217
+ card.cvn = "";
1218
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.NotOnCard;
1219
+ card.cardHolderName = "James Mason";
1220
+ // request
1221
+ const response = await card
1222
+ .charge(100.01)
1223
+ .withCurrency("USD")
1224
+ .withDescription("JAVA-Auth-020a3")
1225
+ .execute();
1226
+ t.truthy(response);
1227
+ t.is("00", response.responseCode);
1228
+ });
1229
+ (0, ava_1.default)("JAVA_Auth_020a4", async (t) => {
1230
+ t.plan(2);
1231
+ // create card
1232
+ const card = new src_1.CreditCardData();
1233
+ card.number = "4263970000005262";
1234
+ card.expMonth = "12";
1235
+ card.expYear = "2029";
1236
+ card.cvn = "";
1237
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.NotRequested;
1238
+ card.cardHolderName = "James Mason";
1239
+ // request
1240
+ const response = await card
1241
+ .charge(100.01)
1242
+ .withCurrency("GBP")
1243
+ .withDescription("JAVA-Auth-020a4")
1244
+ .execute();
1245
+ t.truthy(response);
1246
+ t.is("00", response.responseCode);
1247
+ });
1248
+ (0, ava_1.default)("JAVA_Auth_020b", async (t) => {
1249
+ t.plan(2);
1250
+ // create card
1251
+ const card = new src_1.CreditCardData();
1252
+ card.number = "4263970000005262";
1253
+ card.expMonth = "12";
1254
+ card.expYear = "2029";
1255
+ card.cvn = "123";
1256
+ card.cvnPresenceIndicator = 5;
1257
+ card.cardHolderName = "James Mason";
1258
+ // request
1259
+ const error = await t.throwsAsync(async () => await card
1260
+ .charge(100.01)
1261
+ .withCurrency("EUR")
1262
+ .withDescription("JAVA-Auth-020b")
1263
+ .execute(), { instanceOf: src_1.GatewayError });
1264
+ t.truthy(error?.message);
1265
+ });
1266
+ (0, ava_1.default)("JAVA_Auth_020c", async (t) => {
1267
+ t.plan(2);
1268
+ // create card
1269
+ const card = new src_1.CreditCardData();
1270
+ card.number = "4263970000005262";
1271
+ card.expMonth = "12";
1272
+ card.expYear = "2029";
1273
+ card.cvn = "123";
1274
+ card.cvnPresenceIndicator = 0;
1275
+ card.cardHolderName = "James Mason";
1276
+ // request
1277
+ const response = await card
1278
+ .charge(100.01)
1279
+ .withCurrency("USD")
1280
+ .withDescription("JAVA-Auth-020c")
1281
+ .execute();
1282
+ t.truthy(response);
1283
+ t.is("00", response.responseCode);
1284
+ });
1285
+ (0, ava_1.default)("JAVA_Auth_021a1", async (t) => {
1286
+ t.plan(2);
1287
+ // create card
1288
+ const card = new src_1.CreditCardData();
1289
+ card.number = "4263970000005262";
1290
+ card.expMonth = "12";
1291
+ card.expYear = "2029";
1292
+ card.cvn = "123";
1293
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1294
+ card.cardHolderName = "James Mason";
1295
+ // request
1296
+ const response = await card
1297
+ .charge(100.01)
1298
+ .withCurrency("GBP")
1299
+ .withDescription("JAVA-Auth-021a1")
1300
+ .execute();
1301
+ t.truthy(response);
1302
+ t.is("00", response.responseCode);
1303
+ });
1304
+ (0, ava_1.default)("JAVA_Auth_021a2", async (t) => {
1305
+ t.plan(2);
1306
+ // create card
1307
+ const card = new src_1.CreditCardData();
1308
+ card.number = "4263970000005262";
1309
+ card.expMonth = "12";
1310
+ card.expYear = "2029";
1311
+ card.cvn = "123";
1312
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1313
+ card.cardHolderName = "James Mason";
1314
+ // request
1315
+ const response = await card
1316
+ .authorize(100.01)
1317
+ .withCurrency("EUR")
1318
+ .withDescription("JAVA-Auth-021a2")
1319
+ .execute();
1320
+ t.truthy(response);
1321
+ t.is("00", response.responseCode);
1322
+ });
1323
+ (0, ava_1.default)("JAVA_Auth_021a3", async (t) => {
1324
+ t.plan(2);
1325
+ // create card
1326
+ const card = new src_1.CreditCardData();
1327
+ card.number = "4263970000005262";
1328
+ card.expMonth = "12";
1329
+ card.expYear = "2029";
1330
+ card.cvn = "123";
1331
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1332
+ card.cardHolderName = "James Mason";
1333
+ // request
1334
+ const response = await card
1335
+ .authorize(100.01)
1336
+ .withCurrency("USD")
1337
+ .withDescription("JAVA-Auth-021a3")
1338
+ .execute();
1339
+ t.truthy(response);
1340
+ t.is("00", response.responseCode);
1341
+ });
1342
+ (0, ava_1.default)("JAVA_Auth_021b", async (t) => {
1343
+ t.plan(2);
1344
+ // create card
1345
+ const card = new src_1.CreditCardData();
1346
+ card.number = "4263970000005262";
1347
+ card.expMonth = "12";
1348
+ card.expYear = "2029";
1349
+ card.cvn = "123";
1350
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1351
+ card.cardHolderName = "James Mason";
1352
+ // request
1353
+ const response = await card
1354
+ .authorize(100.01)
1355
+ .withCurrency("EUR")
1356
+ .withDescription("JAVA-Auth-021b")
1357
+ .execute();
1358
+ t.truthy(response);
1359
+ t.is("00", response.responseCode);
1360
+ });
1361
+ (0, ava_1.default)("JAVA_Auth_021c", async (t) => {
1362
+ t.plan(2);
1363
+ // create card
1364
+ const card = new src_1.CreditCardData();
1365
+ card.number = "4263970000005262";
1366
+ card.expMonth = "12";
1367
+ card.expYear = "2029";
1368
+ card.cvn = "123";
1369
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1370
+ card.cardHolderName = "James Mason";
1371
+ // request
1372
+ const response = await card
1373
+ .authorize(100.01)
1374
+ .withCurrency("USD")
1375
+ .withDescription("JAVA-Auth-021c")
1376
+ .execute();
1377
+ t.truthy(response);
1378
+ t.is("00", response.responseCode);
1379
+ });
1380
+ (0, ava_1.default)("JAVA_Auth_022a", async (t) => {
1381
+ t.plan(2);
1382
+ // create card
1383
+ const card = new src_1.CreditCardData();
1384
+ card.number = "4263970000005262";
1385
+ card.expMonth = "12";
1386
+ card.expYear = "2029";
1387
+ card.cvn = "123";
1388
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1389
+ card.cardHolderName = "James Mason";
1390
+ // request
1391
+ const response = await card
1392
+ .charge(100.01)
1393
+ .withCurrency("GBP")
1394
+ .withDescription("JAVA-Auth-022a")
1395
+ .execute();
1396
+ t.truthy(response);
1397
+ t.is("00", response.responseCode);
1398
+ });
1399
+ (0, ava_1.default)("JAVA_Auth_022b", async (t) => {
1400
+ t.plan(2);
1401
+ // create card
1402
+ const card = new src_1.CreditCardData();
1403
+ card.number = "4263970000005262";
1404
+ card.expMonth = "12";
1405
+ card.expYear = "2029";
1406
+ card.cvn = "123";
1407
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1408
+ card.cardHolderName = "James Mason";
1409
+ // request
1410
+ const response = await card
1411
+ .charge(100.01)
1412
+ .withCurrency("GBP")
1413
+ .withDescription("JAVA-Auth-022b")
1414
+ .execute();
1415
+ t.truthy(response);
1416
+ t.is("00", response.responseCode);
1417
+ });
1418
+ (0, ava_1.default)("JAVA_Auth_022c", async (t) => {
1419
+ t.plan(2);
1420
+ // create card
1421
+ const card = new src_1.CreditCardData();
1422
+ card.number = "4263970000005262";
1423
+ card.expMonth = "12";
1424
+ card.expYear = "2029";
1425
+ card.cvn = "123";
1426
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1427
+ card.cardHolderName = "James Mason";
1428
+ // request
1429
+ const response = await card
1430
+ .charge(100.01)
1431
+ .withCurrency("GBP")
1432
+ .withDescription("JAVA-Auth-022c")
1433
+ .execute();
1434
+ t.truthy(response);
1435
+ t.is("00", response.responseCode);
1436
+ });
1437
+ (0, ava_1.default)("JAVA_Auth_022d", async (t) => {
1438
+ t.plan(2);
1439
+ // create card
1440
+ const card = new src_1.CreditCardData();
1441
+ card.number = "4263970000005262";
1442
+ card.expMonth = "12";
1443
+ card.expYear = "2029";
1444
+ card.cvn = "123";
1445
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1446
+ card.cardHolderName = "James Mason";
1447
+ // request
1448
+ const response = await card
1449
+ .charge(100.01)
1450
+ .withCurrency("GBP")
1451
+ .withDescription("JAVA-Auth-022d")
1452
+ .execute();
1453
+ t.truthy(response);
1454
+ t.is("00", response.responseCode);
1455
+ });
1456
+ (0, ava_1.default)("JAVA_Auth_022e", async (t) => {
1457
+ t.plan(2);
1458
+ // create card
1459
+ const card = new src_1.CreditCardData();
1460
+ card.number = "4263970000005262";
1461
+ card.expMonth = "12";
1462
+ card.expYear = "2029";
1463
+ card.cvn = "123";
1464
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1465
+ card.cardHolderName = "James Mason";
1466
+ // request
1467
+ const response = await card
1468
+ .charge(100.01)
1469
+ .withCurrency("GBP")
1470
+ .withDescription("JAVA-Auth-022e")
1471
+ .execute();
1472
+ t.truthy(response);
1473
+ t.is("00", response.responseCode);
1474
+ });
1475
+ (0, ava_1.default)("JAVA_Auth_023a1", async (t) => {
1476
+ t.plan(2);
1477
+ // create card
1478
+ const card = new src_1.CreditCardData();
1479
+ card.number = "4263970000005262";
1480
+ card.expMonth = "12";
1481
+ card.expYear = "2029";
1482
+ card.cvn = "123";
1483
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1484
+ card.cardHolderName = "James Mason";
1485
+ // request
1486
+ const response = await card
1487
+ .charge(100.01)
1488
+ .withCurrency("EUR")
1489
+ .withDescription("JAVA-Auth-023a1")
1490
+ .execute();
1491
+ t.truthy(response);
1492
+ t.is("00", response.responseCode);
1493
+ });
1494
+ (0, ava_1.default)("JAVA_Auth_023a2", async (t) => {
1495
+ t.plan(2);
1496
+ // create card
1497
+ const card = new src_1.CreditCardData();
1498
+ card.number = "4263970000005262";
1499
+ card.expMonth = "12";
1500
+ card.expYear = "2029";
1501
+ card.cvn = "123";
1502
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1503
+ card.cardHolderName = "James Mason";
1504
+ // request
1505
+ const response = await card
1506
+ .charge(100.01)
1507
+ .withCurrency("USD")
1508
+ .withDescription("JAVA-Auth-023a2")
1509
+ .execute();
1510
+ t.truthy(response);
1511
+ t.is("00", response.responseCode);
1512
+ });
1513
+ (0, ava_1.default)("JAVA_Auth_023b1", async (t) => {
1514
+ t.plan(2);
1515
+ // create card
1516
+ const card = new src_1.CreditCardData();
1517
+ card.number = "4263970000005262";
1518
+ card.expMonth = "12";
1519
+ card.expYear = "2029";
1520
+ card.cvn = "123";
1521
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1522
+ card.cardHolderName = "James Mason";
1523
+ // request
1524
+ const response = await card
1525
+ .charge(100.01)
1526
+ .withCurrency("GBP")
1527
+ .withDescription("JAVA-Auth-023b1")
1528
+ .execute();
1529
+ t.truthy(response);
1530
+ t.is("00", response.responseCode);
1531
+ });
1532
+ (0, ava_1.default)("JAVA_Auth_023c", async (t) => {
1533
+ t.plan(2);
1534
+ // create card
1535
+ const card = new src_1.CreditCardData();
1536
+ card.number = "4263970000005262";
1537
+ card.expMonth = "12";
1538
+ card.expYear = "2029";
1539
+ card.cvn = "123";
1540
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1541
+ card.cardHolderName = "James Mason";
1542
+ // request
1543
+ const response = await card
1544
+ .charge(100.01)
1545
+ .withCurrency("GBP")
1546
+ .withDescription("JAVA-Auth-023c")
1547
+ .execute();
1548
+ t.truthy(response);
1549
+ t.is("00", response.responseCode);
1550
+ });
1551
+ (0, ava_1.default)("JAVA_Auth_024a1", async (t) => {
1552
+ t.plan(2);
1553
+ // create card
1554
+ const card = new src_1.CreditCardData();
1555
+ card.number = "4263970000005262";
1556
+ card.expMonth = "12";
1557
+ card.expYear = "2029";
1558
+ card.cvn = "123";
1559
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1560
+ card.cardHolderName = "James Mason";
1561
+ // request
1562
+ const response = await card
1563
+ .charge(100.01)
1564
+ .withCurrency("EUR")
1565
+ .withDescription("JAVA-Auth-024a1")
1566
+ .execute();
1567
+ t.truthy(response);
1568
+ t.is("00", response.responseCode);
1569
+ });
1570
+ (0, ava_1.default)("JAVA_Auth_024a2", async (t) => {
1571
+ t.plan(2);
1572
+ // create card
1573
+ const card = new src_1.CreditCardData();
1574
+ card.number = "4263970000005262";
1575
+ card.expMonth = "12";
1576
+ card.expYear = "2029";
1577
+ card.cvn = "123";
1578
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1579
+ card.cardHolderName = "James Mason";
1580
+ // request
1581
+ const response = await card
1582
+ .charge(100.01)
1583
+ .withCurrency("USD")
1584
+ .withDescription("JAVA-Auth-024a2")
1585
+ .execute();
1586
+ t.truthy(response);
1587
+ t.is("00", response.responseCode);
1588
+ });
1589
+ (0, ava_1.default)("JAVA_Auth_024a3", async (t) => {
1590
+ t.plan(2);
1591
+ // create card
1592
+ const card = new src_1.CreditCardData();
1593
+ card.number = "4263970000005262";
1594
+ card.expMonth = "12";
1595
+ card.expYear = "2029";
1596
+ card.cvn = "123";
1597
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1598
+ card.cardHolderName = "James Mason";
1599
+ // request
1600
+ const response = await card
1601
+ .charge(100.01)
1602
+ .withCurrency("GBP")
1603
+ .withDescription("JAVA-Auth-024a3")
1604
+ .execute();
1605
+ t.truthy(response);
1606
+ t.is("00", response.responseCode);
1607
+ });
1608
+ (0, ava_1.default)("JAVA_Auth_024b", async (t) => {
1609
+ t.plan(2);
1610
+ // create card
1611
+ const card = new src_1.CreditCardData();
1612
+ card.number = "4263970000005262";
1613
+ card.expMonth = "12";
1614
+ card.expYear = "2029";
1615
+ card.cvn = "123";
1616
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1617
+ card.cardHolderName = "James Mason";
1618
+ // request
1619
+ const response = await card
1620
+ .charge(100.01)
1621
+ .withCurrency("EUR")
1622
+ .withDescription("JAVA-Auth-024b")
1623
+ .execute();
1624
+ t.truthy(response);
1625
+ t.is("00", response.responseCode);
1626
+ });
1627
+ (0, ava_1.default)("JAVA_Auth_024c", async (t) => {
1628
+ t.plan(2);
1629
+ // create card
1630
+ const card = new src_1.CreditCardData();
1631
+ card.number = "4263970000005262";
1632
+ card.expMonth = "12";
1633
+ card.expYear = "2029";
1634
+ card.cvn = "123";
1635
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1636
+ card.cardHolderName = "James Mason";
1637
+ // request
1638
+ const response = await card
1639
+ .charge(100.01)
1640
+ .withCurrency("USD")
1641
+ .withDescription("JAVA-Auth-024c")
1642
+ .execute();
1643
+ t.truthy(response);
1644
+ t.is("00", response.responseCode);
1645
+ });
1646
+ (0, ava_1.default)("JAVA_Auth_025", async (t) => {
1647
+ t.plan(2);
1648
+ // create card
1649
+ const card = new src_1.CreditCardData();
1650
+ card.number = "4263970000005262";
1651
+ card.expMonth = "12";
1652
+ card.expYear = "2029";
1653
+ card.cvn = "123";
1654
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1655
+ card.cardHolderName = "James Mason";
1656
+ // request
1657
+ const response = await card
1658
+ .charge(100.01)
1659
+ .withCurrency("GBP")
1660
+ .withDescription("JAVA-Auth-025")
1661
+ .execute();
1662
+ t.truthy(response);
1663
+ t.is("00", response.responseCode);
1664
+ });
1665
+ (0, ava_1.default)("JAVA_Auth_026a1", async (t) => {
1666
+ t.plan(2);
1667
+ // create card
1668
+ const card = new src_1.CreditCardData();
1669
+ card.number = "4263970000005262";
1670
+ card.expMonth = "12";
1671
+ card.expYear = "2029";
1672
+ card.cvn = "123";
1673
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1674
+ card.cardHolderName = "James Mason";
1675
+ // request
1676
+ const response = await card
1677
+ .charge(100.01)
1678
+ .withCurrency("EUR")
1679
+ .withDescription("JAVA-Auth-026a1")
1680
+ .execute();
1681
+ t.truthy(response);
1682
+ t.is("00", response.responseCode);
1683
+ });
1684
+ (0, ava_1.default)("JAVA_Auth_026a2", async (t) => {
1685
+ t.plan(2);
1686
+ // create card
1687
+ const card = new src_1.CreditCardData();
1688
+ card.number = "4263970000005262";
1689
+ card.expMonth = "12";
1690
+ card.expYear = "2029";
1691
+ card.cvn = "123";
1692
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1693
+ card.cardHolderName = "James Mason";
1694
+ // request
1695
+ const response = await card.charge(100.01).withCurrency("EUR").execute();
1696
+ t.truthy(response);
1697
+ t.is("00", response.responseCode);
1698
+ });
1699
+ (0, ava_1.default)("JAVA_Auth_026b", async (t) => {
1700
+ t.plan(2);
1701
+ // create card
1702
+ const card = new src_1.CreditCardData();
1703
+ card.number = "4263970000005262";
1704
+ card.expMonth = "12";
1705
+ card.expYear = "2029";
1706
+ card.cvn = "123";
1707
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1708
+ card.cardHolderName = "James Mason";
1709
+ // request
1710
+ const response = await card.charge(100.01).withCurrency("USD").execute();
1711
+ t.truthy(response);
1712
+ t.is("00", response.responseCode);
1713
+ });
1714
+ (0, ava_1.default)("JAVA_Auth_026c1", async (t) => {
1715
+ t.plan(2);
1716
+ // create card
1717
+ const card = new src_1.CreditCardData();
1718
+ card.number = "4263970000005262";
1719
+ card.expMonth = "12";
1720
+ card.expYear = "2029";
1721
+ card.cvn = "123";
1722
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1723
+ card.cardHolderName = "James Mason";
1724
+ // request
1725
+ const response = await card
1726
+ .charge(100.01)
1727
+ .withCurrency("GBP")
1728
+ /* eslint-disable */
1729
+ .withDescription("3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIep3uviSnW9XEB3a4wpIW9XEB3a")
1730
+ /* eslint-enable */
1731
+ .execute();
1732
+ t.truthy(response);
1733
+ t.is("00", response.responseCode);
1734
+ });
1735
+ (0, ava_1.default)("JAVA_Auth_026c2", async (t) => {
1736
+ t.plan(2);
1737
+ // create card
1738
+ const card = new src_1.CreditCardData();
1739
+ card.number = "4263970000005262";
1740
+ card.expMonth = "12";
1741
+ card.expYear = "2029";
1742
+ card.cvn = "123";
1743
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1744
+ card.cardHolderName = "James Mason";
1745
+ // request
1746
+ const response = await card
1747
+ .charge(100.01)
1748
+ .withCurrency("EUR")
1749
+ .withDescription("JAVA-Auth-026c2")
1750
+ .execute();
1751
+ t.truthy(response);
1752
+ t.is("00", response.responseCode);
1753
+ });
1754
+ (0, ava_1.default)("JAVA_Auth_027a", async (t) => {
1755
+ t.plan(2);
1756
+ // create card
1757
+ const card = new src_1.CreditCardData();
1758
+ card.number = "4263970000005262";
1759
+ card.expMonth = "12";
1760
+ card.expYear = "2029";
1761
+ card.cvn = "123";
1762
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1763
+ card.cardHolderName = "James Mason";
1764
+ // request
1765
+ const response = await card
1766
+ .charge(100.01)
1767
+ .withCurrency("USD")
1768
+ .withCustomerId("123456")
1769
+ .withDescription("JAVA-Auth-027a")
1770
+ .execute();
1771
+ t.truthy(response);
1772
+ t.is("00", response.responseCode);
1773
+ });
1774
+ (0, ava_1.default)("JAVA_Auth_028a", async (t) => {
1775
+ t.plan(2);
1776
+ // create card
1777
+ const card = new src_1.CreditCardData();
1778
+ card.number = "4263970000005262";
1779
+ card.expMonth = "12";
1780
+ card.expYear = "2029";
1781
+ card.cvn = "123";
1782
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1783
+ card.cardHolderName = "James Mason";
1784
+ // request
1785
+ const response = await card
1786
+ .charge(100.01)
1787
+ .withCurrency("GBP")
1788
+ .withCustomerId("123456")
1789
+ .withDescription("JAVA-Auth-028a")
1790
+ .execute();
1791
+ t.truthy(response);
1792
+ t.is("00", response.responseCode);
1793
+ });
1794
+ (0, ava_1.default)("JAVA_Auth_028b", async (t) => {
1795
+ t.plan(2);
1796
+ // create card
1797
+ const card = new src_1.CreditCardData();
1798
+ card.number = "4263970000005262";
1799
+ card.expMonth = "12";
1800
+ card.expYear = "2029";
1801
+ card.cvn = "123";
1802
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1803
+ card.cardHolderName = "James Mason";
1804
+ // request
1805
+ const response = await card
1806
+ .charge(100.01)
1807
+ .withCurrency("EUR")
1808
+ .withDescription("JAVA-Auth-028b")
1809
+ .execute();
1810
+ t.truthy(response);
1811
+ t.is("00", response.responseCode);
1812
+ });
1813
+ (0, ava_1.default)("JAVA_Auth_028c", async (t) => {
1814
+ t.plan(2);
1815
+ // create card
1816
+ const card = new src_1.CreditCardData();
1817
+ card.number = "4263970000005262";
1818
+ card.expMonth = "12";
1819
+ card.expYear = "2029";
1820
+ card.cvn = "123";
1821
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1822
+ card.cardHolderName = "James Mason";
1823
+ // request
1824
+ const res = await card
1825
+ .charge(100.01)
1826
+ .withCurrency("USD")
1827
+ // tslint:disable:max-line-length
1828
+ .withCustomerId("3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep33a4wpQQQQQQQQQ1")
1829
+ // tslint:enable:max-line-length
1830
+ .withDescription("JAVA-Auth-028c")
1831
+ .execute();
1832
+ t.truthy(res);
1833
+ t.is("00", res.responseCode);
1834
+ });
1835
+ (0, ava_1.default)("JAVA_Auth_028d", async (t) => {
1836
+ t.plan(2);
1837
+ // create card
1838
+ const card = new src_1.CreditCardData();
1839
+ card.number = "4263970000005262";
1840
+ card.expMonth = "12";
1841
+ card.expYear = "2029";
1842
+ card.cvn = "123";
1843
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1844
+ card.cardHolderName = "James Mason";
1845
+ // request
1846
+ const res = await card
1847
+ .charge(100.01)
1848
+ .withCurrency("GBP")
1849
+ .withCustomerId("123456~")
1850
+ .withDescription("JAVA-Auth-028d")
1851
+ .execute();
1852
+ t.truthy(res);
1853
+ t.is("00", res.responseCode);
1854
+ });
1855
+ (0, ava_1.default)("JAVA_Auth_029a", async (t) => {
1856
+ t.plan(2);
1857
+ // create card
1858
+ const card = new src_1.CreditCardData();
1859
+ card.number = "4263970000005262";
1860
+ card.expMonth = "12";
1861
+ card.expYear = "2029";
1862
+ card.cvn = "123";
1863
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1864
+ card.cardHolderName = "James Mason";
1865
+ // request
1866
+ const response = await card
1867
+ .charge(100.01)
1868
+ .withCurrency("EUR")
1869
+ .withProductId("123456")
1870
+ .withDescription("JAVA-Auth-029a")
1871
+ .execute();
1872
+ t.truthy(response);
1873
+ t.is("00", response.responseCode);
1874
+ });
1875
+ (0, ava_1.default)("JAVA_Auth_029b", async (t) => {
1876
+ t.plan(2);
1877
+ // create card
1878
+ const card = new src_1.CreditCardData();
1879
+ card.number = "4263970000005262";
1880
+ card.expMonth = "12";
1881
+ card.expYear = "2029";
1882
+ card.cvn = "123";
1883
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1884
+ card.cardHolderName = "James Mason";
1885
+ // request
1886
+ const response = await card
1887
+ .charge(100.01)
1888
+ .withCurrency("USD")
1889
+ .withDescription("JAVA-Auth-029b")
1890
+ .execute();
1891
+ t.truthy(response);
1892
+ t.is("00", response.responseCode);
1893
+ });
1894
+ (0, ava_1.default)("JAVA_Auth_029c", async (t) => {
1895
+ t.plan(2);
1896
+ // create card
1897
+ const card = new src_1.CreditCardData();
1898
+ card.number = "4263970000005262";
1899
+ card.expMonth = "12";
1900
+ card.expYear = "2029";
1901
+ card.cvn = "123";
1902
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1903
+ card.cardHolderName = "James Mason";
1904
+ // request
1905
+ const res = await card
1906
+ .charge(100.01)
1907
+ .withCurrency("GBP")
1908
+ // tslint:disable:max-line-length
1909
+ .withProductId("3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep33a4wpQQQQQQQQQ1")
1910
+ // tslint:enable:max-line-length
1911
+ .withDescription("JAVA-Auth-029c")
1912
+ .execute();
1913
+ t.truthy(res);
1914
+ t.is("00", res.responseCode);
1915
+ });
1916
+ (0, ava_1.default)("JAVA_Auth_029d", async (t) => {
1917
+ t.plan(2);
1918
+ // create card
1919
+ const card = new src_1.CreditCardData();
1920
+ card.number = "4263970000005262";
1921
+ card.expMonth = "12";
1922
+ card.expYear = "2029";
1923
+ card.cvn = "123";
1924
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1925
+ card.cardHolderName = "James Mason";
1926
+ // request
1927
+ const res = await card
1928
+ .charge(100.01)
1929
+ .withCurrency("EUR")
1930
+ .withProductId("123456~")
1931
+ .withDescription("JAVA-Auth-029d")
1932
+ .execute();
1933
+ t.truthy(res);
1934
+ t.is("00", res.responseCode);
1935
+ });
1936
+ (0, ava_1.default)("JAVA_Auth_030a", async (t) => {
1937
+ t.plan(2);
1938
+ // create card
1939
+ const card = new src_1.CreditCardData();
1940
+ card.number = "4263970000005262";
1941
+ card.expMonth = "12";
1942
+ card.expYear = "2029";
1943
+ card.cvn = "123";
1944
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1945
+ card.cardHolderName = "James Mason";
1946
+ // request
1947
+ const response = await card
1948
+ .charge(100.01)
1949
+ .withCurrency("USD")
1950
+ .withClientTransactionId("123456")
1951
+ .withDescription("JAVA-Auth-030a")
1952
+ .execute();
1953
+ t.truthy(response);
1954
+ t.is("00", response.responseCode);
1955
+ });
1956
+ (0, ava_1.default)("JAVA_Auth_030b", async (t) => {
1957
+ t.plan(2);
1958
+ // create card
1959
+ const card = new src_1.CreditCardData();
1960
+ card.number = "4263970000005262";
1961
+ card.expMonth = "12";
1962
+ card.expYear = "2029";
1963
+ card.cvn = "123";
1964
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1965
+ card.cardHolderName = "James Mason";
1966
+ // request
1967
+ const response = await card
1968
+ .charge(100.01)
1969
+ .withCurrency("GBP")
1970
+ .withDescription("JAVA-Auth-030b")
1971
+ .execute();
1972
+ t.truthy(response);
1973
+ t.is("00", response.responseCode);
1974
+ });
1975
+ (0, ava_1.default)("JAVA_Auth_030c", async (t) => {
1976
+ t.plan(2);
1977
+ // create card
1978
+ const card = new src_1.CreditCardData();
1979
+ card.number = "4263970000005262";
1980
+ card.expMonth = "12";
1981
+ card.expYear = "2029";
1982
+ card.cvn = "123";
1983
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1984
+ card.cardHolderName = "James Mason";
1985
+ // request
1986
+ const res = await card
1987
+ .charge(100.01)
1988
+ .withCurrency("EUR")
1989
+ // tslint:disable:max-line-length
1990
+ .withClientTransactionId("3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep33a4wpQQQQQQQQQ1")
1991
+ // tslint:enable:max-line-length
1992
+ .withDescription("JAVA-Auth-030c")
1993
+ .execute();
1994
+ t.truthy(res);
1995
+ t.is("00", res.responseCode);
1996
+ });
1997
+ (0, ava_1.default)("JAVA_Auth_030d", async (t) => {
1998
+ t.plan(2);
1999
+ // create card
2000
+ const card = new src_1.CreditCardData();
2001
+ card.number = "4263970000005262";
2002
+ card.expMonth = "12";
2003
+ card.expYear = "2029";
2004
+ card.cvn = "123";
2005
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2006
+ card.cardHolderName = "James Mason";
2007
+ // request
2008
+ const res = await card
2009
+ .charge(100.01)
2010
+ .withCurrency("USD")
2011
+ .withClientTransactionId("123456~")
2012
+ .withDescription("JAVA-Auth-030d")
2013
+ .execute();
2014
+ t.truthy(res);
2015
+ t.is("00", res.responseCode);
2016
+ });
2017
+ (0, ava_1.default)("JAVA_Auth_031a", async (t) => {
2018
+ t.plan(2);
2019
+ // create card
2020
+ const card = new src_1.CreditCardData();
2021
+ card.number = "4263970000005262";
2022
+ card.expMonth = "12";
2023
+ card.expYear = "2029";
2024
+ card.cvn = "123";
2025
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2026
+ card.cardHolderName = "James Mason";
2027
+ // request
2028
+ const response = await card
2029
+ .charge(100.01)
2030
+ .withCurrency("GBP")
2031
+ .withCustomerIpAddress("123.123.123.123")
2032
+ .withDescription("JAVA-Auth-031a")
2033
+ .execute();
2034
+ t.truthy(response);
2035
+ t.is("00", response.responseCode);
2036
+ });
2037
+ (0, ava_1.default)("JAVA_Auth_031b", async (t) => {
2038
+ t.plan(2);
2039
+ // create card
2040
+ const card = new src_1.CreditCardData();
2041
+ card.number = "4263970000005262";
2042
+ card.expMonth = "12";
2043
+ card.expYear = "2029";
2044
+ card.cvn = "123";
2045
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2046
+ card.cardHolderName = "James Mason";
2047
+ // request
2048
+ const response = await card
2049
+ .charge(100.01)
2050
+ .withCurrency("EUR")
2051
+ .withDescription("JAVA-Auth-031b")
2052
+ .execute();
2053
+ t.truthy(response);
2054
+ t.is("00", response.responseCode);
2055
+ });
2056
+ (0, ava_1.default)("JAVA_Auth_031c1", async (t) => {
2057
+ t.plan(2);
2058
+ // create card
2059
+ const card = new src_1.CreditCardData();
2060
+ card.number = "4263970000005262";
2061
+ card.expMonth = "12";
2062
+ card.expYear = "2029";
2063
+ card.cvn = "123";
2064
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2065
+ card.cardHolderName = "James Mason";
2066
+ // request
2067
+ const response = await card
2068
+ .charge(100.01)
2069
+ .withCurrency("USD")
2070
+ .withCustomerIpAddress("123.123.123.123")
2071
+ .withDescription("JAVA-Auth-031c1")
2072
+ .execute();
2073
+ t.truthy(response);
2074
+ t.is("00", response.responseCode);
2075
+ });
2076
+ (0, ava_1.default)("JAVA_Auth_031c2", async (t) => {
2077
+ t.plan(2);
2078
+ // create card
2079
+ const card = new src_1.CreditCardData();
2080
+ card.number = "4263970000005262";
2081
+ card.expMonth = "12";
2082
+ card.expYear = "2029";
2083
+ card.cvn = "123";
2084
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2085
+ card.cardHolderName = "James Mason";
2086
+ // request
2087
+ const response = await card
2088
+ .charge(100.01)
2089
+ .withCurrency("GBP")
2090
+ .withCustomerIpAddress("123.123.123.123")
2091
+ .withDescription("JAVA-Auth-031c2")
2092
+ .execute();
2093
+ t.truthy(response);
2094
+ t.is("00", response.responseCode);
2095
+ });
2096
+ (0, ava_1.default)("JAVA_Auth_032a", async (t) => {
2097
+ t.plan(2);
2098
+ // billing address
2099
+ const billingAddress = new src_1.Address();
2100
+ billingAddress.postalCode = "E77 4QJ";
2101
+ billingAddress.country = "United Kingdom";
2102
+ // shipping address
2103
+ const shippingAddress = new src_1.Address();
2104
+ shippingAddress.postalCode = "Z76 PO9";
2105
+ shippingAddress.country = "France";
2106
+ // create card
2107
+ const card = new src_1.CreditCardData();
2108
+ card.number = "4263970000005262";
2109
+ card.expMonth = "12";
2110
+ card.expYear = "2029";
2111
+ card.cvn = "123";
2112
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2113
+ card.cardHolderName = "James Mason";
2114
+ // request
2115
+ const response = await card
2116
+ .charge(100.01)
2117
+ .withCurrency("EUR")
2118
+ .withAddress(billingAddress)
2119
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
2120
+ .withDescription("JAVA-Auth-032a")
2121
+ .execute();
2122
+ t.truthy(response);
2123
+ t.is("00", response.responseCode);
2124
+ });
2125
+ (0, ava_1.default)("JAVA_Auth_033a", async (t) => {
2126
+ t.plan(2);
2127
+ // billing address
2128
+ const billingAddress = new src_1.Address();
2129
+ billingAddress.postalCode = "774|10";
2130
+ // shipping address
2131
+ const shippingAddress = new src_1.Address();
2132
+ shippingAddress.postalCode = "769|52";
2133
+ // create card
2134
+ const card = new src_1.CreditCardData();
2135
+ card.number = "4263970000005262";
2136
+ card.expMonth = "12";
2137
+ card.expYear = "2029";
2138
+ card.cvn = "123";
2139
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2140
+ card.cardHolderName = "James Mason";
2141
+ // request
2142
+ const response = await card
2143
+ .charge(100.01)
2144
+ .withCurrency("USD")
2145
+ .withAddress(billingAddress)
2146
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
2147
+ .withDescription("JAVA-Auth-033a")
2148
+ .execute();
2149
+ t.truthy(response);
2150
+ t.is("00", response.responseCode);
2151
+ });
2152
+ (0, ava_1.default)("JAVA_Auth_033b1", async (t) => {
2153
+ t.plan(2);
2154
+ // billing address
2155
+ const billingAddress = new src_1.Address();
2156
+ billingAddress.postalCode = "774|10";
2157
+ // create card
2158
+ const card = new src_1.CreditCardData();
2159
+ card.number = "4263970000005262";
2160
+ card.expMonth = "12";
2161
+ card.expYear = "2029";
2162
+ card.cvn = "123";
2163
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2164
+ card.cardHolderName = "James Mason";
2165
+ // request
2166
+ const response = await card
2167
+ .charge(100.01)
2168
+ .withCurrency("USD")
2169
+ .withAddress(billingAddress)
2170
+ .withDescription("JAVA-Auth-033b1")
2171
+ .execute();
2172
+ t.truthy(response);
2173
+ t.is("00", response.responseCode);
2174
+ });
2175
+ (0, ava_1.default)("JAVA_Auth_033b2", async (t) => {
2176
+ t.plan(2);
2177
+ // shipping address
2178
+ const shippingAddress = new src_1.Address();
2179
+ shippingAddress.postalCode = "769|52";
2180
+ // create card
2181
+ const card = new src_1.CreditCardData();
2182
+ card.number = "4263970000005262";
2183
+ card.expMonth = "12";
2184
+ card.expYear = "2029";
2185
+ card.cvn = "123";
2186
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2187
+ card.cardHolderName = "James Mason";
2188
+ // request
2189
+ const response = await card
2190
+ .charge(100.01)
2191
+ .withCurrency("USD")
2192
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
2193
+ .withDescription("JAVA-Auth-033b2")
2194
+ .execute();
2195
+ t.truthy(response);
2196
+ t.is("00", response.responseCode);
2197
+ });
2198
+ (0, ava_1.default)("JAVA_Auth_033c1", async (t) => {
2199
+ t.plan(2);
2200
+ // billing address
2201
+ const billingAddress = new src_1.Address();
2202
+ billingAddress.postalCode = "774|10";
2203
+ // create card
2204
+ const card = new src_1.CreditCardData();
2205
+ card.number = "4263970000005262";
2206
+ card.expMonth = "12";
2207
+ card.expYear = "2029";
2208
+ card.cvn = "123";
2209
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2210
+ card.cardHolderName = "James Mason";
2211
+ // request
2212
+ const response = await card
2213
+ .charge(100.01)
2214
+ .withCurrency("USD")
2215
+ .withAddress(billingAddress)
2216
+ .withDescription("JAVA-Auth-033c1")
2217
+ .execute();
2218
+ t.truthy(response);
2219
+ t.is("00", response.responseCode);
2220
+ });
2221
+ (0, ava_1.default)("JAVA_Auth_033c2", async (t) => {
2222
+ t.plan(2);
2223
+ // shipping address
2224
+ const shippingAddress = new src_1.Address();
2225
+ shippingAddress.postalCode =
2226
+ "3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwep4wpIwep3u111";
2227
+ // create card
2228
+ const card = new src_1.CreditCardData();
2229
+ card.number = "4263970000005262";
2230
+ card.expMonth = "12";
2231
+ card.expYear = "2029";
2232
+ card.cvn = "123";
2233
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2234
+ card.cardHolderName = "James Mason";
2235
+ // request
2236
+ const response = await card
2237
+ .charge(100.01)
2238
+ .withCurrency("GBP")
2239
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
2240
+ .withDescription("JAVA-Auth-033c2")
2241
+ .execute();
2242
+ t.truthy(response);
2243
+ t.is("00", response.responseCode);
2244
+ });
2245
+ (0, ava_1.default)("JAVA_Auth_034a", async (t) => {
2246
+ t.plan(2);
2247
+ // billing address
2248
+ const billingAddress = new src_1.Address();
2249
+ billingAddress.country = "GB";
2250
+ // shipping address
2251
+ const shippingAddress = new src_1.Address();
2252
+ shippingAddress.country = "FR";
2253
+ // create card
2254
+ const card = new src_1.CreditCardData();
2255
+ card.number = "4263970000005262";
2256
+ card.expMonth = "12";
2257
+ card.expYear = "2029";
2258
+ card.cvn = "123";
2259
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2260
+ card.cardHolderName = "James Mason";
2261
+ // request
2262
+ const response = await card
2263
+ .charge(100.01)
2264
+ .withCurrency("EUR")
2265
+ .withAddress(billingAddress)
2266
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
2267
+ .withDescription("JAVA-Auth-034a")
2268
+ .execute();
2269
+ t.truthy(response);
2270
+ t.is("00", response.responseCode);
2271
+ });
2272
+ (0, ava_1.default)("JAVA_Auth_034b1", async (t) => {
2273
+ t.plan(2);
2274
+ // shipping address
2275
+ const shippingAddress = new src_1.Address();
2276
+ shippingAddress.country = "GB";
2277
+ // create card
2278
+ const card = new src_1.CreditCardData();
2279
+ card.number = "4263970000005262";
2280
+ card.expMonth = "12";
2281
+ card.expYear = "2029";
2282
+ card.cvn = "123";
2283
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2284
+ card.cardHolderName = "James Mason";
2285
+ // request
2286
+ const response = await card
2287
+ .charge(100.01)
2288
+ .withCurrency("USD")
2289
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
2290
+ .withDescription("JAVA-Auth-034b1")
2291
+ .execute();
2292
+ t.truthy(response);
2293
+ t.is("00", response.responseCode);
2294
+ });
2295
+ (0, ava_1.default)("JAVA_Auth_034b2", async (t) => {
2296
+ t.plan(2);
2297
+ // billing address
2298
+ const billingAddress = new src_1.Address();
2299
+ billingAddress.country = "GB";
2300
+ // create card
2301
+ const card = new src_1.CreditCardData();
2302
+ card.number = "4263970000005262";
2303
+ card.expMonth = "12";
2304
+ card.expYear = "2029";
2305
+ card.cvn = "123";
2306
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2307
+ card.cardHolderName = "James Mason";
2308
+ // request
2309
+ const response = await card
2310
+ .charge(100.01)
2311
+ .withCurrency("GBP")
2312
+ .withAddress(billingAddress)
2313
+ .withDescription("JAVA-Auth-034b2")
2314
+ .execute();
2315
+ t.truthy(response);
2316
+ t.is("00", response.responseCode);
2317
+ });
2318
+ (0, ava_1.default)("JAVA_Auth_034c1", async (t) => {
2319
+ t.plan(2);
2320
+ // billing address
2321
+ const billingAddress = new src_1.Address();
2322
+ billingAddress.country =
2323
+ "3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwep4wpIwep3u111";
2324
+ // create card
2325
+ const card = new src_1.CreditCardData();
2326
+ card.number = "4263970000005262";
2327
+ card.expMonth = "12";
2328
+ card.expYear = "2029";
2329
+ card.cvn = "123";
2330
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2331
+ card.cardHolderName = "James Mason";
2332
+ // request
2333
+ const response = await card
2334
+ .charge(100.01)
2335
+ .withCurrency("EUR")
2336
+ .withAddress(billingAddress)
2337
+ .withDescription("JAVA-Auth-034c1")
2338
+ .execute();
2339
+ t.truthy(response);
2340
+ t.is("00", response.responseCode);
2341
+ });
2342
+ (0, ava_1.default)("JAVA_Auth_034c2", async (t) => {
2343
+ t.plan(2);
2344
+ // shipping address
2345
+ const shippingAddress = new src_1.Address();
2346
+ shippingAddress.country =
2347
+ "3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwep4wpIwep3u111";
2348
+ // create card
2349
+ const card = new src_1.CreditCardData();
2350
+ card.number = "4263970000005262";
2351
+ card.expMonth = "12";
2352
+ card.expYear = "2029";
2353
+ card.cvn = "123";
2354
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2355
+ card.cardHolderName = "James Mason";
2356
+ // request
2357
+ const response = await card
2358
+ .charge(100.01)
2359
+ .withCurrency("USD")
2360
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
2361
+ .withDescription("JAVA-Auth-034c2")
2362
+ .execute();
2363
+ t.truthy(response);
2364
+ t.is("00", response.responseCode);
2365
+ });
2366
+ (0, ava_1.default)("JAVA_Auth_035a", async (t) => {
2367
+ t.plan(2);
2368
+ // create card
2369
+ const card = new src_1.CreditCardData();
2370
+ card.number = "4263970000005262";
2371
+ card.expMonth = "12";
2372
+ card.expYear = "2029";
2373
+ card.cvn = "123";
2374
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2375
+ card.cardHolderName = "James Mason";
2376
+ // request
2377
+ const response = await card
2378
+ .charge(100.01)
2379
+ .withCurrency("GBP")
2380
+ .withDescription("JAVA-Auth-035a")
2381
+ .execute();
2382
+ t.truthy(response);
2383
+ t.is("00", response.responseCode);
2384
+ });
2385
+ (0, ava_1.default)("JAVA_Auth_035b", async (t) => {
2386
+ t.plan(2);
2387
+ // create card
2388
+ const card = new src_1.CreditCardData();
2389
+ card.number = "4263970000005262";
2390
+ card.expMonth = "12";
2391
+ card.expYear = "2029";
2392
+ card.cvn = "123";
2393
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2394
+ card.cardHolderName = "James Mason";
2395
+ // request
2396
+ const response = await card
2397
+ .charge(100.01)
2398
+ .withCurrency("EUR")
2399
+ .withDescription("JAVA-Auth-035b")
2400
+ .execute();
2401
+ t.truthy(response);
2402
+ t.is("00", response.responseCode);
2403
+ });
2404
+ (0, ava_1.default)("JAVA_Auth_055a", async (t) => {
2405
+ t.plan(2);
2406
+ const config = new ServiceConfigs_1.GpEcomConfig();
2407
+ config.merchantId = "heartlandgpsandbox";
2408
+ config.accountId = "api";
2409
+ config.sharedSecret = "secret";
2410
+ config.refundPassword = "refund";
2411
+ config.rebatePassword = "rebate";
2412
+ config.timeout = 20000;
2413
+ config.channel = "ECOM";
2414
+ src_1.ServicesContainer.configureService(config, "with4thChannelEcom");
2415
+ // billing address
2416
+ const billingAddress = new src_1.Address();
2417
+ billingAddress.postalCode = "774|10";
2418
+ billingAddress.country = "GB";
2419
+ // shipping address
2420
+ const shippingAddress = new src_1.Address();
2421
+ shippingAddress.postalCode = "769|52";
2422
+ shippingAddress.country = "FR";
2423
+ // create card
2424
+ const card = new src_1.CreditCardData();
2425
+ card.number = "4263970000005262";
2426
+ card.expMonth = "12";
2427
+ card.expYear = "2029";
2428
+ card.cvn = "123";
2429
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2430
+ card.cardHolderName = "James Mason";
2431
+ // request
2432
+ const response = await card
2433
+ .charge(100.01)
2434
+ .withCurrency("EUR")
2435
+ .withCustomerId("12345")
2436
+ .withProductId("654321")
2437
+ .withClientTransactionId("987654")
2438
+ .withCustomerIpAddress("123.123.123.123")
2439
+ .withAddress(billingAddress)
2440
+ .withAddress(shippingAddress, src_1.AddressType.Shipping)
2441
+ .withDescription("JAVA-Auth-055a")
2442
+ .execute("with4thChannelEcom");
2443
+ t.truthy(response);
2444
+ t.is("00", response.responseCode);
2445
+ });
2446
+ //# sourceMappingURL=AuthTest.js.map