globalpayments-api 3.0.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (596) hide show
  1. package/.eslintignore +9 -0
  2. package/.eslintrc.cjs +39 -0
  3. package/.prettierrc +14 -4
  4. package/CHANGELOG.md +44 -32
  5. package/lib/src/Builders/AuthorizationBuilder.d.ts +325 -325
  6. package/lib/src/Builders/AuthorizationBuilder.js +616 -600
  7. package/lib/src/Builders/AuthorizationBuilder.js.map +1 -1
  8. package/lib/src/Builders/BaseBuilder/ValidationClause.d.ts +14 -14
  9. package/lib/src/Builders/BaseBuilder/ValidationClause.js +61 -61
  10. package/lib/src/Builders/BaseBuilder/ValidationClause.js.map +1 -1
  11. package/lib/src/Builders/BaseBuilder/ValidationTarget.d.ts +16 -16
  12. package/lib/src/Builders/BaseBuilder/ValidationTarget.js +35 -28
  13. package/lib/src/Builders/BaseBuilder/ValidationTarget.js.map +1 -1
  14. package/lib/src/Builders/BaseBuilder/Validations.d.ts +11 -11
  15. package/lib/src/Builders/BaseBuilder/Validations.js +54 -56
  16. package/lib/src/Builders/BaseBuilder/Validations.js.map +1 -1
  17. package/lib/src/Builders/BaseBuilder.d.ts +11 -11
  18. package/lib/src/Builders/BaseBuilder.js +16 -16
  19. package/lib/src/Builders/BaseBuilder.js.map +1 -1
  20. package/lib/src/Builders/ManagementBuilder.d.ts +104 -103
  21. package/lib/src/Builders/ManagementBuilder.js +207 -227
  22. package/lib/src/Builders/ManagementBuilder.js.map +1 -1
  23. package/lib/src/Builders/PayFacBuilder.d.ts +98 -96
  24. package/lib/src/Builders/PayFacBuilder.js +233 -184
  25. package/lib/src/Builders/PayFacBuilder.js.map +1 -1
  26. package/lib/src/Builders/RecurringBuilder.d.ts +13 -13
  27. package/lib/src/Builders/RecurringBuilder.js +33 -47
  28. package/lib/src/Builders/RecurringBuilder.js.map +1 -1
  29. package/lib/src/Builders/ReportBuilder.d.ts +8 -8
  30. package/lib/src/Builders/ReportBuilder.js +20 -36
  31. package/lib/src/Builders/ReportBuilder.js.map +1 -1
  32. package/lib/src/Builders/RequestBuilder/GpApi/AccessTokenRequest.d.ts +11 -0
  33. package/lib/src/Builders/RequestBuilder/GpApi/AccessTokenRequest.js +23 -0
  34. package/lib/src/Builders/RequestBuilder/GpApi/AccessTokenRequest.js.map +1 -0
  35. package/lib/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.d.ts +17 -0
  36. package/lib/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.js +36 -0
  37. package/lib/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.js.map +1 -0
  38. package/lib/src/Builders/RequestBuilder/GpApi/GpApiSessionInfo.d.ts +6 -0
  39. package/lib/src/Builders/RequestBuilder/GpApi/GpApiSessionInfo.js +49 -0
  40. package/lib/src/Builders/RequestBuilder/GpApi/GpApiSessionInfo.js.map +1 -0
  41. package/lib/src/Builders/RequestBuilder/GpApi/index.d.ts +3 -0
  42. package/lib/src/Builders/RequestBuilder/GpApi/index.js +20 -0
  43. package/lib/src/Builders/RequestBuilder/GpApi/index.js.map +1 -0
  44. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.d.ts +17 -22
  45. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.js +108 -159
  46. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.js.map +1 -1
  47. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomManagementRequestBuilder.d.ts +11 -0
  48. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomManagementRequestBuilder.js +83 -0
  49. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomManagementRequestBuilder.js.map +1 -0
  50. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.d.ts +9 -6
  51. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.js +65 -23
  52. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.js.map +1 -1
  53. package/lib/src/Builders/RequestBuilder/GpEcom/index.d.ts +3 -2
  54. package/lib/src/Builders/RequestBuilder/GpEcom/index.js +19 -14
  55. package/lib/src/Builders/RequestBuilder/GpEcom/index.js.map +1 -1
  56. package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.d.ts +7 -6
  57. package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.js +30 -29
  58. package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.js.map +1 -1
  59. package/lib/src/Builders/RequestBuilder/index.d.ts +3 -2
  60. package/lib/src/Builders/RequestBuilder/index.js +19 -14
  61. package/lib/src/Builders/RequestBuilder/index.js.map +1 -1
  62. package/lib/src/Builders/TransactionBuilder.d.ts +12 -10
  63. package/lib/src/Builders/TransactionBuilder.js +42 -46
  64. package/lib/src/Builders/TransactionBuilder.js.map +1 -1
  65. package/lib/src/Builders/TransactionReportBuilder.d.ts +15 -15
  66. package/lib/src/Builders/TransactionReportBuilder.js +64 -79
  67. package/lib/src/Builders/TransactionReportBuilder.js.map +1 -1
  68. package/lib/src/Builders/index.d.ts +8 -8
  69. package/lib/src/Builders/index.js +24 -20
  70. package/lib/src/Builders/index.js.map +1 -1
  71. package/lib/src/ConfiguredServices.d.ts +18 -22
  72. package/lib/src/ConfiguredServices.js +23 -56
  73. package/lib/src/ConfiguredServices.js.map +1 -1
  74. package/lib/src/Entities/Address.d.ts +13 -13
  75. package/lib/src/Entities/Address.js +20 -19
  76. package/lib/src/Entities/Address.js.map +1 -1
  77. package/lib/src/Entities/BatchSummary.d.ts +6 -6
  78. package/lib/src/Entities/BatchSummary.js +10 -9
  79. package/lib/src/Entities/BatchSummary.js.map +1 -1
  80. package/lib/src/Entities/Customer.d.ts +64 -64
  81. package/lib/src/Entities/Customer.js +79 -47
  82. package/lib/src/Entities/Customer.js.map +1 -1
  83. package/lib/src/Entities/CustomerDocument.d.ts +8 -0
  84. package/lib/src/Entities/CustomerDocument.js +16 -0
  85. package/lib/src/Entities/CustomerDocument.js.map +1 -0
  86. package/lib/src/Entities/DocumentUploadData.d.ts +13 -13
  87. package/lib/src/Entities/DocumentUploadData.js +80 -48
  88. package/lib/src/Entities/DocumentUploadData.js.map +1 -1
  89. package/lib/src/Entities/EcommerceInfo.d.ts +12 -12
  90. package/lib/src/Entities/EcommerceInfo.js +21 -14
  91. package/lib/src/Entities/EcommerceInfo.js.map +1 -1
  92. package/lib/src/Entities/EncryptionData.d.ts +6 -6
  93. package/lib/src/Entities/EncryptionData.js +10 -9
  94. package/lib/src/Entities/EncryptionData.js.map +1 -1
  95. package/lib/src/Entities/Enums.d.ts +428 -373
  96. package/lib/src/Entities/Enums.js +564 -497
  97. package/lib/src/Entities/Enums.js.map +1 -1
  98. package/lib/src/Entities/Errors.d.ts +23 -23
  99. package/lib/src/Entities/Errors.js +71 -106
  100. package/lib/src/Entities/Errors.js.map +1 -1
  101. package/lib/src/Entities/GpApi/AccessTokenInfo.d.ts +16 -0
  102. package/lib/src/Entities/GpApi/AccessTokenInfo.js +21 -0
  103. package/lib/src/Entities/GpApi/AccessTokenInfo.js.map +1 -0
  104. package/lib/src/Entities/GpApi/GpApiAccount.d.ts +5 -0
  105. package/lib/src/Entities/GpApi/GpApiAccount.js +13 -0
  106. package/lib/src/Entities/GpApi/GpApiAccount.js.map +1 -0
  107. package/lib/src/Entities/GpApi/GpApiRequest.d.ts +21 -0
  108. package/lib/src/Entities/GpApi/GpApiRequest.js +26 -0
  109. package/lib/src/Entities/GpApi/GpApiRequest.js.map +1 -0
  110. package/lib/src/Entities/GpApi/GpApiTokenResponse.d.ts +52 -0
  111. package/lib/src/Entities/GpApi/GpApiTokenResponse.js +115 -0
  112. package/lib/src/Entities/GpApi/GpApiTokenResponse.js.map +1 -0
  113. package/lib/src/Entities/GpApi/index.d.ts +4 -0
  114. package/lib/src/Entities/GpApi/index.js +21 -0
  115. package/lib/src/Entities/GpApi/index.js.map +1 -0
  116. package/lib/src/Entities/HostedPaymentData.d.ts +10 -10
  117. package/lib/src/Entities/HostedPaymentData.js +16 -10
  118. package/lib/src/Entities/HostedPaymentData.js.map +1 -1
  119. package/lib/src/Entities/IRequestBuilder.d.ts +6 -7
  120. package/lib/src/Entities/IRequestBuilder.js +2 -2
  121. package/lib/src/Entities/ProFac/AccountBalanceResponseData.d.ts +7 -7
  122. package/lib/src/Entities/ProFac/AccountBalanceResponseData.js +11 -9
  123. package/lib/src/Entities/ProFac/AccountBalanceResponseData.js.map +1 -1
  124. package/lib/src/Entities/ProFac/AccountPermissions.d.ts +15 -15
  125. package/lib/src/Entities/ProFac/AccountPermissions.js +18 -9
  126. package/lib/src/Entities/ProFac/AccountPermissions.js.map +1 -1
  127. package/lib/src/Entities/ProFac/BankAccountData.d.ts +10 -10
  128. package/lib/src/Entities/ProFac/BankAccountData.js +41 -9
  129. package/lib/src/Entities/ProFac/BankAccountData.js.map +1 -1
  130. package/lib/src/Entities/ProFac/BankAccountOwnershipData.d.ts +8 -8
  131. package/lib/src/Entities/ProFac/BankAccountOwnershipData.js +14 -11
  132. package/lib/src/Entities/ProFac/BankAccountOwnershipData.js.map +1 -1
  133. package/lib/src/Entities/ProFac/BeneficialOwnerData.d.ts +6 -6
  134. package/lib/src/Entities/ProFac/BeneficialOwnerData.js +11 -10
  135. package/lib/src/Entities/ProFac/BeneficialOwnerData.js.map +1 -1
  136. package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.d.ts +5 -5
  137. package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.js +9 -9
  138. package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.js.map +1 -1
  139. package/lib/src/Entities/ProFac/BusinessData.d.ts +15 -14
  140. package/lib/src/Entities/ProFac/BusinessData.js +49 -11
  141. package/lib/src/Entities/ProFac/BusinessData.js.map +1 -1
  142. package/lib/src/Entities/ProFac/DeviceAttributeInfo.d.ts +4 -4
  143. package/lib/src/Entities/ProFac/DeviceAttributeInfo.js +16 -9
  144. package/lib/src/Entities/ProFac/DeviceAttributeInfo.js.map +1 -1
  145. package/lib/src/Entities/ProFac/DeviceData.d.ts +5 -5
  146. package/lib/src/Entities/ProFac/DeviceData.js +10 -10
  147. package/lib/src/Entities/ProFac/DeviceData.js.map +1 -1
  148. package/lib/src/Entities/ProFac/DeviceInfo.d.ts +6 -6
  149. package/lib/src/Entities/ProFac/DeviceInfo.js +18 -9
  150. package/lib/src/Entities/ProFac/DeviceInfo.js.map +1 -1
  151. package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.d.ts +7 -7
  152. package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.js +14 -13
  153. package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.js.map +1 -1
  154. package/lib/src/Entities/ProFac/GrossBillingInformation.d.ts +8 -8
  155. package/lib/src/Entities/ProFac/GrossBillingInformation.js +9 -9
  156. package/lib/src/Entities/ProFac/GrossBillingInformation.js.map +1 -1
  157. package/lib/src/Entities/ProFac/OrderDevice.d.ts +18 -18
  158. package/lib/src/Entities/ProFac/OrderDevice.js +22 -9
  159. package/lib/src/Entities/ProFac/OrderDevice.js.map +1 -1
  160. package/lib/src/Entities/ProFac/OwnersData.d.ts +12 -12
  161. package/lib/src/Entities/ProFac/OwnersData.js +42 -11
  162. package/lib/src/Entities/ProFac/OwnersData.js.map +1 -1
  163. package/lib/src/Entities/ProFac/PayFacResponseData.d.ts +55 -55
  164. package/lib/src/Entities/ProFac/PayFacResponseData.js +61 -9
  165. package/lib/src/Entities/ProFac/PayFacResponseData.js.map +1 -1
  166. package/lib/src/Entities/ProFac/RenewAccountData.d.ts +10 -10
  167. package/lib/src/Entities/ProFac/RenewAccountData.js +37 -11
  168. package/lib/src/Entities/ProFac/RenewAccountData.js.map +1 -1
  169. package/lib/src/Entities/ProFac/SignificantOwnerData.d.ts +8 -8
  170. package/lib/src/Entities/ProFac/SignificantOwnerData.js +26 -11
  171. package/lib/src/Entities/ProFac/SignificantOwnerData.js.map +1 -1
  172. package/lib/src/Entities/ProFac/ThreatRiskData.d.ts +5 -5
  173. package/lib/src/Entities/ProFac/ThreatRiskData.js +18 -9
  174. package/lib/src/Entities/ProFac/ThreatRiskData.js.map +1 -1
  175. package/lib/src/Entities/ProFac/UserPersonalData.d.ts +26 -26
  176. package/lib/src/Entities/ProFac/UserPersonalData.js +81 -14
  177. package/lib/src/Entities/ProFac/UserPersonalData.js.map +1 -1
  178. package/lib/src/Entities/RecurringEntity.d.ts +14 -14
  179. package/lib/src/Entities/RecurringEntity.js +91 -86
  180. package/lib/src/Entities/RecurringEntity.js.map +1 -1
  181. package/lib/src/Entities/Request.d.ts +10 -9
  182. package/lib/src/Entities/Request.js +17 -14
  183. package/lib/src/Entities/Request.js.map +1 -1
  184. package/lib/src/Entities/SSORequestData.d.ts +5 -5
  185. package/lib/src/Entities/SSORequestData.js +18 -9
  186. package/lib/src/Entities/SSORequestData.js.map +1 -1
  187. package/lib/src/Entities/Schedule.d.ts +47 -47
  188. package/lib/src/Entities/Schedule.js +324 -253
  189. package/lib/src/Entities/Schedule.js.map +1 -1
  190. package/lib/src/Entities/ServiceEndpoints.d.ts +12 -4
  191. package/lib/src/Entities/ServiceEndpoints.js +16 -8
  192. package/lib/src/Entities/ServiceEndpoints.js.map +1 -1
  193. package/lib/src/Entities/Transaction.d.ts +78 -78
  194. package/lib/src/Entities/Transaction.js +126 -108
  195. package/lib/src/Entities/Transaction.js.map +1 -1
  196. package/lib/src/Entities/TransactionSummary.d.ts +61 -61
  197. package/lib/src/Entities/TransactionSummary.js +65 -9
  198. package/lib/src/Entities/TransactionSummary.js.map +1 -1
  199. package/lib/src/Entities/index.d.ts +17 -15
  200. package/lib/src/Entities/index.js +33 -27
  201. package/lib/src/Entities/index.js.map +1 -1
  202. package/lib/src/Gateways/Gateway.d.ts +12 -10
  203. package/lib/src/Gateways/Gateway.js +69 -42
  204. package/lib/src/Gateways/Gateway.js.map +1 -1
  205. package/lib/src/Gateways/GatewayResponse.d.ts +8 -0
  206. package/lib/src/Gateways/GatewayResponse.js +15 -0
  207. package/lib/src/Gateways/GatewayResponse.js.map +1 -0
  208. package/lib/src/Gateways/GpApiConnector.d.ts +41 -0
  209. package/lib/src/Gateways/GpApiConnector.js +218 -0
  210. package/lib/src/Gateways/GpApiConnector.js.map +1 -0
  211. package/lib/src/Gateways/GpEcomConnector.d.ts +36 -36
  212. package/lib/src/Gateways/GpEcomConnector.js +464 -556
  213. package/lib/src/Gateways/GpEcomConnector.js.map +1 -1
  214. package/lib/src/Gateways/IPayFacProvider.d.ts +5 -5
  215. package/lib/src/Gateways/IPayFacProvider.js +2 -2
  216. package/lib/src/Gateways/IPaymentGateway.d.ts +8 -8
  217. package/lib/src/Gateways/IPaymentGateway.js +2 -2
  218. package/lib/src/Gateways/IRecurringService.d.ts +6 -6
  219. package/lib/src/Gateways/IRecurringService.js +2 -2
  220. package/lib/src/Gateways/PayPlanConnector.d.ts +42 -42
  221. package/lib/src/Gateways/PayPlanConnector.js +531 -552
  222. package/lib/src/Gateways/PayPlanConnector.js.map +1 -1
  223. package/lib/src/Gateways/PorticoConnector.d.ts +48 -44
  224. package/lib/src/Gateways/PorticoConnector.js +1012 -1017
  225. package/lib/src/Gateways/PorticoConnector.js.map +1 -1
  226. package/lib/src/Gateways/ProPayConnector.d.ts +45 -41
  227. package/lib/src/Gateways/ProPayConnector.js +801 -694
  228. package/lib/src/Gateways/ProPayConnector.js.map +1 -1
  229. package/lib/src/Gateways/RestGateway.d.ts +8 -6
  230. package/lib/src/Gateways/RestGateway.js +48 -31
  231. package/lib/src/Gateways/RestGateway.js.map +1 -1
  232. package/lib/src/Gateways/XmlGateway.d.ts +5 -6
  233. package/lib/src/Gateways/XmlGateway.js +13 -37
  234. package/lib/src/Gateways/XmlGateway.js.map +1 -1
  235. package/lib/src/Gateways/https-wrapper.d.ts +3 -3
  236. package/lib/src/Gateways/https-wrapper.js +76 -35
  237. package/lib/src/Gateways/https-wrapper.js.map +1 -1
  238. package/lib/src/Gateways/index.d.ts +9 -8
  239. package/lib/src/Gateways/index.js +25 -20
  240. package/lib/src/Gateways/index.js.map +1 -1
  241. package/lib/src/HostedPaymentConfig.d.ts +12 -12
  242. package/lib/src/HostedPaymentConfig.js +15 -9
  243. package/lib/src/HostedPaymentConfig.js.map +1 -1
  244. package/lib/src/Mapping/GpApiMapping.d.ts +5 -0
  245. package/lib/src/Mapping/GpApiMapping.js +14 -0
  246. package/lib/src/Mapping/GpApiMapping.js.map +1 -0
  247. package/lib/src/Mapping/GpEcomMapping.d.ts +9 -9
  248. package/lib/src/Mapping/GpEcomMapping.js +84 -73
  249. package/lib/src/Mapping/GpEcomMapping.js.map +1 -1
  250. package/lib/src/Mapping/index.d.ts +2 -1
  251. package/lib/src/Mapping/index.js +18 -13
  252. package/lib/src/Mapping/index.js.map +1 -1
  253. package/lib/src/PaymentMethods/Cash.d.ts +8 -8
  254. package/lib/src/PaymentMethods/Cash.js +15 -36
  255. package/lib/src/PaymentMethods/Cash.js.map +1 -1
  256. package/lib/src/PaymentMethods/Credit.d.ts +85 -85
  257. package/lib/src/PaymentMethods/Credit.js +104 -106
  258. package/lib/src/PaymentMethods/Credit.js.map +1 -1
  259. package/lib/src/PaymentMethods/CreditCardData.d.ts +20 -20
  260. package/lib/src/PaymentMethods/CreditCardData.js +46 -57
  261. package/lib/src/PaymentMethods/CreditCardData.js.map +1 -1
  262. package/lib/src/PaymentMethods/CreditTrackData.d.ts +7 -7
  263. package/lib/src/PaymentMethods/CreditTrackData.js +9 -27
  264. package/lib/src/PaymentMethods/CreditTrackData.js.map +1 -1
  265. package/lib/src/PaymentMethods/Debit.d.ts +40 -40
  266. package/lib/src/PaymentMethods/Debit.js +51 -70
  267. package/lib/src/PaymentMethods/Debit.js.map +1 -1
  268. package/lib/src/PaymentMethods/DebitTrackData.d.ts +7 -7
  269. package/lib/src/PaymentMethods/DebitTrackData.js +9 -27
  270. package/lib/src/PaymentMethods/DebitTrackData.js.map +1 -1
  271. package/lib/src/PaymentMethods/EBT.d.ts +48 -48
  272. package/lib/src/PaymentMethods/EBT.js +67 -88
  273. package/lib/src/PaymentMethods/EBT.js.map +1 -1
  274. package/lib/src/PaymentMethods/EBTCardData.d.ts +16 -16
  275. package/lib/src/PaymentMethods/EBTCardData.js +24 -32
  276. package/lib/src/PaymentMethods/EBTCardData.js.map +1 -1
  277. package/lib/src/PaymentMethods/EBTTrackData.d.ts +8 -8
  278. package/lib/src/PaymentMethods/EBTTrackData.js +10 -27
  279. package/lib/src/PaymentMethods/EBTTrackData.js.map +1 -1
  280. package/lib/src/PaymentMethods/ECheck.d.ts +32 -32
  281. package/lib/src/PaymentMethods/ECheck.js +37 -40
  282. package/lib/src/PaymentMethods/ECheck.js.map +1 -1
  283. package/lib/src/PaymentMethods/GiftCard.d.ts +131 -131
  284. package/lib/src/PaymentMethods/GiftCard.js +188 -205
  285. package/lib/src/PaymentMethods/GiftCard.js.map +1 -1
  286. package/lib/src/PaymentMethods/Interfaces.d.ts +55 -55
  287. package/lib/src/PaymentMethods/Interfaces.js +2 -2
  288. package/lib/src/PaymentMethods/PaymentMethod.d.ts +19 -19
  289. package/lib/src/PaymentMethods/PaymentMethod.js +56 -114
  290. package/lib/src/PaymentMethods/PaymentMethod.js.map +1 -1
  291. package/lib/src/PaymentMethods/RecurringPaymentMethod.d.ts +23 -23
  292. package/lib/src/PaymentMethods/RecurringPaymentMethod.js +65 -77
  293. package/lib/src/PaymentMethods/RecurringPaymentMethod.js.map +1 -1
  294. package/lib/src/PaymentMethods/TransactionReference.d.ts +10 -10
  295. package/lib/src/PaymentMethods/TransactionReference.js +16 -12
  296. package/lib/src/PaymentMethods/TransactionReference.js.map +1 -1
  297. package/lib/src/PaymentMethods/index.d.ts +15 -15
  298. package/lib/src/PaymentMethods/index.js +31 -27
  299. package/lib/src/PaymentMethods/index.js.map +1 -1
  300. package/lib/src/ServiceConfigs/AcceptorConfig.d.ts +29 -41
  301. package/lib/src/ServiceConfigs/AcceptorConfig.js +42 -29
  302. package/lib/src/ServiceConfigs/AcceptorConfig.js.map +1 -1
  303. package/lib/src/ServiceConfigs/Configuration.d.ts +15 -15
  304. package/lib/src/ServiceConfigs/Configuration.js +19 -15
  305. package/lib/src/ServiceConfigs/Configuration.js.map +1 -1
  306. package/lib/src/ServiceConfigs/Gateways/GatewayConfig.d.ts +14 -14
  307. package/lib/src/ServiceConfigs/Gateways/GatewayConfig.js +29 -45
  308. package/lib/src/ServiceConfigs/Gateways/GatewayConfig.js.map +1 -1
  309. package/lib/src/ServiceConfigs/Gateways/GpApiConfig.d.ts +21 -0
  310. package/lib/src/ServiceConfigs/Gateways/GpApiConfig.js +44 -0
  311. package/lib/src/ServiceConfigs/Gateways/GpApiConfig.js.map +1 -0
  312. package/lib/src/ServiceConfigs/Gateways/GpEcomConfig.d.ts +21 -27
  313. package/lib/src/ServiceConfigs/Gateways/GpEcomConfig.js +49 -60
  314. package/lib/src/ServiceConfigs/Gateways/GpEcomConfig.js.map +1 -1
  315. package/lib/src/ServiceConfigs/Gateways/PorticoConfig.d.ts +22 -0
  316. package/lib/src/ServiceConfigs/Gateways/PorticoConfig.js +116 -0
  317. package/lib/src/ServiceConfigs/Gateways/PorticoConfig.js.map +1 -0
  318. package/lib/src/ServiceConfigs/Gateways/index.d.ts +4 -2
  319. package/lib/src/ServiceConfigs/Gateways/index.js +20 -14
  320. package/lib/src/ServiceConfigs/Gateways/index.js.map +1 -1
  321. package/lib/src/ServiceConfigs/ServicesConfigs.d.ts +6 -0
  322. package/lib/src/ServiceConfigs/ServicesConfigs.js +14 -0
  323. package/lib/src/ServiceConfigs/ServicesConfigs.js.map +1 -0
  324. package/lib/src/ServiceConfigs/index.d.ts +4 -5
  325. package/lib/src/ServiceConfigs/index.js +20 -17
  326. package/lib/src/ServiceConfigs/index.js.map +1 -1
  327. package/lib/src/Services/BatchService.d.ts +4 -4
  328. package/lib/src/Services/BatchService.js +14 -17
  329. package/lib/src/Services/BatchService.js.map +1 -1
  330. package/lib/src/Services/CheckService.d.ts +7 -6
  331. package/lib/src/Services/CheckService.js +19 -20
  332. package/lib/src/Services/CheckService.js.map +1 -1
  333. package/lib/src/Services/CreditService.d.ts +13 -12
  334. package/lib/src/Services/CreditService.js +53 -54
  335. package/lib/src/Services/CreditService.js.map +1 -1
  336. package/lib/src/Services/DebitService.d.ts +8 -7
  337. package/lib/src/Services/DebitService.js +27 -28
  338. package/lib/src/Services/DebitService.js.map +1 -1
  339. package/lib/src/Services/EBTService.d.ts +9 -8
  340. package/lib/src/Services/EBTService.js +30 -32
  341. package/lib/src/Services/EBTService.js.map +1 -1
  342. package/lib/src/Services/GiftService.d.ts +17 -16
  343. package/lib/src/Services/GiftService.js +53 -54
  344. package/lib/src/Services/GiftService.js.map +1 -1
  345. package/lib/src/Services/GpApiServices.d.ts +4 -0
  346. package/lib/src/Services/GpApiServices.js +44 -0
  347. package/lib/src/Services/GpApiServices.js.map +1 -0
  348. package/lib/src/Services/HostedService.d.ts +10 -9
  349. package/lib/src/Services/HostedService.js +58 -59
  350. package/lib/src/Services/HostedService.js.map +1 -1
  351. package/lib/src/Services/PayFacService.d.ts +26 -26
  352. package/lib/src/Services/PayFacService.js +75 -77
  353. package/lib/src/Services/PayFacService.js.map +1 -1
  354. package/lib/src/Services/RecurringService.d.ts +8 -8
  355. package/lib/src/Services/RecurringService.js +23 -27
  356. package/lib/src/Services/RecurringService.js.map +1 -1
  357. package/lib/src/Services/ReportingService.d.ts +6 -6
  358. package/lib/src/Services/ReportingService.js +17 -19
  359. package/lib/src/Services/ReportingService.js.map +1 -1
  360. package/lib/src/Services/index.d.ts +10 -9
  361. package/lib/src/Services/index.js +26 -21
  362. package/lib/src/Services/index.js.map +1 -1
  363. package/lib/src/ServicesContainer.d.ts +17 -26
  364. package/lib/src/ServicesContainer.js +57 -139
  365. package/lib/src/ServicesContainer.js.map +1 -1
  366. package/lib/src/Utils/GenerationUtils.d.ts +5 -5
  367. package/lib/src/Utils/GenerationUtils.js +33 -36
  368. package/lib/src/Utils/GenerationUtils.js.map +1 -1
  369. package/lib/src/Utils/InputValidation.d.ts +12 -12
  370. package/lib/src/Utils/InputValidation.js +70 -72
  371. package/lib/src/Utils/InputValidation.js.map +1 -1
  372. package/lib/src/Utils/Sha1.d.ts +6 -6
  373. package/lib/src/Utils/Sha1.js +230 -225
  374. package/lib/src/Utils/Sha1.js.map +1 -1
  375. package/lib/src/Utils/StringUtils.d.ts +6 -6
  376. package/lib/src/Utils/StringUtils.js +50 -53
  377. package/lib/src/Utils/StringUtils.js.map +1 -1
  378. package/lib/src/Utils/index.d.ts +2 -2
  379. package/lib/src/Utils/index.js +18 -14
  380. package/lib/src/Utils/index.js.map +1 -1
  381. package/lib/src/index.d.ts +12 -12
  382. package/lib/src/index.js +32 -28
  383. package/lib/src/index.js.map +1 -1
  384. package/lib/test/Data/BaseGpApiTestConfig.d.ts +13 -0
  385. package/lib/test/Data/BaseGpApiTestConfig.js +42 -0
  386. package/lib/test/Data/BaseGpApiTestConfig.js.map +1 -0
  387. package/lib/test/Data/TestCards.d.ts +24 -24
  388. package/lib/test/Data/TestCards.js +219 -232
  389. package/lib/test/Data/TestCards.js.map +1 -1
  390. package/lib/test/Data/TestChecks.d.ts +4 -4
  391. package/lib/test/Data/TestChecks.js +26 -32
  392. package/lib/test/Data/TestChecks.js.map +1 -1
  393. package/lib/test/Data/index.d.ts +2 -2
  394. package/lib/test/Data/index.js +18 -14
  395. package/lib/test/Data/index.js.map +1 -1
  396. package/lib/test/Integration/Gateways/{ProPayConnector/Certifications/GetInformationCertificationTests.d.ts → GpApiConnector/AccessTokenTest.d.ts} +1 -1
  397. package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.js +102 -0
  398. package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.js.map +1 -0
  399. package/lib/test/Integration/Gateways/{RealexConnector → GpEcomConnector}/Certification/AuthTest.d.ts +1 -1
  400. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.js +2446 -0
  401. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.js.map +1 -0
  402. package/lib/test/Integration/Gateways/{RealexConnector → GpEcomConnector}/Certification/AvsTest.d.ts +1 -1
  403. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.js +506 -0
  404. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.js.map +1 -0
  405. package/lib/test/Integration/Gateways/{RealexConnector → GpEcomConnector}/Certification/CreditTest.d.ts +1 -1
  406. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.js +1296 -0
  407. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.js.map +1 -0
  408. package/lib/test/Integration/Gateways/{RealexConnector → GpEcomConnector}/Certification/HoldTest.d.ts +1 -1
  409. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.js +847 -0
  410. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.js.map +1 -0
  411. package/lib/test/Integration/Gateways/{RealexConnector → GpEcomConnector}/CreditTest.d.ts +1 -1
  412. package/lib/test/Integration/Gateways/GpEcomConnector/CreditTest.js +214 -0
  413. package/lib/test/Integration/Gateways/GpEcomConnector/CreditTest.js.map +1 -0
  414. package/lib/test/Integration/Gateways/{RealexConnector → GpEcomConnector}/HppTest.d.ts +1 -1
  415. package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.js +98 -0
  416. package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.js.map +1 -0
  417. package/lib/test/Integration/Gateways/{RealexConnector → GpEcomConnector}/RecurringTest.d.ts +1 -1
  418. package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.js +132 -0
  419. package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.js.map +1 -0
  420. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.d.ts +1 -1
  421. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js +58 -112
  422. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js.map +1 -1
  423. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.d.ts +1 -1
  424. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js +377 -483
  425. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js.map +1 -1
  426. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.d.ts +1 -1
  427. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js +85 -83
  428. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js.map +1 -1
  429. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.d.ts +1 -1
  430. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js +1722 -1720
  431. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js.map +1 -1
  432. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.d.ts +1 -1
  433. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js +85 -83
  434. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js.map +1 -1
  435. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.d.ts +1 -1
  436. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js +1759 -1757
  437. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js.map +1 -1
  438. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.d.ts +1 -1
  439. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js +419 -682
  440. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js.map +1 -1
  441. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.d.ts +1 -1
  442. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js +2220 -2218
  443. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js.map +1 -1
  444. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.d.ts +1 -1
  445. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js +391 -707
  446. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js.map +1 -1
  447. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.d.ts +1 -1
  448. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js +81 -151
  449. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js.map +1 -1
  450. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.d.ts +1 -1
  451. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js +71 -171
  452. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js.map +1 -1
  453. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.d.ts +1 -1
  454. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js +110 -192
  455. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js.map +1 -1
  456. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.d.ts +1 -1
  457. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js +146 -377
  458. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js.map +1 -1
  459. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.d.ts +1 -1
  460. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js +100 -196
  461. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js.map +1 -1
  462. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.d.ts +1 -1
  463. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js +49 -47
  464. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js.map +1 -1
  465. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{ProPayAccountCertificationTests.d.ts → GetInformationCertificationTest.d.ts} +1 -1
  466. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.js +44 -0
  467. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.js.map +1 -0
  468. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{ProPayFundCertificationTests.d.ts → ProPayAccountCertificationTest.d.ts} +1 -1
  469. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.js +221 -0
  470. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.js.map +1 -0
  471. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/{ProPayInNetworkTransactionCertificationTests.d.ts → ProPayFundCertificationTest.d.ts} +1 -1
  472. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.js +60 -0
  473. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.js.map +1 -0
  474. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.d.ts +1 -0
  475. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.js +80 -0
  476. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.js.map +1 -0
  477. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.d.ts +39 -39
  478. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.js +392 -371
  479. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.js.map +1 -1
  480. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.d.ts +1 -0
  481. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.js +44 -0
  482. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.js.map +1 -0
  483. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.d.ts +1 -0
  484. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.js +330 -0
  485. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.js.map +1 -0
  486. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.d.ts +1 -0
  487. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.js +60 -0
  488. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.js.map +1 -0
  489. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.d.ts +1 -0
  490. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.js +80 -0
  491. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.js.map +1 -0
  492. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.d.ts +34 -33
  493. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.js +321 -268
  494. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.js.map +1 -1
  495. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.d.ts +4 -4
  496. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.js +27 -30
  497. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.js.map +1 -1
  498. package/lib/test/Integration/Services/CheckServiceTest.d.ts +1 -1
  499. package/lib/test/Integration/Services/CheckServiceTest.js +44 -98
  500. package/lib/test/Integration/Services/CheckServiceTest.js.map +1 -1
  501. package/lib/test/Integration/Services/CreditServiceTest.d.ts +1 -1
  502. package/lib/test/Integration/Services/CreditServiceTest.js +173 -313
  503. package/lib/test/Integration/Services/CreditServiceTest.js.map +1 -1
  504. package/lib/test/Integration/Services/DebitServiceTest.d.ts +1 -1
  505. package/lib/test/Integration/Services/DebitServiceTest.js +80 -154
  506. package/lib/test/Integration/Services/DebitServiceTest.js.map +1 -1
  507. package/lib/test/Integration/Services/EBTServiceTest.d.ts +1 -1
  508. package/lib/test/Integration/Services/EBTServiceTest.js +63 -135
  509. package/lib/test/Integration/Services/EBTServiceTest.js.map +1 -1
  510. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.d.ts +1 -1
  511. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js +110 -161
  512. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js.map +1 -1
  513. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.d.ts +1 -1
  514. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js +61 -139
  515. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js.map +1 -1
  516. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.d.ts +1 -1
  517. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js +33 -72
  518. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js.map +1 -1
  519. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.d.ts +1 -1
  520. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js +124 -202
  521. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js.map +1 -1
  522. package/package.json +65 -58
  523. package/tsconfig.eslint.json +15 -0
  524. package/lib/src/Gateways/RealexConnector.d.ts +0 -30
  525. package/lib/src/Gateways/RealexConnector.js +0 -524
  526. package/lib/src/Gateways/RealexConnector.js.map +0 -1
  527. package/lib/src/ServiceConfigs/ServicesConfig.d.ts +0 -27
  528. package/lib/src/ServiceConfigs/ServicesConfig.js +0 -51
  529. package/lib/src/ServiceConfigs/ServicesConfig.js.map +0 -1
  530. package/lib/src/ServiceConfigs/ServicesConfigsAdded.d.ts +0 -10
  531. package/lib/src/ServiceConfigs/ServicesConfigsAdded.js +0 -27
  532. package/lib/src/ServiceConfigs/ServicesConfigsAdded.js.map +0 -1
  533. package/lib/src/ServicesConfig.d.ts +0 -27
  534. package/lib/src/ServicesConfig.js +0 -51
  535. package/lib/src/ServicesConfig.js.map +0 -1
  536. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.js +0 -101
  537. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.js.map +0 -1
  538. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.js +0 -353
  539. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.js.map +0 -1
  540. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.js +0 -124
  541. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.js.map +0 -1
  542. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.js +0 -143
  543. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.js.map +0 -1
  544. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.d.ts +0 -1
  545. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.js +0 -101
  546. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.js.map +0 -1
  547. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.d.ts +0 -1
  548. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.js +0 -536
  549. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.js.map +0 -1
  550. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.d.ts +0 -1
  551. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.js +0 -125
  552. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.js.map +0 -1
  553. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.d.ts +0 -1
  554. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.js +0 -145
  555. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.js.map +0 -1
  556. package/lib/test/Integration/Gateways/RealexConnector/Certification/AuthTest.js +0 -4374
  557. package/lib/test/Integration/Gateways/RealexConnector/Certification/AuthTest.js.map +0 -1
  558. package/lib/test/Integration/Gateways/RealexConnector/Certification/AvsTest.js +0 -759
  559. package/lib/test/Integration/Gateways/RealexConnector/Certification/AvsTest.js.map +0 -1
  560. package/lib/test/Integration/Gateways/RealexConnector/Certification/CreditTest.js +0 -2400
  561. package/lib/test/Integration/Gateways/RealexConnector/Certification/CreditTest.js.map +0 -1
  562. package/lib/test/Integration/Gateways/RealexConnector/Certification/HoldTest.js +0 -1657
  563. package/lib/test/Integration/Gateways/RealexConnector/Certification/HoldTest.js.map +0 -1
  564. package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.d.ts +0 -1
  565. package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.js +0 -5651
  566. package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.js.map +0 -1
  567. package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.d.ts +0 -1
  568. package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.js +0 -1986
  569. package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.js.map +0 -1
  570. package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.d.ts +0 -1
  571. package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.js +0 -2370
  572. package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.js.map +0 -1
  573. package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.d.ts +0 -1
  574. package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.js +0 -1704
  575. package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.js.map +0 -1
  576. package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.d.ts +0 -1
  577. package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.js +0 -2054
  578. package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.js.map +0 -1
  579. package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.d.ts +0 -1
  580. package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.js +0 -2470
  581. package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.js.map +0 -1
  582. package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.d.ts +0 -1
  583. package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.js +0 -3117
  584. package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.js.map +0 -1
  585. package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.d.ts +0 -1
  586. package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.js +0 -2032
  587. package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.js.map +0 -1
  588. package/lib/test/Integration/Gateways/RealexConnector/CreditTest.js +0 -323
  589. package/lib/test/Integration/Gateways/RealexConnector/CreditTest.js.map +0 -1
  590. package/lib/test/Integration/Gateways/RealexConnector/HppTest.js +0 -99
  591. package/lib/test/Integration/Gateways/RealexConnector/HppTest.js.map +0 -1
  592. package/lib/test/Integration/Gateways/RealexConnector/RecurringTest.js +0 -264
  593. package/lib/test/Integration/Gateways/RealexConnector/RecurringTest.js.map +0 -1
  594. package/lib/test/Unit/Gateways/RealexConnector/CreditTest.d.ts +0 -1
  595. package/lib/test/Unit/Gateways/RealexConnector/CreditTest.js +0 -71
  596. package/lib/test/Unit/Gateways/RealexConnector/CreditTest.js.map +0 -1
@@ -1,4374 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- var ava_1 = require("ava");
40
- var src_1 = require("../../../../../src/");
41
- var throttle = function () { return new Promise(function (resolve) { return setTimeout(resolve, 1500); }); };
42
- ava_1.default.beforeEach(function () { return __awaiter(void 0, void 0, void 0, function () {
43
- return __generator(this, function (_a) {
44
- switch (_a.label) {
45
- case 0: return [4 /*yield*/, throttle()];
46
- case 1:
47
- _a.sent();
48
- return [2 /*return*/];
49
- }
50
- });
51
- }); });
52
- ava_1.default("JAVA_Auth_006a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
53
- var config, card, response;
54
- return __generator(this, function (_a) {
55
- switch (_a.label) {
56
- case 0:
57
- t.plan(2);
58
- config = new src_1.ServicesConfig();
59
- config.merchantId = "heartlandgpsandbox";
60
- config.accountId = "api";
61
- config.sharedSecret = "secret";
62
- config.refundPassword = "refund";
63
- config.rebatePassword = "rebate";
64
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
65
- config.timeout = 20000;
66
- src_1.ServicesContainer.configure(config);
67
- card = new src_1.CreditCardData();
68
- card.number = "4263970000005262";
69
- card.expMonth = "12";
70
- card.expYear = "2020";
71
- card.cvn = "123";
72
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
73
- card.cardHolderName = "James Mason";
74
- return [4 /*yield*/, card
75
- .charge(100.01)
76
- .withCurrency("GBP")
77
- .withDescription("JAVA-Auth-006a")
78
- .execute()];
79
- case 1:
80
- response = _a.sent();
81
- t.truthy(response);
82
- t.is("00", response.responseCode);
83
- return [2 /*return*/];
84
- }
85
- });
86
- }); });
87
- ava_1.default("JAVA_Auth_006b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
88
- var config, card, response;
89
- return __generator(this, function (_a) {
90
- switch (_a.label) {
91
- case 0:
92
- t.plan(2);
93
- config = new src_1.ServicesConfig();
94
- config.merchantId = "heartlandgpsandbox";
95
- config.accountId = "api";
96
- config.sharedSecret = "secret";
97
- config.refundPassword = "refund";
98
- config.rebatePassword = "rebate";
99
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
100
- config.timeout = 20000;
101
- src_1.ServicesContainer.configure(config);
102
- card = new src_1.CreditCardData();
103
- card.number = "4263970000005262";
104
- card.expMonth = "12";
105
- card.expYear = "2020";
106
- card.cvn = "123";
107
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
108
- card.cardHolderName = "James Mason";
109
- return [4 /*yield*/, card
110
- .charge(100.01)
111
- .withCurrency("EUR")
112
- .withDescription("JAVA-Auth-006b")
113
- .execute()];
114
- case 1:
115
- response = _a.sent();
116
- t.truthy(response);
117
- t.is("00", response.responseCode);
118
- return [2 /*return*/];
119
- }
120
- });
121
- }); });
122
- ava_1.default("JAVA_Auth_006c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
123
- var config, card, response;
124
- return __generator(this, function (_a) {
125
- switch (_a.label) {
126
- case 0:
127
- t.plan(2);
128
- config = new src_1.ServicesConfig();
129
- config.merchantId = "heartlandgpsandbox";
130
- config.accountId = "api";
131
- config.sharedSecret = "secret";
132
- config.refundPassword = "refund";
133
- config.rebatePassword = "rebate";
134
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
135
- config.timeout = 20000;
136
- src_1.ServicesContainer.configure(config);
137
- card = new src_1.CreditCardData();
138
- card.number = "4263970000005262";
139
- card.expMonth = "12";
140
- card.expYear = "2020";
141
- card.cvn = "123";
142
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
143
- card.cardHolderName = "James Mason";
144
- return [4 /*yield*/, card
145
- .charge(100.01)
146
- .withCurrency("USD")
147
- .withDescription("JAVA-Auth-006c")
148
- .execute()];
149
- case 1:
150
- response = _a.sent();
151
- t.truthy(response);
152
- t.is("00", response.responseCode);
153
- return [2 /*return*/];
154
- }
155
- });
156
- }); });
157
- ava_1.default("JAVA_Auth_006d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
158
- var config, card, response;
159
- return __generator(this, function (_a) {
160
- switch (_a.label) {
161
- case 0:
162
- t.plan(2);
163
- config = new src_1.ServicesConfig();
164
- config.merchantId = "heartlandgpsandbox";
165
- config.accountId = "api";
166
- config.sharedSecret = "secret";
167
- config.refundPassword = "refund";
168
- config.rebatePassword = "rebate";
169
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
170
- config.timeout = 20000;
171
- src_1.ServicesContainer.configure(config);
172
- card = new src_1.CreditCardData();
173
- card.number = "4263970000005262";
174
- card.expMonth = "12";
175
- card.expYear = "2020";
176
- card.cvn = "123";
177
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
178
- card.cardHolderName = "James Mason";
179
- return [4 /*yield*/, card
180
- .charge(100.01)
181
- .withCurrency("GBP")
182
- .withDescription("JAVA-Auth-006d")
183
- .execute()];
184
- case 1:
185
- response = _a.sent();
186
- t.truthy(response);
187
- t.is("00", response.responseCode);
188
- return [2 /*return*/];
189
- }
190
- });
191
- }); });
192
- ava_1.default("JAVA_Auth_006e", function (t) { return __awaiter(void 0, void 0, void 0, function () {
193
- var config, card, response;
194
- return __generator(this, function (_a) {
195
- switch (_a.label) {
196
- case 0:
197
- t.plan(2);
198
- config = new src_1.ServicesConfig();
199
- config.merchantId = "heartlandgpsandbox";
200
- config.accountId = "api";
201
- config.sharedSecret = "secret";
202
- config.refundPassword = "refund";
203
- config.rebatePassword = "rebate";
204
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
205
- config.timeout = 20000;
206
- src_1.ServicesContainer.configure(config);
207
- card = new src_1.CreditCardData();
208
- card.number = "4263970000005262";
209
- card.expMonth = "12";
210
- card.expYear = "2020";
211
- card.cvn = "123";
212
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
213
- card.cardHolderName = "James Mason";
214
- return [4 /*yield*/, card
215
- .charge(100.01)
216
- .withCurrency("EUR")
217
- .withDescription("JAVA-Auth-006e")
218
- .execute()];
219
- case 1:
220
- response = _a.sent();
221
- t.truthy(response);
222
- t.is("00", response.responseCode);
223
- return [2 /*return*/];
224
- }
225
- });
226
- }); });
227
- ava_1.default("JAVA_Auth_006f", function (t) { return __awaiter(void 0, void 0, void 0, function () {
228
- var config, card, response;
229
- return __generator(this, function (_a) {
230
- switch (_a.label) {
231
- case 0:
232
- t.plan(2);
233
- config = new src_1.ServicesConfig();
234
- config.merchantId = "heartlandgpsandbox";
235
- config.accountId = "api";
236
- config.sharedSecret = "secret";
237
- config.refundPassword = "refund";
238
- config.rebatePassword = "rebate";
239
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
240
- config.timeout = 20000;
241
- src_1.ServicesContainer.configure(config);
242
- card = new src_1.CreditCardData();
243
- card.number = "4263970000005262";
244
- card.expMonth = "12";
245
- card.expYear = "2020";
246
- card.cvn = "123";
247
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
248
- card.cardHolderName = "James Mason";
249
- return [4 /*yield*/, card
250
- .charge(100.01)
251
- .withCurrency("USD")
252
- .withDescription("JAVA-Auth-006f")
253
- .execute()];
254
- case 1:
255
- response = _a.sent();
256
- t.truthy(response);
257
- t.is("00", response.responseCode);
258
- return [2 /*return*/];
259
- }
260
- });
261
- }); });
262
- ava_1.default("JAVA_Auth_006g", function (t) { return __awaiter(void 0, void 0, void 0, function () {
263
- var config, card, response;
264
- return __generator(this, function (_a) {
265
- switch (_a.label) {
266
- case 0:
267
- t.plan(2);
268
- config = new src_1.ServicesConfig();
269
- config.merchantId = "heartlandgpsandbox";
270
- config.accountId = "api";
271
- config.sharedSecret = "secret";
272
- config.refundPassword = "refund";
273
- config.rebatePassword = "rebate";
274
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
275
- config.timeout = 20000;
276
- src_1.ServicesContainer.configure(config);
277
- card = new src_1.CreditCardData();
278
- card.number = "4263970000005262";
279
- card.expMonth = "12";
280
- card.expYear = "2020";
281
- card.cvn = "123";
282
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
283
- card.cardHolderName = "James Mason";
284
- return [4 /*yield*/, card
285
- .charge(100.01)
286
- .withCurrency("GBP")
287
- .withDescription("JAVA-Auth-006g")
288
- .execute()];
289
- case 1:
290
- response = _a.sent();
291
- t.truthy(response);
292
- t.is("00", response.responseCode);
293
- return [2 /*return*/];
294
- }
295
- });
296
- }); });
297
- ava_1.default("JAVA_Auth_006h", function (t) { return __awaiter(void 0, void 0, void 0, function () {
298
- var config, card, response;
299
- return __generator(this, function (_a) {
300
- switch (_a.label) {
301
- case 0:
302
- t.plan(2);
303
- config = new src_1.ServicesConfig();
304
- config.merchantId = "heartlandgpsandbox";
305
- config.accountId = "api";
306
- config.sharedSecret = "secret";
307
- config.refundPassword = "refund";
308
- config.rebatePassword = "rebate";
309
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
310
- config.timeout = 20000;
311
- src_1.ServicesContainer.configure(config);
312
- card = new src_1.CreditCardData();
313
- card.number = "4263970000005262";
314
- card.expMonth = "12";
315
- card.expYear = "2020";
316
- card.cvn = "123";
317
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
318
- card.cardHolderName = "James Mason";
319
- return [4 /*yield*/, card
320
- .charge(100.01)
321
- .withCurrency("EUR")
322
- .withDescription("JAVA-Auth-006h")
323
- .execute()];
324
- case 1:
325
- response = _a.sent();
326
- t.truthy(response);
327
- t.is("00", response.responseCode);
328
- return [2 /*return*/];
329
- }
330
- });
331
- }); });
332
- ava_1.default("JAVA_Auth_006i", function (t) { return __awaiter(void 0, void 0, void 0, function () {
333
- var config, card, response;
334
- return __generator(this, function (_a) {
335
- switch (_a.label) {
336
- case 0:
337
- t.plan(2);
338
- config = new src_1.ServicesConfig();
339
- config.merchantId = "heartlandgpsandbox";
340
- config.accountId = "api";
341
- config.sharedSecret = "secret";
342
- config.refundPassword = "refund";
343
- config.rebatePassword = "rebate";
344
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
345
- config.timeout = 20000;
346
- src_1.ServicesContainer.configure(config);
347
- card = new src_1.CreditCardData();
348
- card.number = "4263970000005262";
349
- card.expMonth = "12";
350
- card.expYear = "2020";
351
- card.cvn = "123";
352
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
353
- card.cardHolderName = "James Mason";
354
- return [4 /*yield*/, card
355
- .charge(100.01)
356
- .withCurrency("USD")
357
- .withDescription("JAVA-Auth-006i")
358
- .execute()];
359
- case 1:
360
- response = _a.sent();
361
- t.truthy(response);
362
- t.is("00", response.responseCode);
363
- return [2 /*return*/];
364
- }
365
- });
366
- }); });
367
- ava_1.default("JAVA_Auth_006j", function (t) { return __awaiter(void 0, void 0, void 0, function () {
368
- var config, card, response;
369
- return __generator(this, function (_a) {
370
- switch (_a.label) {
371
- case 0:
372
- t.plan(2);
373
- config = new src_1.ServicesConfig();
374
- config.merchantId = "heartlandgpsandbox";
375
- config.accountId = "api";
376
- config.sharedSecret = "secret";
377
- config.refundPassword = "refund";
378
- config.rebatePassword = "rebate";
379
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
380
- config.timeout = 20000;
381
- src_1.ServicesContainer.configure(config);
382
- card = new src_1.CreditCardData();
383
- card.number = "4263970000005262";
384
- card.expMonth = "12";
385
- card.expYear = "2020";
386
- card.cvn = "123";
387
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
388
- card.cardHolderName = "James Mason";
389
- return [4 /*yield*/, card
390
- .charge(100.01)
391
- .withCurrency("GBP")
392
- .withDescription("JAVA-Auth-006j")
393
- .execute()];
394
- case 1:
395
- response = _a.sent();
396
- t.truthy(response);
397
- t.is("00", response.responseCode);
398
- return [2 /*return*/];
399
- }
400
- });
401
- }); });
402
- ava_1.default("JAVA_Auth_006k", function (t) { return __awaiter(void 0, void 0, void 0, function () {
403
- var config, card, response;
404
- return __generator(this, function (_a) {
405
- switch (_a.label) {
406
- case 0:
407
- t.plan(2);
408
- config = new src_1.ServicesConfig();
409
- config.merchantId = "heartlandgpsandbox";
410
- config.accountId = "api";
411
- config.sharedSecret = "secret";
412
- config.refundPassword = "refund";
413
- config.rebatePassword = "rebate";
414
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
415
- config.timeout = 20000;
416
- src_1.ServicesContainer.configure(config);
417
- card = new src_1.CreditCardData();
418
- card.number = "4263970000005262";
419
- card.expMonth = "12";
420
- card.expYear = "2020";
421
- card.cvn = "123";
422
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
423
- card.cardHolderName = "James Mason";
424
- return [4 /*yield*/, card
425
- .charge(100.01)
426
- .withCurrency("EUR")
427
- .withDescription("JAVA-Auth-006k")
428
- .execute()];
429
- case 1:
430
- response = _a.sent();
431
- t.truthy(response);
432
- t.is("00", response.responseCode);
433
- return [2 /*return*/];
434
- }
435
- });
436
- }); });
437
- ava_1.default("JAVA_Auth_007a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
438
- var config, card, response;
439
- return __generator(this, function (_a) {
440
- switch (_a.label) {
441
- case 0:
442
- t.plan(2);
443
- config = new src_1.ServicesConfig();
444
- config.merchantId = "heartlandgpsandbox";
445
- config.accountId = "api";
446
- config.sharedSecret = "secret";
447
- config.refundPassword = "refund";
448
- config.rebatePassword = "rebate";
449
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
450
- config.timeout = 20000;
451
- src_1.ServicesContainer.configure(config);
452
- card = new src_1.CreditCardData();
453
- card.number = "4263970000005262";
454
- card.expMonth = "12";
455
- card.expYear = "2020";
456
- card.cvn = "123";
457
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
458
- card.cardHolderName = "James Mason";
459
- return [4 /*yield*/, card
460
- .charge(100.01)
461
- .withCurrency("GBP")
462
- .withDescription("JAVA-Auth-007a")
463
- .execute()];
464
- case 1:
465
- response = _a.sent();
466
- t.truthy(response);
467
- t.is("00", response.responseCode);
468
- return [2 /*return*/];
469
- }
470
- });
471
- }); });
472
- ava_1.default("JAVA_Auth_007b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
473
- var config, card, response;
474
- return __generator(this, function (_a) {
475
- switch (_a.label) {
476
- case 0:
477
- t.plan(2);
478
- config = new src_1.ServicesConfig();
479
- config.merchantId = "heartlandgpsandbox";
480
- config.accountId = "api";
481
- config.sharedSecret = "secret";
482
- config.refundPassword = "refund";
483
- config.rebatePassword = "rebate";
484
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
485
- config.timeout = 20000;
486
- src_1.ServicesContainer.configure(config);
487
- card = new src_1.CreditCardData();
488
- card.number = "4263970000005262";
489
- card.expMonth = "12";
490
- card.expYear = "2020";
491
- card.cvn = "123";
492
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
493
- card.cardHolderName = "James Mason";
494
- return [4 /*yield*/, card
495
- .charge(100.01)
496
- .withCurrency("EUR")
497
- .withDescription("JAVA-Auth-007b")
498
- .execute()];
499
- case 1:
500
- response = _a.sent();
501
- t.truthy(response);
502
- t.is("00", response.responseCode);
503
- return [2 /*return*/];
504
- }
505
- });
506
- }); });
507
- ava_1.default("JAVA_Auth_007c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
508
- var config, card, response;
509
- return __generator(this, function (_a) {
510
- switch (_a.label) {
511
- case 0:
512
- t.plan(2);
513
- config = new src_1.ServicesConfig();
514
- config.merchantId = "heartlandgpsandbox";
515
- config.accountId = "api";
516
- config.sharedSecret = "secret";
517
- config.refundPassword = "refund";
518
- config.rebatePassword = "rebate";
519
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
520
- config.timeout = 20000;
521
- src_1.ServicesContainer.configure(config);
522
- card = new src_1.CreditCardData();
523
- card.number = "4263970000005262";
524
- card.expMonth = "12";
525
- card.expYear = "2020";
526
- card.cvn = "123";
527
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
528
- card.cardHolderName = "James Mason";
529
- return [4 /*yield*/, card
530
- .charge(100.01)
531
- .withCurrency("USD")
532
- .withDescription("JAVA-Auth-007c")
533
- .execute()];
534
- case 1:
535
- response = _a.sent();
536
- t.truthy(response);
537
- t.is("00", response.responseCode);
538
- return [2 /*return*/];
539
- }
540
- });
541
- }); });
542
- ava_1.default("JAVA_Auth_007d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
543
- var config, card, response;
544
- return __generator(this, function (_a) {
545
- switch (_a.label) {
546
- case 0:
547
- t.plan(2);
548
- config = new src_1.ServicesConfig();
549
- config.merchantId = "heartlandgpsandbox";
550
- config.accountId = "api";
551
- config.sharedSecret = "secret";
552
- config.refundPassword = "refund";
553
- config.rebatePassword = "rebate";
554
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
555
- config.timeout = 20000;
556
- src_1.ServicesContainer.configure(config);
557
- card = new src_1.CreditCardData();
558
- card.number = "4263970000005262";
559
- card.expMonth = "12";
560
- card.expYear = "2020";
561
- card.cvn = "123";
562
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
563
- card.cardHolderName = "James Mason";
564
- return [4 /*yield*/, card
565
- .charge(100.01)
566
- .withCurrency("GBP")
567
- .withDescription("JAVA-Auth-007d")
568
- .execute()];
569
- case 1:
570
- response = _a.sent();
571
- t.truthy(response);
572
- t.is("00", response.responseCode);
573
- return [2 /*return*/];
574
- }
575
- });
576
- }); });
577
- ava_1.default("JAVA_Auth_007e", function (t) { return __awaiter(void 0, void 0, void 0, function () {
578
- var config, card, response;
579
- return __generator(this, function (_a) {
580
- switch (_a.label) {
581
- case 0:
582
- t.plan(2);
583
- config = new src_1.ServicesConfig();
584
- config.merchantId = "heartlandgpsandbox";
585
- config.accountId = "api";
586
- config.sharedSecret = "secret";
587
- config.refundPassword = "refund";
588
- config.rebatePassword = "rebate";
589
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
590
- config.timeout = 20000;
591
- src_1.ServicesContainer.configure(config);
592
- card = new src_1.CreditCardData();
593
- card.number = "4263970000005262";
594
- card.expMonth = "12";
595
- card.expYear = "2020";
596
- card.cvn = "123";
597
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
598
- card.cardHolderName = "James Mason";
599
- return [4 /*yield*/, card
600
- .charge(100.01)
601
- .withCurrency("EUR")
602
- .withDescription("JAVA-Auth-007e")
603
- .execute()];
604
- case 1:
605
- response = _a.sent();
606
- t.truthy(response);
607
- t.is("00", response.responseCode);
608
- return [2 /*return*/];
609
- }
610
- });
611
- }); });
612
- ava_1.default("JAVA_Auth_008a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
613
- var config, card, response;
614
- return __generator(this, function (_a) {
615
- switch (_a.label) {
616
- case 0:
617
- t.plan(2);
618
- config = new src_1.ServicesConfig();
619
- config.merchantId = "heartlandgpsandbox";
620
- config.accountId = "api";
621
- config.sharedSecret = "secret";
622
- config.refundPassword = "refund";
623
- config.rebatePassword = "rebate";
624
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
625
- config.timeout = 20000;
626
- src_1.ServicesContainer.configure(config);
627
- card = new src_1.CreditCardData();
628
- card.number = "4263970000005262";
629
- card.expMonth = "12";
630
- card.expYear = "2020";
631
- card.cvn = "123";
632
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
633
- card.cardHolderName = "James Mason";
634
- return [4 /*yield*/, card
635
- .charge(100.01)
636
- .withCurrency("USD")
637
- .withDescription("JAVA-Auth-008a")
638
- .execute()];
639
- case 1:
640
- response = _a.sent();
641
- t.truthy(response);
642
- t.is("00", response.responseCode);
643
- return [2 /*return*/];
644
- }
645
- });
646
- }); });
647
- ava_1.default("JAVA_Auth_008b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
648
- var config, card, response;
649
- return __generator(this, function (_a) {
650
- switch (_a.label) {
651
- case 0:
652
- t.plan(2);
653
- config = new src_1.ServicesConfig();
654
- config.merchantId = "heartlandgpsandbox";
655
- config.accountId = "api";
656
- config.sharedSecret = "secret";
657
- config.refundPassword = "refund";
658
- config.rebatePassword = "rebate";
659
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
660
- config.timeout = 20000;
661
- src_1.ServicesContainer.configure(config);
662
- card = new src_1.CreditCardData();
663
- card.number = "4263970000005262";
664
- card.expMonth = "12";
665
- card.expYear = "2020";
666
- card.cvn = "123";
667
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
668
- card.cardHolderName = "James Mason";
669
- return [4 /*yield*/, card
670
- .charge(100.01)
671
- .withCurrency("GBP")
672
- .withDescription("JAVA-Auth-008b")
673
- .execute()];
674
- case 1:
675
- response = _a.sent();
676
- t.truthy(response);
677
- t.is("00", response.responseCode);
678
- return [2 /*return*/];
679
- }
680
- });
681
- }); });
682
- ava_1.default("JAVA_Auth_008c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
683
- var config, card, response;
684
- return __generator(this, function (_a) {
685
- switch (_a.label) {
686
- case 0:
687
- t.plan(2);
688
- config = new src_1.ServicesConfig();
689
- config.merchantId = "heartlandgpsandbox";
690
- config.accountId = "api";
691
- config.sharedSecret = "secret";
692
- config.refundPassword = "refund";
693
- config.rebatePassword = "rebate";
694
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
695
- config.timeout = 20000;
696
- src_1.ServicesContainer.configure(config);
697
- card = new src_1.CreditCardData();
698
- card.number = "4263970000005262";
699
- card.expMonth = "12";
700
- card.expYear = "2020";
701
- card.cvn = "123";
702
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
703
- card.cardHolderName = "James Mason";
704
- return [4 /*yield*/, card
705
- .charge(100.01)
706
- .withCurrency("EUR")
707
- .withDescription("JAVA-Auth-008c")
708
- .execute()];
709
- case 1:
710
- response = _a.sent();
711
- t.truthy(response);
712
- t.is("00", response.responseCode);
713
- return [2 /*return*/];
714
- }
715
- });
716
- }); });
717
- ava_1.default("JAVA_Auth_008d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
718
- var config, card, response;
719
- return __generator(this, function (_a) {
720
- switch (_a.label) {
721
- case 0:
722
- t.plan(2);
723
- config = new src_1.ServicesConfig();
724
- config.merchantId = "heartlandgpsandbox";
725
- config.accountId = "api";
726
- config.sharedSecret = "secret";
727
- config.refundPassword = "refund";
728
- config.rebatePassword = "rebate";
729
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
730
- config.timeout = 20000;
731
- src_1.ServicesContainer.configure(config);
732
- card = new src_1.CreditCardData();
733
- card.number = "4263970000005262";
734
- card.expMonth = "12";
735
- card.expYear = "2020";
736
- card.cvn = "123";
737
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
738
- card.cardHolderName = "James Mason";
739
- return [4 /*yield*/, card
740
- .charge(100.01)
741
- .withCurrency("USD")
742
- .withDescription("JAVA-Auth-008d")
743
- .execute()];
744
- case 1:
745
- response = _a.sent();
746
- t.truthy(response);
747
- t.is("00", response.responseCode);
748
- return [2 /*return*/];
749
- }
750
- });
751
- }); });
752
- ava_1.default("JAVA_Auth_008e", function (t) { return __awaiter(void 0, void 0, void 0, function () {
753
- var config, card, response;
754
- return __generator(this, function (_a) {
755
- switch (_a.label) {
756
- case 0:
757
- t.plan(2);
758
- config = new src_1.ServicesConfig();
759
- config.merchantId = "heartlandgpsandbox";
760
- config.accountId = "api";
761
- config.sharedSecret = "secret";
762
- config.refundPassword = "refund";
763
- config.rebatePassword = "rebate";
764
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
765
- config.timeout = 20000;
766
- src_1.ServicesContainer.configure(config);
767
- card = new src_1.CreditCardData();
768
- card.number = "4263970000005262";
769
- card.expMonth = "12";
770
- card.expYear = "2020";
771
- card.cvn = "123";
772
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
773
- card.cardHolderName = "James Mason";
774
- return [4 /*yield*/, card
775
- .charge(100.01)
776
- .withCurrency("GBP")
777
- .withDescription("JAVA-Auth-008e")
778
- .execute()];
779
- case 1:
780
- response = _a.sent();
781
- t.truthy(response);
782
- t.is("00", response.responseCode);
783
- return [2 /*return*/];
784
- }
785
- });
786
- }); });
787
- ava_1.default("JAVA_Auth_009a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
788
- var config, card, response;
789
- return __generator(this, function (_a) {
790
- switch (_a.label) {
791
- case 0:
792
- t.plan(2);
793
- config = new src_1.ServicesConfig();
794
- config.merchantId = "heartlandgpsandbox";
795
- config.accountId = "api";
796
- config.sharedSecret = "secret";
797
- config.refundPassword = "refund";
798
- config.rebatePassword = "rebate";
799
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
800
- config.timeout = 20000;
801
- config.channel = "ECOM";
802
- src_1.ServicesContainer.configure(config);
803
- card = new src_1.CreditCardData();
804
- card.number = "4263970000005262";
805
- card.expMonth = "12";
806
- card.expYear = "2020";
807
- card.cvn = "123";
808
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
809
- card.cardHolderName = "James Mason";
810
- return [4 /*yield*/, card
811
- .charge(100.01)
812
- .withCurrency("EUR")
813
- .withDescription("JAVA-Auth-009a")
814
- .execute()];
815
- case 1:
816
- response = _a.sent();
817
- t.truthy(response);
818
- t.is("00", response.responseCode);
819
- return [2 /*return*/];
820
- }
821
- });
822
- }); });
823
- ava_1.default("JAVA_Auth_009b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
824
- var config, card, error;
825
- return __generator(this, function (_a) {
826
- switch (_a.label) {
827
- case 0:
828
- t.plan(2);
829
- config = new src_1.ServicesConfig();
830
- config.merchantId = "heartlandgpsandbox";
831
- config.accountId = "api";
832
- config.sharedSecret = "secret";
833
- config.refundPassword = "refund";
834
- config.rebatePassword = "rebate";
835
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
836
- config.timeout = 20000;
837
- config.channel = "E";
838
- src_1.ServicesContainer.configure(config);
839
- card = new src_1.CreditCardData();
840
- card.number = "4263970000005262";
841
- card.expMonth = "12";
842
- card.expYear = "2020";
843
- card.cvn = "123";
844
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
845
- card.cardHolderName = "James Mason";
846
- return [4 /*yield*/, t.throws(card
847
- .charge(100.01)
848
- .withCurrency("USD")
849
- .withDescription("JAVA-Auth-009b")
850
- .execute(), src_1.GatewayError)];
851
- case 1:
852
- error = _a.sent();
853
- t.truthy(error.message);
854
- return [2 /*return*/];
855
- }
856
- });
857
- }); });
858
- ava_1.default("JAVA_Auth_009c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
859
- var config, card, error;
860
- return __generator(this, function (_a) {
861
- switch (_a.label) {
862
- case 0:
863
- t.plan(2);
864
- config = new src_1.ServicesConfig();
865
- config.merchantId = "heartlandgpsandbox";
866
- config.accountId = "api";
867
- config.sharedSecret = "secret";
868
- config.refundPassword = "refund";
869
- config.rebatePassword = "rebate";
870
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
871
- config.timeout = 20000;
872
- config.channel = "ECOMMERCE";
873
- src_1.ServicesContainer.configure(config);
874
- card = new src_1.CreditCardData();
875
- card.number = "4263970000005262";
876
- card.expMonth = "12";
877
- card.expYear = "2020";
878
- card.cvn = "123";
879
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
880
- card.cardHolderName = "James Mason";
881
- return [4 /*yield*/, t.throws(card
882
- .charge(100.01)
883
- .withCurrency("GBP")
884
- .withDescription("JAVA-Auth-009c")
885
- .execute(), src_1.GatewayError)];
886
- case 1:
887
- error = _a.sent();
888
- t.truthy(error.message);
889
- return [2 /*return*/];
890
- }
891
- });
892
- }); });
893
- ava_1.default("JAVA_Auth_009d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
894
- var config, card, response;
895
- return __generator(this, function (_a) {
896
- switch (_a.label) {
897
- case 0:
898
- t.plan(2);
899
- config = new src_1.ServicesConfig();
900
- config.merchantId = "heartlandgpsandbox";
901
- config.accountId = "api";
902
- config.sharedSecret = "secret";
903
- config.refundPassword = "refund";
904
- config.rebatePassword = "rebate";
905
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
906
- config.timeout = 20000;
907
- src_1.ServicesContainer.configure(config);
908
- card = new src_1.CreditCardData();
909
- card.number = "4263970000005262";
910
- card.expMonth = "12";
911
- card.expYear = "2020";
912
- card.cvn = "123";
913
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
914
- card.cardHolderName = "James Mason";
915
- return [4 /*yield*/, card
916
- .charge(100.01)
917
- .withCurrency("GBP")
918
- .withDescription("JAVA-Auth-009d")
919
- .execute()];
920
- case 1:
921
- response = _a.sent();
922
- t.truthy(response);
923
- t.is("00", response.responseCode);
924
- return [2 /*return*/];
925
- }
926
- });
927
- }); });
928
- ava_1.default("JAVA_Auth_010a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
929
- var config, card, response;
930
- return __generator(this, function (_a) {
931
- switch (_a.label) {
932
- case 0:
933
- t.plan(2);
934
- config = new src_1.ServicesConfig();
935
- config.merchantId = "heartlandgpsandbox";
936
- config.accountId = "api";
937
- config.sharedSecret = "secret";
938
- config.refundPassword = "refund";
939
- config.rebatePassword = "rebate";
940
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
941
- config.timeout = 20000;
942
- src_1.ServicesContainer.configure(config);
943
- card = new src_1.CreditCardData();
944
- card.number = "4263970000005262";
945
- card.expMonth = "12";
946
- card.expYear = "2020";
947
- card.cvn = "123";
948
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
949
- card.cardHolderName = "James Mason";
950
- return [4 /*yield*/, card
951
- .charge(100.01)
952
- .withCurrency("USD")
953
- .withDescription("JAVA-Auth-010a")
954
- .execute()];
955
- case 1:
956
- response = _a.sent();
957
- t.truthy(response);
958
- t.is("00", response.responseCode);
959
- return [2 /*return*/];
960
- }
961
- });
962
- }); });
963
- ava_1.default("JAVA_Auth_010b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
964
- var config, card, response;
965
- return __generator(this, function (_a) {
966
- switch (_a.label) {
967
- case 0:
968
- t.plan(2);
969
- config = new src_1.ServicesConfig();
970
- config.merchantId = "heartlandgpsandbox";
971
- config.accountId = "api";
972
- config.sharedSecret = "secret";
973
- config.refundPassword = "refund";
974
- config.rebatePassword = "rebate";
975
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
976
- config.timeout = 20000;
977
- src_1.ServicesContainer.configure(config);
978
- card = new src_1.CreditCardData();
979
- card.number = "4263970000005262";
980
- card.expMonth = "12";
981
- card.expYear = "2020";
982
- card.cvn = "123";
983
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
984
- card.cardHolderName = "James Mason";
985
- return [4 /*yield*/, card
986
- .charge(100.01)
987
- .withCurrency("GBP")
988
- .withDescription("JAVA-Auth-010b")
989
- .execute()];
990
- case 1:
991
- response = _a.sent();
992
- t.truthy(response);
993
- t.is("00", response.responseCode);
994
- return [2 /*return*/];
995
- }
996
- });
997
- }); });
998
- ava_1.default("JAVA_Auth_010c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
999
- var config, card, response;
1000
- return __generator(this, function (_a) {
1001
- switch (_a.label) {
1002
- case 0:
1003
- t.plan(2);
1004
- config = new src_1.ServicesConfig();
1005
- config.merchantId = "heartlandgpsandbox";
1006
- config.accountId = "api";
1007
- config.sharedSecret = "secret";
1008
- config.refundPassword = "refund";
1009
- config.rebatePassword = "rebate";
1010
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1011
- config.timeout = 20000;
1012
- src_1.ServicesContainer.configure(config);
1013
- card = new src_1.CreditCardData();
1014
- card.number = "4263970000005262";
1015
- card.expMonth = "12";
1016
- card.expYear = "2020";
1017
- card.cvn = "123";
1018
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1019
- card.cardHolderName = "James Mason";
1020
- return [4 /*yield*/, card
1021
- .charge(100.01)
1022
- .withCurrency("EUR")
1023
- .withDescription("JAVA-Auth-010c")
1024
- .execute()];
1025
- case 1:
1026
- response = _a.sent();
1027
- t.truthy(response);
1028
- t.is("00", response.responseCode);
1029
- return [2 /*return*/];
1030
- }
1031
- });
1032
- }); });
1033
- ava_1.default("JAVA_Auth_010d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1034
- var config, card, response;
1035
- return __generator(this, function (_a) {
1036
- switch (_a.label) {
1037
- case 0:
1038
- t.plan(2);
1039
- config = new src_1.ServicesConfig();
1040
- config.merchantId = "heartlandgpsandbox";
1041
- config.accountId = "api";
1042
- config.sharedSecret = "secret";
1043
- config.refundPassword = "refund";
1044
- config.rebatePassword = "rebate";
1045
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1046
- config.timeout = 20000;
1047
- src_1.ServicesContainer.configure(config);
1048
- card = new src_1.CreditCardData();
1049
- card.number = "4263970000005262";
1050
- card.expMonth = "12";
1051
- card.expYear = "2020";
1052
- card.cvn = "123";
1053
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1054
- card.cardHolderName = "James Mason";
1055
- return [4 /*yield*/, card
1056
- .charge(100.01)
1057
- .withCurrency("USD")
1058
- .withDescription("JAVA-Auth-010d")
1059
- .execute()];
1060
- case 1:
1061
- response = _a.sent();
1062
- t.truthy(response);
1063
- t.is("00", response.responseCode);
1064
- return [2 /*return*/];
1065
- }
1066
- });
1067
- }); });
1068
- ava_1.default("JAVA_Auth_010e", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1069
- var config, card, response;
1070
- return __generator(this, function (_a) {
1071
- switch (_a.label) {
1072
- case 0:
1073
- t.plan(2);
1074
- config = new src_1.ServicesConfig();
1075
- config.merchantId = "heartlandgpsandbox";
1076
- config.accountId = "api";
1077
- config.sharedSecret = "secret";
1078
- config.refundPassword = "refund";
1079
- config.rebatePassword = "rebate";
1080
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1081
- config.timeout = 20000;
1082
- src_1.ServicesContainer.configure(config);
1083
- card = new src_1.CreditCardData();
1084
- card.number = "4263970000005262";
1085
- card.expMonth = "12";
1086
- card.expYear = "2020";
1087
- card.cvn = "123";
1088
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1089
- card.cardHolderName = "James Mason";
1090
- return [4 /*yield*/, card
1091
- .charge(100.01)
1092
- .withCurrency("GBP")
1093
- .withDescription("JAVA-Auth-010e")
1094
- .execute()];
1095
- case 1:
1096
- response = _a.sent();
1097
- t.truthy(response);
1098
- t.is("00", response.responseCode);
1099
- return [2 /*return*/];
1100
- }
1101
- });
1102
- }); });
1103
- ava_1.default("JAVA_Auth_011a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1104
- var config, card, response;
1105
- return __generator(this, function (_a) {
1106
- switch (_a.label) {
1107
- case 0:
1108
- t.plan(2);
1109
- config = new src_1.ServicesConfig();
1110
- config.merchantId = "heartlandgpsandbox";
1111
- config.accountId = "api";
1112
- config.sharedSecret = "secret";
1113
- config.refundPassword = "refund";
1114
- config.rebatePassword = "rebate";
1115
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1116
- config.timeout = 20000;
1117
- src_1.ServicesContainer.configure(config);
1118
- card = new src_1.CreditCardData();
1119
- card.number = "4263970000005262";
1120
- card.expMonth = "12";
1121
- card.expYear = "2020";
1122
- card.cvn = "123";
1123
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1124
- card.cardHolderName = "James Mason";
1125
- return [4 /*yield*/, card
1126
- .charge(100.01)
1127
- .withCurrency("EUR")
1128
- .withDescription("JAVA-Auth-011a")
1129
- .execute()];
1130
- case 1:
1131
- response = _a.sent();
1132
- t.truthy(response);
1133
- t.is("00", response.responseCode);
1134
- return [2 /*return*/];
1135
- }
1136
- });
1137
- }); });
1138
- ava_1.default("JAVA_Auth_011b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1139
- var config, card, response;
1140
- return __generator(this, function (_a) {
1141
- switch (_a.label) {
1142
- case 0:
1143
- t.plan(2);
1144
- config = new src_1.ServicesConfig();
1145
- config.merchantId = "heartlandgpsandbox";
1146
- config.accountId = "api";
1147
- config.sharedSecret = "secret";
1148
- config.refundPassword = "refund";
1149
- config.rebatePassword = "rebate";
1150
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1151
- config.timeout = 20000;
1152
- src_1.ServicesContainer.configure(config);
1153
- card = new src_1.CreditCardData();
1154
- card.number = "4263970000005262";
1155
- card.expMonth = "12";
1156
- card.expYear = "2020";
1157
- card.cvn = "123";
1158
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1159
- card.cardHolderName = "James Mason";
1160
- return [4 /*yield*/, card
1161
- .charge(100.01)
1162
- .withCurrency("USD")
1163
- .withDescription("JAVA-Auth-011b")
1164
- .execute()];
1165
- case 1:
1166
- response = _a.sent();
1167
- t.truthy(response);
1168
- t.is("00", response.responseCode);
1169
- return [2 /*return*/];
1170
- }
1171
- });
1172
- }); });
1173
- ava_1.default("JAVA_Auth_011c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1174
- var config, card, response;
1175
- return __generator(this, function (_a) {
1176
- switch (_a.label) {
1177
- case 0:
1178
- t.plan(2);
1179
- config = new src_1.ServicesConfig();
1180
- config.merchantId = "heartlandgpsandbox";
1181
- config.accountId = "api";
1182
- config.sharedSecret = "secret";
1183
- config.refundPassword = "refund";
1184
- config.rebatePassword = "rebate";
1185
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1186
- config.timeout = 20000;
1187
- src_1.ServicesContainer.configure(config);
1188
- card = new src_1.CreditCardData();
1189
- card.number = "4263970000005262";
1190
- card.expMonth = "12";
1191
- card.expYear = "2020";
1192
- card.cvn = "123";
1193
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1194
- card.cardHolderName = "James Mason";
1195
- return [4 /*yield*/, card
1196
- .charge(100.01)
1197
- .withCurrency("GBP")
1198
- .withDescription("JAVA-Auth-011c")
1199
- .execute()];
1200
- case 1:
1201
- response = _a.sent();
1202
- t.truthy(response);
1203
- t.is("00", response.responseCode);
1204
- return [2 /*return*/];
1205
- }
1206
- });
1207
- }); });
1208
- ava_1.default("JAVA_Auth_011d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1209
- var config, card, error;
1210
- return __generator(this, function (_a) {
1211
- t.plan(2);
1212
- config = new src_1.ServicesConfig();
1213
- config.merchantId = "heartlandgpsandbox";
1214
- config.accountId = "api";
1215
- config.sharedSecret = "secret";
1216
- config.refundPassword = "refund";
1217
- config.rebatePassword = "rebate";
1218
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1219
- config.timeout = 20000;
1220
- src_1.ServicesContainer.configure(config);
1221
- card = new src_1.CreditCardData();
1222
- card.number = "4263970000005262";
1223
- card.expMonth = "12";
1224
- card.expYear = "2020";
1225
- card.cvn = "123";
1226
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1227
- card.cardHolderName = "James Mason";
1228
- error = t.throws(function () {
1229
- return card
1230
- .charge()
1231
- .withCurrency("EUR")
1232
- .withDescription("JAVA-Auth-011d")
1233
- .execute();
1234
- }, src_1.BuilderError);
1235
- t.truthy(error.message);
1236
- return [2 /*return*/];
1237
- });
1238
- }); });
1239
- ava_1.default("JAVA_Auth_012a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1240
- var config, card, response;
1241
- return __generator(this, function (_a) {
1242
- switch (_a.label) {
1243
- case 0:
1244
- t.plan(2);
1245
- config = new src_1.ServicesConfig();
1246
- config.merchantId = "heartlandgpsandbox";
1247
- config.accountId = "api";
1248
- config.sharedSecret = "secret";
1249
- config.refundPassword = "refund";
1250
- config.rebatePassword = "rebate";
1251
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1252
- config.timeout = 20000;
1253
- src_1.ServicesContainer.configure(config);
1254
- card = new src_1.CreditCardData();
1255
- card.number = "4263970000005262";
1256
- card.expMonth = "12";
1257
- card.expYear = "2020";
1258
- card.cvn = "123";
1259
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1260
- card.cardHolderName = "James Mason";
1261
- return [4 /*yield*/, card
1262
- .charge(100.01)
1263
- .withCurrency("USD")
1264
- .withDescription("JAVA-Auth-012a")
1265
- .execute()];
1266
- case 1:
1267
- response = _a.sent();
1268
- t.truthy(response);
1269
- t.is("00", response.responseCode);
1270
- return [2 /*return*/];
1271
- }
1272
- });
1273
- }); });
1274
- ava_1.default("JAVA_Auth_012b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1275
- var config, card, error;
1276
- return __generator(this, function (_a) {
1277
- switch (_a.label) {
1278
- case 0:
1279
- t.plan(2);
1280
- config = new src_1.ServicesConfig();
1281
- config.merchantId = "heartlandgpsandbox";
1282
- config.accountId = "api";
1283
- config.sharedSecret = "secret";
1284
- config.refundPassword = "refund";
1285
- config.rebatePassword = "rebate";
1286
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1287
- config.timeout = 20000;
1288
- src_1.ServicesContainer.configure(config);
1289
- card = new src_1.CreditCardData();
1290
- card.number = "4263970000005262";
1291
- card.expMonth = "12";
1292
- card.expYear = "2020";
1293
- card.cvn = "123";
1294
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1295
- card.cardHolderName = "James Mason";
1296
- return [4 /*yield*/, t.throws(card
1297
- .charge(100.01)
1298
- .withCurrency("EURO")
1299
- .withDescription("JAVA-Auth-012b")
1300
- .execute(), src_1.GatewayError)];
1301
- case 1:
1302
- error = _a.sent();
1303
- t.truthy(error.message);
1304
- return [2 /*return*/];
1305
- }
1306
- });
1307
- }); });
1308
- ava_1.default("JAVA_Auth_012c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1309
- var config, card, error;
1310
- return __generator(this, function (_a) {
1311
- switch (_a.label) {
1312
- case 0:
1313
- t.plan(2);
1314
- config = new src_1.ServicesConfig();
1315
- config.merchantId = "heartlandgpsandbox";
1316
- config.accountId = "api";
1317
- config.sharedSecret = "secret";
1318
- config.refundPassword = "refund";
1319
- config.rebatePassword = "rebate";
1320
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1321
- config.timeout = 20000;
1322
- src_1.ServicesContainer.configure(config);
1323
- card = new src_1.CreditCardData();
1324
- card.number = "4263970000005262";
1325
- card.expMonth = "12";
1326
- card.expYear = "2020";
1327
- card.cvn = "123";
1328
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1329
- card.cardHolderName = "James Mason";
1330
- return [4 /*yield*/, t.throws(card
1331
- .charge(100.01)
1332
- .withCurrency("�UR")
1333
- .withDescription("JAVA-Auth-012c")
1334
- .execute(), src_1.GatewayError)];
1335
- case 1:
1336
- error = _a.sent();
1337
- t.truthy(error.message);
1338
- return [2 /*return*/];
1339
- }
1340
- });
1341
- }); });
1342
- ava_1.default("JAVA_Auth_012d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1343
- var config, card, error;
1344
- return __generator(this, function (_a) {
1345
- t.plan(2);
1346
- config = new src_1.ServicesConfig();
1347
- config.merchantId = "heartlandgpsandbox";
1348
- config.accountId = "api";
1349
- config.sharedSecret = "secret";
1350
- config.refundPassword = "refund";
1351
- config.rebatePassword = "rebate";
1352
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1353
- config.timeout = 20000;
1354
- src_1.ServicesContainer.configure(config);
1355
- card = new src_1.CreditCardData();
1356
- card.number = "4263970000005262";
1357
- card.expMonth = "12";
1358
- card.expYear = "2020";
1359
- card.cvn = "123";
1360
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1361
- card.cardHolderName = "James Mason";
1362
- error = t.throws(function () {
1363
- return card
1364
- .charge(100.01)
1365
- .withDescription("JAVA-Auth-012d")
1366
- .execute();
1367
- }, src_1.BuilderError);
1368
- t.truthy(error.message);
1369
- return [2 /*return*/];
1370
- });
1371
- }); });
1372
- ava_1.default("JAVA_Auth_013a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1373
- var config, card, response;
1374
- return __generator(this, function (_a) {
1375
- switch (_a.label) {
1376
- case 0:
1377
- t.plan(2);
1378
- config = new src_1.ServicesConfig();
1379
- config.merchantId = "heartlandgpsandbox";
1380
- config.accountId = "api";
1381
- config.sharedSecret = "secret";
1382
- config.refundPassword = "refund";
1383
- config.rebatePassword = "rebate";
1384
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1385
- config.timeout = 20000;
1386
- src_1.ServicesContainer.configure(config);
1387
- card = new src_1.CreditCardData();
1388
- card.number = "4263970000005262";
1389
- card.expMonth = "12";
1390
- card.expYear = "2020";
1391
- card.cvn = "123";
1392
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1393
- card.cardHolderName = "James Mason";
1394
- return [4 /*yield*/, card
1395
- .charge(100.01)
1396
- .withCurrency("GBP")
1397
- .withDescription("JAVA-Auth-013a")
1398
- .execute()];
1399
- case 1:
1400
- response = _a.sent();
1401
- t.truthy(response);
1402
- t.is("00", response.responseCode);
1403
- return [2 /*return*/];
1404
- }
1405
- });
1406
- }); });
1407
- ava_1.default("JAVA_Auth_013b1", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1408
- var config, card, error;
1409
- return __generator(this, function (_a) {
1410
- switch (_a.label) {
1411
- case 0:
1412
- t.plan(2);
1413
- config = new src_1.ServicesConfig();
1414
- config.merchantId = "heartlandgpsandbox";
1415
- config.accountId = "api";
1416
- config.sharedSecret = "secret";
1417
- config.refundPassword = "refund";
1418
- config.rebatePassword = "rebate";
1419
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1420
- config.timeout = 20000;
1421
- src_1.ServicesContainer.configure(config);
1422
- card = new src_1.CreditCardData();
1423
- card.number = "424242000000000000000";
1424
- card.expMonth = "12";
1425
- card.expYear = "2020";
1426
- card.cvn = "123";
1427
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1428
- card.cardHolderName = "James Mason";
1429
- return [4 /*yield*/, t.throws(card
1430
- .charge(100.01)
1431
- .withCurrency("EUR")
1432
- .withDescription("JAVA-Auth-013b1")
1433
- .execute(), src_1.GatewayError)];
1434
- case 1:
1435
- error = _a.sent();
1436
- t.truthy(error.message);
1437
- return [2 /*return*/];
1438
- }
1439
- });
1440
- }); });
1441
- ava_1.default("JAVA_Auth_013b2", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1442
- var config, card, error;
1443
- return __generator(this, function (_a) {
1444
- switch (_a.label) {
1445
- case 0:
1446
- t.plan(2);
1447
- config = new src_1.ServicesConfig();
1448
- config.merchantId = "heartlandgpsandbox";
1449
- config.accountId = "api";
1450
- config.sharedSecret = "secret";
1451
- config.refundPassword = "refund";
1452
- config.rebatePassword = "rebate";
1453
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1454
- config.timeout = 20000;
1455
- src_1.ServicesContainer.configure(config);
1456
- card = new src_1.CreditCardData();
1457
- card.number = "42424242424";
1458
- card.expMonth = "12";
1459
- card.expYear = "2020";
1460
- card.cvn = "123";
1461
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1462
- card.cardHolderName = "James Mason";
1463
- return [4 /*yield*/, t.throws(card
1464
- .charge(100.01)
1465
- .withCurrency("USD")
1466
- .withDescription("JAVA-Auth-013b2")
1467
- .execute(), src_1.GatewayError)];
1468
- case 1:
1469
- error = _a.sent();
1470
- t.truthy(error.message);
1471
- return [2 /*return*/];
1472
- }
1473
- });
1474
- }); });
1475
- ava_1.default("JAVA_Auth_013c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1476
- var config, card, error;
1477
- return __generator(this, function (_a) {
1478
- switch (_a.label) {
1479
- case 0:
1480
- t.plan(2);
1481
- config = new src_1.ServicesConfig();
1482
- config.merchantId = "heartlandgpsandbox";
1483
- config.accountId = "api";
1484
- config.sharedSecret = "secret";
1485
- config.refundPassword = "refund";
1486
- config.rebatePassword = "rebate";
1487
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1488
- config.timeout = 20000;
1489
- src_1.ServicesContainer.configure(config);
1490
- card = new src_1.CreditCardData();
1491
- card.number = "4263970000005262#";
1492
- card.expMonth = "12";
1493
- card.expYear = "2020";
1494
- card.cvn = "123";
1495
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1496
- card.cardHolderName = "James Mason";
1497
- return [4 /*yield*/, t.throws(card
1498
- .charge(100.01)
1499
- .withCurrency("GBP")
1500
- .withDescription("JAVA-Auth-013c")
1501
- .execute(), src_1.GatewayError)];
1502
- case 1:
1503
- error = _a.sent();
1504
- t.truthy(error.message);
1505
- return [2 /*return*/];
1506
- }
1507
- });
1508
- }); });
1509
- ava_1.default("JAVA_Auth_014a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1510
- var config, card, response;
1511
- return __generator(this, function (_a) {
1512
- switch (_a.label) {
1513
- case 0:
1514
- t.plan(2);
1515
- config = new src_1.ServicesConfig();
1516
- config.merchantId = "heartlandgpsandbox";
1517
- config.accountId = "api";
1518
- config.sharedSecret = "secret";
1519
- config.refundPassword = "refund";
1520
- config.rebatePassword = "rebate";
1521
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1522
- config.timeout = 20000;
1523
- src_1.ServicesContainer.configure(config);
1524
- card = new src_1.CreditCardData();
1525
- card.number = "4263970000005262";
1526
- card.expMonth = "12";
1527
- card.expYear = "2020";
1528
- card.cvn = "123";
1529
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1530
- card.cardHolderName = "James Mason";
1531
- return [4 /*yield*/, card
1532
- .charge(100.01)
1533
- .withCurrency("EUR")
1534
- .withDescription("JAVA-Auth-014a")
1535
- .execute()];
1536
- case 1:
1537
- response = _a.sent();
1538
- t.truthy(response);
1539
- t.is("00", response.responseCode);
1540
- return [2 /*return*/];
1541
- }
1542
- });
1543
- }); });
1544
- ava_1.default("JAVA_Auth_014b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1545
- var config, card, error;
1546
- return __generator(this, function (_a) {
1547
- switch (_a.label) {
1548
- case 0:
1549
- t.plan(2);
1550
- config = new src_1.ServicesConfig();
1551
- config.merchantId = "heartlandgpsandbox";
1552
- config.accountId = "api";
1553
- config.sharedSecret = "secret";
1554
- config.refundPassword = "refund";
1555
- config.rebatePassword = "rebate";
1556
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1557
- config.timeout = 20000;
1558
- src_1.ServicesContainer.configure(config);
1559
- card = new src_1.CreditCardData();
1560
- card.number = "4263970000005262";
1561
- card.expMonth = "12";
1562
- card.expYear = "2020";
1563
- card.cvn = "123";
1564
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1565
- return [4 /*yield*/, t.throws(card
1566
- .charge(100.01)
1567
- .withCurrency("USD")
1568
- .withDescription("JAVA-Auth-014b")
1569
- .execute(), src_1.GatewayError)];
1570
- case 1:
1571
- error = _a.sent();
1572
- t.truthy(error.message);
1573
- return [2 /*return*/];
1574
- }
1575
- });
1576
- }); });
1577
- ava_1.default("JAVA_Auth_014c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1578
- var config, card, error;
1579
- return __generator(this, function (_a) {
1580
- switch (_a.label) {
1581
- case 0:
1582
- t.plan(2);
1583
- config = new src_1.ServicesConfig();
1584
- config.merchantId = "heartlandgpsandbox";
1585
- config.accountId = "api";
1586
- config.sharedSecret = "secret";
1587
- config.refundPassword = "refund";
1588
- config.rebatePassword = "rebate";
1589
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1590
- config.timeout = 20000;
1591
- src_1.ServicesContainer.configure(config);
1592
- card = new src_1.CreditCardData();
1593
- card.number = "4263970000005262";
1594
- card.expMonth = "12";
1595
- card.expYear = "2020";
1596
- card.cvn = "123";
1597
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1598
- card.cardHolderName =
1599
- "3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep";
1600
- return [4 /*yield*/, t.throws(card
1601
- .charge(100.01)
1602
- .withCurrency("GBP")
1603
- .withDescription("JAVA-Auth-014c")
1604
- .execute(), src_1.GatewayError)];
1605
- case 1:
1606
- error = _a.sent();
1607
- t.truthy(error.message);
1608
- return [2 /*return*/];
1609
- }
1610
- });
1611
- }); });
1612
- ava_1.default("JAVA_Auth_014d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1613
- var config, card, response;
1614
- return __generator(this, function (_a) {
1615
- switch (_a.label) {
1616
- case 0:
1617
- t.plan(2);
1618
- config = new src_1.ServicesConfig();
1619
- config.merchantId = "heartlandgpsandbox";
1620
- config.accountId = "api";
1621
- config.sharedSecret = "secret";
1622
- config.refundPassword = "refund";
1623
- config.rebatePassword = "rebate";
1624
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1625
- config.timeout = 20000;
1626
- src_1.ServicesContainer.configure(config);
1627
- card = new src_1.CreditCardData();
1628
- card.number = "4263970000005262";
1629
- card.expMonth = "12";
1630
- card.expYear = "2020";
1631
- card.cvn = "123";
1632
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1633
- card.cardHolderName = "James~Mason";
1634
- return [4 /*yield*/, card
1635
- .charge(100.01)
1636
- .withCurrency("EUR")
1637
- .withDescription("JAVA-Auth-014d")
1638
- .execute()];
1639
- case 1:
1640
- response = _a.sent();
1641
- t.truthy(response);
1642
- t.is("00", response.responseCode);
1643
- return [2 /*return*/];
1644
- }
1645
- });
1646
- }); });
1647
- ava_1.default("JAVA_Auth_015a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1648
- var config, card, response;
1649
- return __generator(this, function (_a) {
1650
- switch (_a.label) {
1651
- case 0:
1652
- t.plan(2);
1653
- config = new src_1.ServicesConfig();
1654
- config.merchantId = "heartlandgpsandbox";
1655
- config.accountId = "api";
1656
- config.sharedSecret = "secret";
1657
- config.refundPassword = "refund";
1658
- config.rebatePassword = "rebate";
1659
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1660
- config.timeout = 20000;
1661
- src_1.ServicesContainer.configure(config);
1662
- card = new src_1.CreditCardData();
1663
- card.number = "4263970000005262";
1664
- card.expMonth = "12";
1665
- card.expYear = "2020";
1666
- card.cvn = "123";
1667
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1668
- card.cardHolderName = "James Mason";
1669
- return [4 /*yield*/, card
1670
- .charge(100.01)
1671
- .withCurrency("USD")
1672
- .withDescription("JAVA-Auth-015a")
1673
- .execute()];
1674
- case 1:
1675
- response = _a.sent();
1676
- t.truthy(response);
1677
- t.is("00", response.responseCode);
1678
- return [2 /*return*/];
1679
- }
1680
- });
1681
- }); });
1682
- ava_1.default("JAVA_Auth_015b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1683
- var config, card, response;
1684
- return __generator(this, function (_a) {
1685
- switch (_a.label) {
1686
- case 0:
1687
- t.plan(2);
1688
- config = new src_1.ServicesConfig();
1689
- config.merchantId = "heartlandgpsandbox";
1690
- config.accountId = "api";
1691
- config.sharedSecret = "secret";
1692
- config.refundPassword = "refund";
1693
- config.rebatePassword = "rebate";
1694
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1695
- config.timeout = 20000;
1696
- src_1.ServicesContainer.configure(config);
1697
- card = new src_1.CreditCardData();
1698
- card.number = "4263970000005262";
1699
- card.expMonth = "12";
1700
- card.expYear = "2020";
1701
- card.cvn = "123";
1702
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1703
- card.cardHolderName = "James Mason";
1704
- return [4 /*yield*/, card
1705
- .charge(100.01)
1706
- .withCurrency("GBP")
1707
- .withDescription("JAVA-Auth-015b")
1708
- .execute()];
1709
- case 1:
1710
- response = _a.sent();
1711
- t.truthy(response);
1712
- t.is("00", response.responseCode);
1713
- return [2 /*return*/];
1714
- }
1715
- });
1716
- }); });
1717
- ava_1.default("JAVA_Auth_015c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1718
- var config, card, error;
1719
- return __generator(this, function (_a) {
1720
- switch (_a.label) {
1721
- case 0:
1722
- t.plan(2);
1723
- config = new src_1.ServicesConfig();
1724
- config.merchantId = "heartlandgpsandbox";
1725
- config.accountId = "api";
1726
- config.sharedSecret = "secret";
1727
- config.refundPassword = "refund";
1728
- config.rebatePassword = "rebate";
1729
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1730
- config.timeout = 20000;
1731
- src_1.ServicesContainer.configure(config);
1732
- card = new src_1.CreditCardData();
1733
- card.number = "4263970000005262";
1734
- card.expMonth = "20";
1735
- card.expYear = "2012";
1736
- card.cvn = "123";
1737
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1738
- card.cardHolderName = "James Mason";
1739
- return [4 /*yield*/, t.throws(card
1740
- .charge(100.01)
1741
- .withCurrency("EUR")
1742
- .withDescription("JAVA-Auth-015c")
1743
- .execute(), src_1.GatewayError)];
1744
- case 1:
1745
- error = _a.sent();
1746
- t.truthy(error.message);
1747
- return [2 /*return*/];
1748
- }
1749
- });
1750
- }); });
1751
- ava_1.default("JAVA_Auth_015d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1752
- var config, card, error;
1753
- return __generator(this, function (_a) {
1754
- switch (_a.label) {
1755
- case 0:
1756
- t.plan(2);
1757
- config = new src_1.ServicesConfig();
1758
- config.merchantId = "heartlandgpsandbox";
1759
- config.accountId = "api";
1760
- config.sharedSecret = "secret";
1761
- config.refundPassword = "refund";
1762
- config.rebatePassword = "rebate";
1763
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1764
- config.timeout = 20000;
1765
- src_1.ServicesContainer.configure(config);
1766
- card = new src_1.CreditCardData();
1767
- card.number = "4263970000005262";
1768
- card.cvn = "123";
1769
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1770
- card.cardHolderName = "James Mason";
1771
- return [4 /*yield*/, t.throws(card
1772
- .charge(100.01)
1773
- .withCurrency("USD")
1774
- .withDescription("JAVA-Auth-015d")
1775
- .execute(), src_1.GatewayError)];
1776
- case 1:
1777
- error = _a.sent();
1778
- t.truthy(error.message);
1779
- return [2 /*return*/];
1780
- }
1781
- });
1782
- }); });
1783
- ava_1.default("JAVA_Auth_016a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1784
- var config, card, response;
1785
- return __generator(this, function (_a) {
1786
- switch (_a.label) {
1787
- case 0:
1788
- t.plan(2);
1789
- config = new src_1.ServicesConfig();
1790
- config.merchantId = "heartlandgpsandbox";
1791
- config.accountId = "api";
1792
- config.sharedSecret = "secret";
1793
- config.refundPassword = "refund";
1794
- config.rebatePassword = "rebate";
1795
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1796
- config.timeout = 20000;
1797
- src_1.ServicesContainer.configure(config);
1798
- card = new src_1.CreditCardData();
1799
- card.number = "4263970000005262";
1800
- card.expMonth = "12";
1801
- card.expYear = "2020";
1802
- card.cvn = "123";
1803
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1804
- card.cardHolderName = "James Mason";
1805
- return [4 /*yield*/, card
1806
- .charge(100.01)
1807
- .withCurrency("GBP")
1808
- .withDescription("JAVA-Auth-016a")
1809
- .execute()];
1810
- case 1:
1811
- response = _a.sent();
1812
- t.truthy(response);
1813
- t.is("00", response.responseCode);
1814
- return [2 /*return*/];
1815
- }
1816
- });
1817
- }); });
1818
- ava_1.default("JAVA_Auth_016b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1819
- var config, card, response;
1820
- return __generator(this, function (_a) {
1821
- switch (_a.label) {
1822
- case 0:
1823
- t.plan(2);
1824
- config = new src_1.ServicesConfig();
1825
- config.merchantId = "heartlandgpsandbox";
1826
- config.accountId = "api";
1827
- config.sharedSecret = "secret";
1828
- config.refundPassword = "refund";
1829
- config.rebatePassword = "rebate";
1830
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1831
- config.timeout = 20000;
1832
- src_1.ServicesContainer.configure(config);
1833
- card = new src_1.CreditCardData();
1834
- card.number = "4263970000005262";
1835
- card.expMonth = "12";
1836
- card.expYear = "2020";
1837
- card.cvn = "123";
1838
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1839
- card.cardHolderName = "James Mason";
1840
- return [4 /*yield*/, card
1841
- .charge(100.01)
1842
- .withCurrency("EUR")
1843
- .withDescription("JAVA-Auth-016b")
1844
- .execute()];
1845
- case 1:
1846
- response = _a.sent();
1847
- t.truthy(response);
1848
- t.is("00", response.responseCode);
1849
- return [2 /*return*/];
1850
- }
1851
- });
1852
- }); });
1853
- ava_1.default("JAVA_Auth_016c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1854
- var config, card, response;
1855
- return __generator(this, function (_a) {
1856
- switch (_a.label) {
1857
- case 0:
1858
- t.plan(2);
1859
- config = new src_1.ServicesConfig();
1860
- config.merchantId = "heartlandgpsandbox";
1861
- config.accountId = "api";
1862
- config.sharedSecret = "secret";
1863
- config.refundPassword = "refund";
1864
- config.rebatePassword = "rebate";
1865
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1866
- config.timeout = 20000;
1867
- src_1.ServicesContainer.configure(config);
1868
- card = new src_1.CreditCardData();
1869
- card.number = "4263970000005262";
1870
- card.expMonth = "12";
1871
- card.expYear = "2020";
1872
- card.cvn = "123";
1873
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1874
- card.cardHolderName = "James Mason";
1875
- return [4 /*yield*/, card
1876
- .charge(100.01)
1877
- .withCurrency("USD")
1878
- .withDescription("JAVA-Auth-016c")
1879
- .execute()];
1880
- case 1:
1881
- response = _a.sent();
1882
- t.truthy(response);
1883
- t.is("00", response.responseCode);
1884
- return [2 /*return*/];
1885
- }
1886
- });
1887
- }); });
1888
- ava_1.default("JAVA_Auth_017a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1889
- var config, card, response;
1890
- return __generator(this, function (_a) {
1891
- switch (_a.label) {
1892
- case 0:
1893
- t.plan(2);
1894
- config = new src_1.ServicesConfig();
1895
- config.merchantId = "heartlandgpsandbox";
1896
- config.accountId = "api";
1897
- config.sharedSecret = "secret";
1898
- config.refundPassword = "refund";
1899
- config.rebatePassword = "rebate";
1900
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1901
- config.timeout = 20000;
1902
- src_1.ServicesContainer.configure(config);
1903
- card = new src_1.CreditCardData();
1904
- card.number = "4263970000005262";
1905
- card.expMonth = "12";
1906
- card.expYear = "2020";
1907
- card.cvn = "123";
1908
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1909
- card.cardHolderName = "James Mason";
1910
- return [4 /*yield*/, card
1911
- .charge(100.01)
1912
- .withCurrency("GBP")
1913
- .withDescription("JAVA-Auth-017a")
1914
- .execute()];
1915
- case 1:
1916
- response = _a.sent();
1917
- t.truthy(response);
1918
- t.is("00", response.responseCode);
1919
- return [2 /*return*/];
1920
- }
1921
- });
1922
- }); });
1923
- ava_1.default("JAVA_Auth_018a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1924
- var config, card, response;
1925
- return __generator(this, function (_a) {
1926
- switch (_a.label) {
1927
- case 0:
1928
- t.plan(2);
1929
- config = new src_1.ServicesConfig();
1930
- config.merchantId = "heartlandgpsandbox";
1931
- config.accountId = "api";
1932
- config.sharedSecret = "secret";
1933
- config.refundPassword = "refund";
1934
- config.rebatePassword = "rebate";
1935
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1936
- config.timeout = 20000;
1937
- src_1.ServicesContainer.configure(config);
1938
- card = new src_1.CreditCardData();
1939
- card.number = "4263970000005262";
1940
- card.expMonth = "12";
1941
- card.expYear = "2020";
1942
- card.cvn = "123";
1943
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1944
- card.cardHolderName = "James Mason";
1945
- return [4 /*yield*/, card
1946
- .charge(100.01)
1947
- .withCurrency("EUR")
1948
- .withDescription("JAVA-Auth-018a")
1949
- .execute()];
1950
- case 1:
1951
- response = _a.sent();
1952
- t.truthy(response);
1953
- t.is("00", response.responseCode);
1954
- return [2 /*return*/];
1955
- }
1956
- });
1957
- }); });
1958
- ava_1.default("JAVA_Auth_019a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1959
- var config, card, response;
1960
- return __generator(this, function (_a) {
1961
- switch (_a.label) {
1962
- case 0:
1963
- t.plan(2);
1964
- config = new src_1.ServicesConfig();
1965
- config.merchantId = "heartlandgpsandbox";
1966
- config.accountId = "api";
1967
- config.sharedSecret = "secret";
1968
- config.refundPassword = "refund";
1969
- config.rebatePassword = "rebate";
1970
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1971
- config.timeout = 20000;
1972
- src_1.ServicesContainer.configure(config);
1973
- card = new src_1.CreditCardData();
1974
- card.number = "4263970000005262";
1975
- card.expMonth = "12";
1976
- card.expYear = "2020";
1977
- card.cvn = "123";
1978
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1979
- card.cardHolderName = "James Mason";
1980
- return [4 /*yield*/, card
1981
- .charge(100.01)
1982
- .withCurrency("USD")
1983
- .withDescription("JAVA-Auth-019a")
1984
- .execute()];
1985
- case 1:
1986
- response = _a.sent();
1987
- t.truthy(response);
1988
- t.is("00", response.responseCode);
1989
- return [2 /*return*/];
1990
- }
1991
- });
1992
- }); });
1993
- ava_1.default("JAVA_Auth_019b1", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1994
- var config, card, error;
1995
- return __generator(this, function (_a) {
1996
- switch (_a.label) {
1997
- case 0:
1998
- t.plan(2);
1999
- config = new src_1.ServicesConfig();
2000
- config.merchantId = "heartlandgpsandbox";
2001
- config.accountId = "api";
2002
- config.sharedSecret = "secret";
2003
- config.refundPassword = "refund";
2004
- config.rebatePassword = "rebate";
2005
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2006
- config.timeout = 20000;
2007
- src_1.ServicesContainer.configure(config);
2008
- card = new src_1.CreditCardData();
2009
- card.number = "4263970000005262";
2010
- card.expMonth = "12";
2011
- card.expYear = "2020";
2012
- card.cvn = "1234";
2013
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2014
- card.cardHolderName = "James Mason";
2015
- return [4 /*yield*/, t.throws(card
2016
- .charge(100.01)
2017
- .withCurrency("GBP")
2018
- .withDescription("JAVA-Auth-019b1")
2019
- .execute(), src_1.GatewayError)];
2020
- case 1:
2021
- error = _a.sent();
2022
- t.truthy(error.message);
2023
- return [2 /*return*/];
2024
- }
2025
- });
2026
- }); });
2027
- ava_1.default("JAVA_Auth_019b2", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2028
- var config, card, response;
2029
- return __generator(this, function (_a) {
2030
- switch (_a.label) {
2031
- case 0:
2032
- t.plan(2);
2033
- config = new src_1.ServicesConfig();
2034
- config.merchantId = "heartlandgpsandbox";
2035
- config.accountId = "api";
2036
- config.sharedSecret = "secret";
2037
- config.refundPassword = "refund";
2038
- config.rebatePassword = "rebate";
2039
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2040
- config.timeout = 20000;
2041
- src_1.ServicesContainer.configure(config);
2042
- card = new src_1.CreditCardData();
2043
- card.number = "4263970000005262";
2044
- card.expMonth = "12";
2045
- card.expYear = "2020";
2046
- card.cvn = "123";
2047
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2048
- card.cardHolderName = "James Mason";
2049
- return [4 /*yield*/, card
2050
- .charge(100.01)
2051
- .withCurrency("GBP")
2052
- .withDescription("JAVA-Auth-019b2")
2053
- .execute()];
2054
- case 1:
2055
- response = _a.sent();
2056
- t.truthy(response);
2057
- t.is("00", response.responseCode);
2058
- return [2 /*return*/];
2059
- }
2060
- });
2061
- }); });
2062
- ava_1.default("JAVA_Auth_019c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2063
- var config, card, error;
2064
- return __generator(this, function (_a) {
2065
- switch (_a.label) {
2066
- case 0:
2067
- t.plan(2);
2068
- config = new src_1.ServicesConfig();
2069
- config.merchantId = "heartlandgpsandbox";
2070
- config.accountId = "api";
2071
- config.sharedSecret = "secret";
2072
- config.refundPassword = "refund";
2073
- config.rebatePassword = "rebate";
2074
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2075
- config.timeout = 20000;
2076
- src_1.ServicesContainer.configure(config);
2077
- card = new src_1.CreditCardData();
2078
- card.number = "4263970000005262";
2079
- card.expMonth = "12";
2080
- card.expYear = "2020";
2081
- card.cvn = "12345";
2082
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2083
- card.cardHolderName = "James Mason";
2084
- return [4 /*yield*/, t.throws(card
2085
- .charge(100.01)
2086
- .withCurrency("EUR")
2087
- .withDescription("JAVA-Auth-019c")
2088
- .execute(), src_1.GatewayError)];
2089
- case 1:
2090
- error = _a.sent();
2091
- t.truthy(error.message);
2092
- return [2 /*return*/];
2093
- }
2094
- });
2095
- }); });
2096
- ava_1.default("JAVA_Auth_019d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2097
- var config, card, response;
2098
- return __generator(this, function (_a) {
2099
- switch (_a.label) {
2100
- case 0:
2101
- t.plan(2);
2102
- config = new src_1.ServicesConfig();
2103
- config.merchantId = "heartlandgpsandbox";
2104
- config.accountId = "api";
2105
- config.sharedSecret = "secret";
2106
- config.refundPassword = "refund";
2107
- config.rebatePassword = "rebate";
2108
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2109
- config.timeout = 20000;
2110
- src_1.ServicesContainer.configure(config);
2111
- card = new src_1.CreditCardData();
2112
- card.number = "374101000000608";
2113
- card.expMonth = "12";
2114
- card.expYear = "2020";
2115
- card.cvn = "1234";
2116
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2117
- card.cardHolderName = "James Mason";
2118
- return [4 /*yield*/, card
2119
- .charge(100.01)
2120
- .withCurrency("USD")
2121
- .withDescription("JAVA-Auth-019d")
2122
- .execute()];
2123
- case 1:
2124
- response = _a.sent();
2125
- t.truthy(response);
2126
- t.is("00", response.responseCode);
2127
- return [2 /*return*/];
2128
- }
2129
- });
2130
- }); });
2131
- ava_1.default("JAVA_Auth_020a1", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2132
- var config, card, response;
2133
- return __generator(this, function (_a) {
2134
- switch (_a.label) {
2135
- case 0:
2136
- t.plan(2);
2137
- config = new src_1.ServicesConfig();
2138
- config.merchantId = "heartlandgpsandbox";
2139
- config.accountId = "api";
2140
- config.sharedSecret = "secret";
2141
- config.refundPassword = "refund";
2142
- config.rebatePassword = "rebate";
2143
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2144
- config.timeout = 20000;
2145
- src_1.ServicesContainer.configure(config);
2146
- card = new src_1.CreditCardData();
2147
- card.number = "4263970000005262";
2148
- card.expMonth = "12";
2149
- card.expYear = "2020";
2150
- card.cvn = "123";
2151
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2152
- card.cardHolderName = "James Mason";
2153
- return [4 /*yield*/, card
2154
- .charge(100.01)
2155
- .withCurrency("GBP")
2156
- .withDescription("JAVA-Auth-020a1")
2157
- .execute()];
2158
- case 1:
2159
- response = _a.sent();
2160
- t.truthy(response);
2161
- t.is("00", response.responseCode);
2162
- return [2 /*return*/];
2163
- }
2164
- });
2165
- }); });
2166
- ava_1.default("JAVA_Auth_020a2", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2167
- var config, card, response;
2168
- return __generator(this, function (_a) {
2169
- switch (_a.label) {
2170
- case 0:
2171
- t.plan(2);
2172
- config = new src_1.ServicesConfig();
2173
- config.merchantId = "heartlandgpsandbox";
2174
- config.accountId = "api";
2175
- config.sharedSecret = "secret";
2176
- config.refundPassword = "refund";
2177
- config.rebatePassword = "rebate";
2178
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2179
- config.timeout = 20000;
2180
- src_1.ServicesContainer.configure(config);
2181
- card = new src_1.CreditCardData();
2182
- card.number = "4263970000005262";
2183
- card.expMonth = "12";
2184
- card.expYear = "2020";
2185
- card.cvn = "";
2186
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Illegible;
2187
- card.cardHolderName = "James Mason";
2188
- return [4 /*yield*/, card
2189
- .charge(100.01)
2190
- .withCurrency("EUR")
2191
- .withDescription("JAVA-Auth-020a2")
2192
- .execute()];
2193
- case 1:
2194
- response = _a.sent();
2195
- t.truthy(response);
2196
- t.is("00", response.responseCode);
2197
- return [2 /*return*/];
2198
- }
2199
- });
2200
- }); });
2201
- ava_1.default("JAVA_Auth_020a3", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2202
- var config, card, response;
2203
- return __generator(this, function (_a) {
2204
- switch (_a.label) {
2205
- case 0:
2206
- t.plan(2);
2207
- config = new src_1.ServicesConfig();
2208
- config.merchantId = "heartlandgpsandbox";
2209
- config.accountId = "api";
2210
- config.sharedSecret = "secret";
2211
- config.refundPassword = "refund";
2212
- config.rebatePassword = "rebate";
2213
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2214
- config.timeout = 20000;
2215
- src_1.ServicesContainer.configure(config);
2216
- card = new src_1.CreditCardData();
2217
- card.number = "4263970000005262";
2218
- card.expMonth = "12";
2219
- card.expYear = "2020";
2220
- card.cvn = "";
2221
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.NotOnCard;
2222
- card.cardHolderName = "James Mason";
2223
- return [4 /*yield*/, card
2224
- .charge(100.01)
2225
- .withCurrency("USD")
2226
- .withDescription("JAVA-Auth-020a3")
2227
- .execute()];
2228
- case 1:
2229
- response = _a.sent();
2230
- t.truthy(response);
2231
- t.is("00", response.responseCode);
2232
- return [2 /*return*/];
2233
- }
2234
- });
2235
- }); });
2236
- ava_1.default("JAVA_Auth_020a4", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2237
- var config, card, response;
2238
- return __generator(this, function (_a) {
2239
- switch (_a.label) {
2240
- case 0:
2241
- t.plan(2);
2242
- config = new src_1.ServicesConfig();
2243
- config.merchantId = "heartlandgpsandbox";
2244
- config.accountId = "api";
2245
- config.sharedSecret = "secret";
2246
- config.refundPassword = "refund";
2247
- config.rebatePassword = "rebate";
2248
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2249
- config.timeout = 20000;
2250
- src_1.ServicesContainer.configure(config);
2251
- card = new src_1.CreditCardData();
2252
- card.number = "4263970000005262";
2253
- card.expMonth = "12";
2254
- card.expYear = "2020";
2255
- card.cvn = "";
2256
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.NotRequested;
2257
- card.cardHolderName = "James Mason";
2258
- return [4 /*yield*/, card
2259
- .charge(100.01)
2260
- .withCurrency("GBP")
2261
- .withDescription("JAVA-Auth-020a4")
2262
- .execute()];
2263
- case 1:
2264
- response = _a.sent();
2265
- t.truthy(response);
2266
- t.is("00", response.responseCode);
2267
- return [2 /*return*/];
2268
- }
2269
- });
2270
- }); });
2271
- ava_1.default("JAVA_Auth_020b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2272
- var config, card, error;
2273
- return __generator(this, function (_a) {
2274
- switch (_a.label) {
2275
- case 0:
2276
- t.plan(2);
2277
- config = new src_1.ServicesConfig();
2278
- config.merchantId = "heartlandgpsandbox";
2279
- config.accountId = "api";
2280
- config.sharedSecret = "secret";
2281
- config.refundPassword = "refund";
2282
- config.rebatePassword = "rebate";
2283
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2284
- config.timeout = 20000;
2285
- src_1.ServicesContainer.configure(config);
2286
- card = new src_1.CreditCardData();
2287
- card.number = "4263970000005262";
2288
- card.expMonth = "12";
2289
- card.expYear = "2020";
2290
- card.cvn = "123";
2291
- card.cvnPresenceIndicator = 5;
2292
- card.cardHolderName = "James Mason";
2293
- return [4 /*yield*/, t.throws(card
2294
- .charge(100.01)
2295
- .withCurrency("EUR")
2296
- .withDescription("JAVA-Auth-020b")
2297
- .execute(), src_1.GatewayError)];
2298
- case 1:
2299
- error = _a.sent();
2300
- t.truthy(error.message);
2301
- return [2 /*return*/];
2302
- }
2303
- });
2304
- }); });
2305
- ava_1.default("JAVA_Auth_020c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2306
- var config, card, response;
2307
- return __generator(this, function (_a) {
2308
- switch (_a.label) {
2309
- case 0:
2310
- t.plan(2);
2311
- config = new src_1.ServicesConfig();
2312
- config.merchantId = "heartlandgpsandbox";
2313
- config.accountId = "api";
2314
- config.sharedSecret = "secret";
2315
- config.refundPassword = "refund";
2316
- config.rebatePassword = "rebate";
2317
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2318
- config.timeout = 20000;
2319
- src_1.ServicesContainer.configure(config);
2320
- card = new src_1.CreditCardData();
2321
- card.number = "4263970000005262";
2322
- card.expMonth = "12";
2323
- card.expYear = "2020";
2324
- card.cvn = "123";
2325
- card.cvnPresenceIndicator = 0;
2326
- card.cardHolderName = "James Mason";
2327
- return [4 /*yield*/, card
2328
- .charge(100.01)
2329
- .withCurrency("USD")
2330
- .withDescription("JAVA-Auth-020c")
2331
- .execute()];
2332
- case 1:
2333
- response = _a.sent();
2334
- t.truthy(response);
2335
- t.is("00", response.responseCode);
2336
- return [2 /*return*/];
2337
- }
2338
- });
2339
- }); });
2340
- ava_1.default("JAVA_Auth_021a1", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2341
- var config, card, response;
2342
- return __generator(this, function (_a) {
2343
- switch (_a.label) {
2344
- case 0:
2345
- t.plan(2);
2346
- config = new src_1.ServicesConfig();
2347
- config.merchantId = "heartlandgpsandbox";
2348
- config.accountId = "api";
2349
- config.sharedSecret = "secret";
2350
- config.refundPassword = "refund";
2351
- config.rebatePassword = "rebate";
2352
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2353
- config.timeout = 20000;
2354
- src_1.ServicesContainer.configure(config);
2355
- card = new src_1.CreditCardData();
2356
- card.number = "4263970000005262";
2357
- card.expMonth = "12";
2358
- card.expYear = "2020";
2359
- card.cvn = "123";
2360
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2361
- card.cardHolderName = "James Mason";
2362
- return [4 /*yield*/, card
2363
- .charge(100.01)
2364
- .withCurrency("GBP")
2365
- .withDescription("JAVA-Auth-021a1")
2366
- .execute()];
2367
- case 1:
2368
- response = _a.sent();
2369
- t.truthy(response);
2370
- t.is("00", response.responseCode);
2371
- return [2 /*return*/];
2372
- }
2373
- });
2374
- }); });
2375
- ava_1.default("JAVA_Auth_021a2", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2376
- var config, card, response;
2377
- return __generator(this, function (_a) {
2378
- switch (_a.label) {
2379
- case 0:
2380
- t.plan(2);
2381
- config = new src_1.ServicesConfig();
2382
- config.merchantId = "heartlandgpsandbox";
2383
- config.accountId = "api";
2384
- config.sharedSecret = "secret";
2385
- config.refundPassword = "refund";
2386
- config.rebatePassword = "rebate";
2387
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2388
- config.timeout = 20000;
2389
- src_1.ServicesContainer.configure(config);
2390
- card = new src_1.CreditCardData();
2391
- card.number = "4263970000005262";
2392
- card.expMonth = "12";
2393
- card.expYear = "2020";
2394
- card.cvn = "123";
2395
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2396
- card.cardHolderName = "James Mason";
2397
- return [4 /*yield*/, card
2398
- .authorize(100.01)
2399
- .withCurrency("EUR")
2400
- .withDescription("JAVA-Auth-021a2")
2401
- .execute()];
2402
- case 1:
2403
- response = _a.sent();
2404
- t.truthy(response);
2405
- t.is("00", response.responseCode);
2406
- return [2 /*return*/];
2407
- }
2408
- });
2409
- }); });
2410
- ava_1.default("JAVA_Auth_021a3", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2411
- var config, card, response;
2412
- return __generator(this, function (_a) {
2413
- switch (_a.label) {
2414
- case 0:
2415
- t.plan(2);
2416
- config = new src_1.ServicesConfig();
2417
- config.merchantId = "heartlandgpsandbox";
2418
- config.accountId = "api";
2419
- config.sharedSecret = "secret";
2420
- config.refundPassword = "refund";
2421
- config.rebatePassword = "rebate";
2422
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2423
- config.timeout = 20000;
2424
- src_1.ServicesContainer.configure(config);
2425
- card = new src_1.CreditCardData();
2426
- card.number = "4263970000005262";
2427
- card.expMonth = "12";
2428
- card.expYear = "2020";
2429
- card.cvn = "123";
2430
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2431
- card.cardHolderName = "James Mason";
2432
- return [4 /*yield*/, card
2433
- .authorize(100.01)
2434
- .withCurrency("USD")
2435
- .withDescription("JAVA-Auth-021a3")
2436
- .execute()];
2437
- case 1:
2438
- response = _a.sent();
2439
- t.truthy(response);
2440
- t.is("00", response.responseCode);
2441
- return [2 /*return*/];
2442
- }
2443
- });
2444
- }); });
2445
- ava_1.default("JAVA_Auth_021b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2446
- var config, card, response;
2447
- return __generator(this, function (_a) {
2448
- switch (_a.label) {
2449
- case 0:
2450
- t.plan(2);
2451
- config = new src_1.ServicesConfig();
2452
- config.merchantId = "heartlandgpsandbox";
2453
- config.accountId = "api";
2454
- config.sharedSecret = "secret";
2455
- config.refundPassword = "refund";
2456
- config.rebatePassword = "rebate";
2457
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2458
- config.timeout = 20000;
2459
- src_1.ServicesContainer.configure(config);
2460
- card = new src_1.CreditCardData();
2461
- card.number = "4263970000005262";
2462
- card.expMonth = "12";
2463
- card.expYear = "2020";
2464
- card.cvn = "123";
2465
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2466
- card.cardHolderName = "James Mason";
2467
- return [4 /*yield*/, card
2468
- .authorize(100.01)
2469
- .withCurrency("EUR")
2470
- .withDescription("JAVA-Auth-021b")
2471
- .execute()];
2472
- case 1:
2473
- response = _a.sent();
2474
- t.truthy(response);
2475
- t.is("00", response.responseCode);
2476
- return [2 /*return*/];
2477
- }
2478
- });
2479
- }); });
2480
- ava_1.default("JAVA_Auth_021c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2481
- var config, card, response;
2482
- return __generator(this, function (_a) {
2483
- switch (_a.label) {
2484
- case 0:
2485
- t.plan(2);
2486
- config = new src_1.ServicesConfig();
2487
- config.merchantId = "heartlandgpsandbox";
2488
- config.accountId = "api";
2489
- config.sharedSecret = "secret";
2490
- config.refundPassword = "refund";
2491
- config.rebatePassword = "rebate";
2492
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2493
- config.timeout = 20000;
2494
- src_1.ServicesContainer.configure(config);
2495
- card = new src_1.CreditCardData();
2496
- card.number = "4263970000005262";
2497
- card.expMonth = "12";
2498
- card.expYear = "2020";
2499
- card.cvn = "123";
2500
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2501
- card.cardHolderName = "James Mason";
2502
- return [4 /*yield*/, card
2503
- .authorize(100.01)
2504
- .withCurrency("USD")
2505
- .withDescription("JAVA-Auth-021c")
2506
- .execute()];
2507
- case 1:
2508
- response = _a.sent();
2509
- t.truthy(response);
2510
- t.is("00", response.responseCode);
2511
- return [2 /*return*/];
2512
- }
2513
- });
2514
- }); });
2515
- ava_1.default("JAVA_Auth_022a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2516
- var config, card, response;
2517
- return __generator(this, function (_a) {
2518
- switch (_a.label) {
2519
- case 0:
2520
- t.plan(2);
2521
- config = new src_1.ServicesConfig();
2522
- config.merchantId = "heartlandgpsandbox";
2523
- config.accountId = "api";
2524
- config.sharedSecret = "secret";
2525
- config.refundPassword = "refund";
2526
- config.rebatePassword = "rebate";
2527
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2528
- config.timeout = 20000;
2529
- src_1.ServicesContainer.configure(config);
2530
- card = new src_1.CreditCardData();
2531
- card.number = "4263970000005262";
2532
- card.expMonth = "12";
2533
- card.expYear = "2020";
2534
- card.cvn = "123";
2535
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2536
- card.cardHolderName = "James Mason";
2537
- return [4 /*yield*/, card
2538
- .charge(100.01)
2539
- .withCurrency("GBP")
2540
- .withDescription("JAVA-Auth-022a")
2541
- .execute()];
2542
- case 1:
2543
- response = _a.sent();
2544
- t.truthy(response);
2545
- t.is("00", response.responseCode);
2546
- return [2 /*return*/];
2547
- }
2548
- });
2549
- }); });
2550
- ava_1.default("JAVA_Auth_022b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2551
- var config, card, response;
2552
- return __generator(this, function (_a) {
2553
- switch (_a.label) {
2554
- case 0:
2555
- t.plan(2);
2556
- config = new src_1.ServicesConfig();
2557
- config.merchantId = "heartlandgpsandbox";
2558
- config.accountId = "api";
2559
- config.sharedSecret = "secret";
2560
- config.refundPassword = "refund";
2561
- config.rebatePassword = "rebate";
2562
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2563
- config.timeout = 20000;
2564
- src_1.ServicesContainer.configure(config);
2565
- card = new src_1.CreditCardData();
2566
- card.number = "4263970000005262";
2567
- card.expMonth = "12";
2568
- card.expYear = "2020";
2569
- card.cvn = "123";
2570
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2571
- card.cardHolderName = "James Mason";
2572
- return [4 /*yield*/, card
2573
- .charge(100.01)
2574
- .withCurrency("GBP")
2575
- .withDescription("JAVA-Auth-022b")
2576
- .execute()];
2577
- case 1:
2578
- response = _a.sent();
2579
- t.truthy(response);
2580
- t.is("00", response.responseCode);
2581
- return [2 /*return*/];
2582
- }
2583
- });
2584
- }); });
2585
- ava_1.default("JAVA_Auth_022c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2586
- var config, card, response;
2587
- return __generator(this, function (_a) {
2588
- switch (_a.label) {
2589
- case 0:
2590
- t.plan(2);
2591
- config = new src_1.ServicesConfig();
2592
- config.merchantId = "heartlandgpsandbox";
2593
- config.accountId = "api";
2594
- config.sharedSecret = "secret";
2595
- config.refundPassword = "refund";
2596
- config.rebatePassword = "rebate";
2597
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2598
- config.timeout = 20000;
2599
- src_1.ServicesContainer.configure(config);
2600
- card = new src_1.CreditCardData();
2601
- card.number = "4263970000005262";
2602
- card.expMonth = "12";
2603
- card.expYear = "2020";
2604
- card.cvn = "123";
2605
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2606
- card.cardHolderName = "James Mason";
2607
- return [4 /*yield*/, card
2608
- .charge(100.01)
2609
- .withCurrency("GBP")
2610
- .withDescription("JAVA-Auth-022c")
2611
- .execute()];
2612
- case 1:
2613
- response = _a.sent();
2614
- t.truthy(response);
2615
- t.is("00", response.responseCode);
2616
- return [2 /*return*/];
2617
- }
2618
- });
2619
- }); });
2620
- ava_1.default("JAVA_Auth_022d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2621
- var config, card, response;
2622
- return __generator(this, function (_a) {
2623
- switch (_a.label) {
2624
- case 0:
2625
- t.plan(2);
2626
- config = new src_1.ServicesConfig();
2627
- config.merchantId = "heartlandgpsandbox";
2628
- config.accountId = "api";
2629
- config.sharedSecret = "secret";
2630
- config.refundPassword = "refund";
2631
- config.rebatePassword = "rebate";
2632
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2633
- config.timeout = 20000;
2634
- src_1.ServicesContainer.configure(config);
2635
- card = new src_1.CreditCardData();
2636
- card.number = "4263970000005262";
2637
- card.expMonth = "12";
2638
- card.expYear = "2020";
2639
- card.cvn = "123";
2640
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2641
- card.cardHolderName = "James Mason";
2642
- return [4 /*yield*/, card
2643
- .charge(100.01)
2644
- .withCurrency("GBP")
2645
- .withDescription("JAVA-Auth-022d")
2646
- .execute()];
2647
- case 1:
2648
- response = _a.sent();
2649
- t.truthy(response);
2650
- t.is("00", response.responseCode);
2651
- return [2 /*return*/];
2652
- }
2653
- });
2654
- }); });
2655
- ava_1.default("JAVA_Auth_022e", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2656
- var config, card, response;
2657
- return __generator(this, function (_a) {
2658
- switch (_a.label) {
2659
- case 0:
2660
- t.plan(2);
2661
- config = new src_1.ServicesConfig();
2662
- config.merchantId = "heartlandgpsandbox";
2663
- config.accountId = "api";
2664
- config.sharedSecret = "secret";
2665
- config.refundPassword = "refund";
2666
- config.rebatePassword = "rebate";
2667
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2668
- config.timeout = 20000;
2669
- src_1.ServicesContainer.configure(config);
2670
- card = new src_1.CreditCardData();
2671
- card.number = "4263970000005262";
2672
- card.expMonth = "12";
2673
- card.expYear = "2020";
2674
- card.cvn = "123";
2675
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2676
- card.cardHolderName = "James Mason";
2677
- return [4 /*yield*/, card
2678
- .charge(100.01)
2679
- .withCurrency("GBP")
2680
- .withDescription("JAVA-Auth-022e")
2681
- .execute()];
2682
- case 1:
2683
- response = _a.sent();
2684
- t.truthy(response);
2685
- t.is("00", response.responseCode);
2686
- return [2 /*return*/];
2687
- }
2688
- });
2689
- }); });
2690
- ava_1.default("JAVA_Auth_023a1", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2691
- var config, card, response;
2692
- return __generator(this, function (_a) {
2693
- switch (_a.label) {
2694
- case 0:
2695
- t.plan(2);
2696
- config = new src_1.ServicesConfig();
2697
- config.merchantId = "heartlandgpsandbox";
2698
- config.accountId = "api";
2699
- config.sharedSecret = "secret";
2700
- config.refundPassword = "refund";
2701
- config.rebatePassword = "rebate";
2702
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2703
- config.timeout = 20000;
2704
- src_1.ServicesContainer.configure(config);
2705
- card = new src_1.CreditCardData();
2706
- card.number = "4263970000005262";
2707
- card.expMonth = "12";
2708
- card.expYear = "2020";
2709
- card.cvn = "123";
2710
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2711
- card.cardHolderName = "James Mason";
2712
- return [4 /*yield*/, card
2713
- .charge(100.01)
2714
- .withCurrency("EUR")
2715
- .withDescription("JAVA-Auth-023a1")
2716
- .execute()];
2717
- case 1:
2718
- response = _a.sent();
2719
- t.truthy(response);
2720
- t.is("00", response.responseCode);
2721
- return [2 /*return*/];
2722
- }
2723
- });
2724
- }); });
2725
- ava_1.default("JAVA_Auth_023a2", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2726
- var config, card, response;
2727
- return __generator(this, function (_a) {
2728
- switch (_a.label) {
2729
- case 0:
2730
- t.plan(2);
2731
- config = new src_1.ServicesConfig();
2732
- config.merchantId = "heartlandgpsandbox";
2733
- config.accountId = "api";
2734
- config.sharedSecret = "secret";
2735
- config.refundPassword = "refund";
2736
- config.rebatePassword = "rebate";
2737
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2738
- config.timeout = 20000;
2739
- src_1.ServicesContainer.configure(config);
2740
- card = new src_1.CreditCardData();
2741
- card.number = "4263970000005262";
2742
- card.expMonth = "12";
2743
- card.expYear = "2020";
2744
- card.cvn = "123";
2745
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2746
- card.cardHolderName = "James Mason";
2747
- return [4 /*yield*/, card
2748
- .charge(100.01)
2749
- .withCurrency("USD")
2750
- .withDescription("JAVA-Auth-023a2")
2751
- .execute()];
2752
- case 1:
2753
- response = _a.sent();
2754
- t.truthy(response);
2755
- t.is("00", response.responseCode);
2756
- return [2 /*return*/];
2757
- }
2758
- });
2759
- }); });
2760
- ava_1.default("JAVA_Auth_023b1", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2761
- var config, card, response;
2762
- return __generator(this, function (_a) {
2763
- switch (_a.label) {
2764
- case 0:
2765
- t.plan(2);
2766
- config = new src_1.ServicesConfig();
2767
- config.merchantId = "heartlandgpsandbox";
2768
- config.accountId = "api";
2769
- config.sharedSecret = "secret";
2770
- config.refundPassword = "refund";
2771
- config.rebatePassword = "rebate";
2772
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2773
- config.timeout = 20000;
2774
- src_1.ServicesContainer.configure(config);
2775
- card = new src_1.CreditCardData();
2776
- card.number = "4263970000005262";
2777
- card.expMonth = "12";
2778
- card.expYear = "2020";
2779
- card.cvn = "123";
2780
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2781
- card.cardHolderName = "James Mason";
2782
- return [4 /*yield*/, card
2783
- .charge(100.01)
2784
- .withCurrency("GBP")
2785
- .withDescription("JAVA-Auth-023b1")
2786
- .execute()];
2787
- case 1:
2788
- response = _a.sent();
2789
- t.truthy(response);
2790
- t.is("00", response.responseCode);
2791
- return [2 /*return*/];
2792
- }
2793
- });
2794
- }); });
2795
- ava_1.default("JAVA_Auth_023c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2796
- var config, card, response;
2797
- return __generator(this, function (_a) {
2798
- switch (_a.label) {
2799
- case 0:
2800
- t.plan(2);
2801
- config = new src_1.ServicesConfig();
2802
- config.merchantId = "heartlandgpsandbox";
2803
- config.accountId = "api";
2804
- config.sharedSecret = "secret";
2805
- config.refundPassword = "refund";
2806
- config.rebatePassword = "rebate";
2807
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2808
- config.timeout = 20000;
2809
- src_1.ServicesContainer.configure(config);
2810
- card = new src_1.CreditCardData();
2811
- card.number = "4263970000005262";
2812
- card.expMonth = "12";
2813
- card.expYear = "2020";
2814
- card.cvn = "123";
2815
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2816
- card.cardHolderName = "James Mason";
2817
- return [4 /*yield*/, card
2818
- .charge(100.01)
2819
- .withCurrency("GBP")
2820
- .withDescription("JAVA-Auth-023c")
2821
- .execute()];
2822
- case 1:
2823
- response = _a.sent();
2824
- t.truthy(response);
2825
- t.is("00", response.responseCode);
2826
- return [2 /*return*/];
2827
- }
2828
- });
2829
- }); });
2830
- ava_1.default("JAVA_Auth_024a1", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2831
- var config, card, response;
2832
- return __generator(this, function (_a) {
2833
- switch (_a.label) {
2834
- case 0:
2835
- t.plan(2);
2836
- config = new src_1.ServicesConfig();
2837
- config.merchantId = "heartlandgpsandbox";
2838
- config.accountId = "api";
2839
- config.sharedSecret = "secret";
2840
- config.refundPassword = "refund";
2841
- config.rebatePassword = "rebate";
2842
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2843
- config.timeout = 20000;
2844
- src_1.ServicesContainer.configure(config);
2845
- card = new src_1.CreditCardData();
2846
- card.number = "4263970000005262";
2847
- card.expMonth = "12";
2848
- card.expYear = "2020";
2849
- card.cvn = "123";
2850
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2851
- card.cardHolderName = "James Mason";
2852
- return [4 /*yield*/, card
2853
- .charge(100.01)
2854
- .withCurrency("EUR")
2855
- .withDescription("JAVA-Auth-024a1")
2856
- .execute()];
2857
- case 1:
2858
- response = _a.sent();
2859
- t.truthy(response);
2860
- t.is("00", response.responseCode);
2861
- return [2 /*return*/];
2862
- }
2863
- });
2864
- }); });
2865
- ava_1.default("JAVA_Auth_024a2", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2866
- var config, card, response;
2867
- return __generator(this, function (_a) {
2868
- switch (_a.label) {
2869
- case 0:
2870
- t.plan(2);
2871
- config = new src_1.ServicesConfig();
2872
- config.merchantId = "heartlandgpsandbox";
2873
- config.accountId = "api";
2874
- config.sharedSecret = "secret";
2875
- config.refundPassword = "refund";
2876
- config.rebatePassword = "rebate";
2877
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2878
- config.timeout = 20000;
2879
- src_1.ServicesContainer.configure(config);
2880
- card = new src_1.CreditCardData();
2881
- card.number = "4263970000005262";
2882
- card.expMonth = "12";
2883
- card.expYear = "2020";
2884
- card.cvn = "123";
2885
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2886
- card.cardHolderName = "James Mason";
2887
- return [4 /*yield*/, card
2888
- .charge(100.01)
2889
- .withCurrency("USD")
2890
- .withDescription("JAVA-Auth-024a2")
2891
- .execute()];
2892
- case 1:
2893
- response = _a.sent();
2894
- t.truthy(response);
2895
- t.is("00", response.responseCode);
2896
- return [2 /*return*/];
2897
- }
2898
- });
2899
- }); });
2900
- ava_1.default("JAVA_Auth_024a3", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2901
- var config, card, response;
2902
- return __generator(this, function (_a) {
2903
- switch (_a.label) {
2904
- case 0:
2905
- t.plan(2);
2906
- config = new src_1.ServicesConfig();
2907
- config.merchantId = "heartlandgpsandbox";
2908
- config.accountId = "api";
2909
- config.sharedSecret = "secret";
2910
- config.refundPassword = "refund";
2911
- config.rebatePassword = "rebate";
2912
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2913
- config.timeout = 20000;
2914
- src_1.ServicesContainer.configure(config);
2915
- card = new src_1.CreditCardData();
2916
- card.number = "4263970000005262";
2917
- card.expMonth = "12";
2918
- card.expYear = "2020";
2919
- card.cvn = "123";
2920
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2921
- card.cardHolderName = "James Mason";
2922
- return [4 /*yield*/, card
2923
- .charge(100.01)
2924
- .withCurrency("GBP")
2925
- .withDescription("JAVA-Auth-024a3")
2926
- .execute()];
2927
- case 1:
2928
- response = _a.sent();
2929
- t.truthy(response);
2930
- t.is("00", response.responseCode);
2931
- return [2 /*return*/];
2932
- }
2933
- });
2934
- }); });
2935
- ava_1.default("JAVA_Auth_024b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2936
- var config, card, response;
2937
- return __generator(this, function (_a) {
2938
- switch (_a.label) {
2939
- case 0:
2940
- t.plan(2);
2941
- config = new src_1.ServicesConfig();
2942
- config.merchantId = "heartlandgpsandbox";
2943
- config.accountId = "api";
2944
- config.sharedSecret = "secret";
2945
- config.refundPassword = "refund";
2946
- config.rebatePassword = "rebate";
2947
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2948
- config.timeout = 20000;
2949
- src_1.ServicesContainer.configure(config);
2950
- card = new src_1.CreditCardData();
2951
- card.number = "4263970000005262";
2952
- card.expMonth = "12";
2953
- card.expYear = "2020";
2954
- card.cvn = "123";
2955
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2956
- card.cardHolderName = "James Mason";
2957
- return [4 /*yield*/, card
2958
- .charge(100.01)
2959
- .withCurrency("EUR")
2960
- .withDescription("JAVA-Auth-024b")
2961
- .execute()];
2962
- case 1:
2963
- response = _a.sent();
2964
- t.truthy(response);
2965
- t.is("00", response.responseCode);
2966
- return [2 /*return*/];
2967
- }
2968
- });
2969
- }); });
2970
- ava_1.default("JAVA_Auth_024c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
2971
- var config, card, response;
2972
- return __generator(this, function (_a) {
2973
- switch (_a.label) {
2974
- case 0:
2975
- t.plan(2);
2976
- config = new src_1.ServicesConfig();
2977
- config.merchantId = "heartlandgpsandbox";
2978
- config.accountId = "api";
2979
- config.sharedSecret = "secret";
2980
- config.refundPassword = "refund";
2981
- config.rebatePassword = "rebate";
2982
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
2983
- config.timeout = 20000;
2984
- src_1.ServicesContainer.configure(config);
2985
- card = new src_1.CreditCardData();
2986
- card.number = "4263970000005262";
2987
- card.expMonth = "12";
2988
- card.expYear = "2020";
2989
- card.cvn = "123";
2990
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2991
- card.cardHolderName = "James Mason";
2992
- return [4 /*yield*/, card
2993
- .charge(100.01)
2994
- .withCurrency("USD")
2995
- .withDescription("JAVA-Auth-024c")
2996
- .execute()];
2997
- case 1:
2998
- response = _a.sent();
2999
- t.truthy(response);
3000
- t.is("00", response.responseCode);
3001
- return [2 /*return*/];
3002
- }
3003
- });
3004
- }); });
3005
- ava_1.default("JAVA_Auth_025", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3006
- var config, card, response;
3007
- return __generator(this, function (_a) {
3008
- switch (_a.label) {
3009
- case 0:
3010
- t.plan(2);
3011
- config = new src_1.ServicesConfig();
3012
- config.merchantId = "heartlandgpsandbox";
3013
- config.accountId = "api";
3014
- config.sharedSecret = "secret";
3015
- config.refundPassword = "refund";
3016
- config.rebatePassword = "rebate";
3017
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3018
- config.timeout = 20000;
3019
- src_1.ServicesContainer.configure(config);
3020
- card = new src_1.CreditCardData();
3021
- card.number = "4263970000005262";
3022
- card.expMonth = "12";
3023
- card.expYear = "2020";
3024
- card.cvn = "123";
3025
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3026
- card.cardHolderName = "James Mason";
3027
- return [4 /*yield*/, card
3028
- .charge(100.01)
3029
- .withCurrency("GBP")
3030
- .withDescription("JAVA-Auth-025")
3031
- .execute()];
3032
- case 1:
3033
- response = _a.sent();
3034
- t.truthy(response);
3035
- t.is("00", response.responseCode);
3036
- return [2 /*return*/];
3037
- }
3038
- });
3039
- }); });
3040
- ava_1.default("JAVA_Auth_026a1", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3041
- var config, card, response;
3042
- return __generator(this, function (_a) {
3043
- switch (_a.label) {
3044
- case 0:
3045
- t.plan(2);
3046
- config = new src_1.ServicesConfig();
3047
- config.merchantId = "heartlandgpsandbox";
3048
- config.accountId = "api";
3049
- config.sharedSecret = "secret";
3050
- config.refundPassword = "refund";
3051
- config.rebatePassword = "rebate";
3052
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3053
- config.timeout = 20000;
3054
- src_1.ServicesContainer.configure(config);
3055
- card = new src_1.CreditCardData();
3056
- card.number = "4263970000005262";
3057
- card.expMonth = "12";
3058
- card.expYear = "2020";
3059
- card.cvn = "123";
3060
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3061
- card.cardHolderName = "James Mason";
3062
- return [4 /*yield*/, card
3063
- .charge(100.01)
3064
- .withCurrency("EUR")
3065
- .withDescription("JAVA-Auth-026a1")
3066
- .execute()];
3067
- case 1:
3068
- response = _a.sent();
3069
- t.truthy(response);
3070
- t.is("00", response.responseCode);
3071
- return [2 /*return*/];
3072
- }
3073
- });
3074
- }); });
3075
- ava_1.default("JAVA_Auth_026a2", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3076
- var config, card, response;
3077
- return __generator(this, function (_a) {
3078
- switch (_a.label) {
3079
- case 0:
3080
- t.plan(2);
3081
- config = new src_1.ServicesConfig();
3082
- config.merchantId = "heartlandgpsandbox";
3083
- config.accountId = "api";
3084
- config.sharedSecret = "secret";
3085
- config.refundPassword = "refund";
3086
- config.rebatePassword = "rebate";
3087
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3088
- config.timeout = 20000;
3089
- src_1.ServicesContainer.configure(config);
3090
- card = new src_1.CreditCardData();
3091
- card.number = "4263970000005262";
3092
- card.expMonth = "12";
3093
- card.expYear = "2020";
3094
- card.cvn = "123";
3095
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3096
- card.cardHolderName = "James Mason";
3097
- return [4 /*yield*/, card
3098
- .charge(100.01)
3099
- .withCurrency("EUR")
3100
- .execute()];
3101
- case 1:
3102
- response = _a.sent();
3103
- t.truthy(response);
3104
- t.is("00", response.responseCode);
3105
- return [2 /*return*/];
3106
- }
3107
- });
3108
- }); });
3109
- ava_1.default("JAVA_Auth_026b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3110
- var config, card, response;
3111
- return __generator(this, function (_a) {
3112
- switch (_a.label) {
3113
- case 0:
3114
- t.plan(2);
3115
- config = new src_1.ServicesConfig();
3116
- config.merchantId = "heartlandgpsandbox";
3117
- config.accountId = "api";
3118
- config.sharedSecret = "secret";
3119
- config.refundPassword = "refund";
3120
- config.rebatePassword = "rebate";
3121
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3122
- config.timeout = 20000;
3123
- src_1.ServicesContainer.configure(config);
3124
- card = new src_1.CreditCardData();
3125
- card.number = "4263970000005262";
3126
- card.expMonth = "12";
3127
- card.expYear = "2020";
3128
- card.cvn = "123";
3129
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3130
- card.cardHolderName = "James Mason";
3131
- return [4 /*yield*/, card
3132
- .charge(100.01)
3133
- .withCurrency("USD")
3134
- .execute()];
3135
- case 1:
3136
- response = _a.sent();
3137
- t.truthy(response);
3138
- t.is("00", response.responseCode);
3139
- return [2 /*return*/];
3140
- }
3141
- });
3142
- }); });
3143
- ava_1.default("JAVA_Auth_026c1", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3144
- var config, card, response;
3145
- return __generator(this, function (_a) {
3146
- switch (_a.label) {
3147
- case 0:
3148
- t.plan(2);
3149
- config = new src_1.ServicesConfig();
3150
- config.merchantId = "heartlandgpsandbox";
3151
- config.accountId = "api";
3152
- config.sharedSecret = "secret";
3153
- config.refundPassword = "refund";
3154
- config.rebatePassword = "rebate";
3155
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3156
- config.timeout = 20000;
3157
- src_1.ServicesContainer.configure(config);
3158
- card = new src_1.CreditCardData();
3159
- card.number = "4263970000005262";
3160
- card.expMonth = "12";
3161
- card.expYear = "2020";
3162
- card.cvn = "123";
3163
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3164
- card.cardHolderName = "James Mason";
3165
- return [4 /*yield*/, card
3166
- .charge(100.01)
3167
- .withCurrency("GBP")
3168
- // tslint:disable:max-line-length
3169
- .withDescription("3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIep3uviSnW9XEB3a4wpIW9XEB3a")
3170
- // tslint:enable:max-line-length
3171
- .execute()];
3172
- case 1:
3173
- response = _a.sent();
3174
- t.truthy(response);
3175
- t.is("00", response.responseCode);
3176
- return [2 /*return*/];
3177
- }
3178
- });
3179
- }); });
3180
- ava_1.default("JAVA_Auth_026c2", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3181
- var config, card, response;
3182
- return __generator(this, function (_a) {
3183
- switch (_a.label) {
3184
- case 0:
3185
- t.plan(2);
3186
- config = new src_1.ServicesConfig();
3187
- config.merchantId = "heartlandgpsandbox";
3188
- config.accountId = "api";
3189
- config.sharedSecret = "secret";
3190
- config.refundPassword = "refund";
3191
- config.rebatePassword = "rebate";
3192
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3193
- config.timeout = 20000;
3194
- src_1.ServicesContainer.configure(config);
3195
- card = new src_1.CreditCardData();
3196
- card.number = "4263970000005262";
3197
- card.expMonth = "12";
3198
- card.expYear = "2020";
3199
- card.cvn = "123";
3200
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3201
- card.cardHolderName = "James Mason";
3202
- return [4 /*yield*/, card
3203
- .charge(100.01)
3204
- .withCurrency("EUR")
3205
- .withDescription("JAVA-Auth-026c2")
3206
- .execute()];
3207
- case 1:
3208
- response = _a.sent();
3209
- t.truthy(response);
3210
- t.is("00", response.responseCode);
3211
- return [2 /*return*/];
3212
- }
3213
- });
3214
- }); });
3215
- ava_1.default("JAVA_Auth_027a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3216
- var config, card, response;
3217
- return __generator(this, function (_a) {
3218
- switch (_a.label) {
3219
- case 0:
3220
- t.plan(2);
3221
- config = new src_1.ServicesConfig();
3222
- config.merchantId = "heartlandgpsandbox";
3223
- config.accountId = "api";
3224
- config.sharedSecret = "secret";
3225
- config.refundPassword = "refund";
3226
- config.rebatePassword = "rebate";
3227
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3228
- config.timeout = 20000;
3229
- src_1.ServicesContainer.configure(config);
3230
- card = new src_1.CreditCardData();
3231
- card.number = "4263970000005262";
3232
- card.expMonth = "12";
3233
- card.expYear = "2020";
3234
- card.cvn = "123";
3235
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3236
- card.cardHolderName = "James Mason";
3237
- return [4 /*yield*/, card
3238
- .charge(100.01)
3239
- .withCurrency("USD")
3240
- .withCustomerId("123456")
3241
- .withDescription("JAVA-Auth-027a")
3242
- .execute()];
3243
- case 1:
3244
- response = _a.sent();
3245
- t.truthy(response);
3246
- t.is("00", response.responseCode);
3247
- return [2 /*return*/];
3248
- }
3249
- });
3250
- }); });
3251
- ava_1.default("JAVA_Auth_028a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3252
- var config, card, response;
3253
- return __generator(this, function (_a) {
3254
- switch (_a.label) {
3255
- case 0:
3256
- t.plan(2);
3257
- config = new src_1.ServicesConfig();
3258
- config.merchantId = "heartlandgpsandbox";
3259
- config.accountId = "api";
3260
- config.sharedSecret = "secret";
3261
- config.refundPassword = "refund";
3262
- config.rebatePassword = "rebate";
3263
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3264
- config.timeout = 20000;
3265
- src_1.ServicesContainer.configure(config);
3266
- card = new src_1.CreditCardData();
3267
- card.number = "4263970000005262";
3268
- card.expMonth = "12";
3269
- card.expYear = "2020";
3270
- card.cvn = "123";
3271
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3272
- card.cardHolderName = "James Mason";
3273
- return [4 /*yield*/, card
3274
- .charge(100.01)
3275
- .withCurrency("GBP")
3276
- .withCustomerId("123456")
3277
- .withDescription("JAVA-Auth-028a")
3278
- .execute()];
3279
- case 1:
3280
- response = _a.sent();
3281
- t.truthy(response);
3282
- t.is("00", response.responseCode);
3283
- return [2 /*return*/];
3284
- }
3285
- });
3286
- }); });
3287
- ava_1.default("JAVA_Auth_028b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3288
- var config, card, response;
3289
- return __generator(this, function (_a) {
3290
- switch (_a.label) {
3291
- case 0:
3292
- t.plan(2);
3293
- config = new src_1.ServicesConfig();
3294
- config.merchantId = "heartlandgpsandbox";
3295
- config.accountId = "api";
3296
- config.sharedSecret = "secret";
3297
- config.refundPassword = "refund";
3298
- config.rebatePassword = "rebate";
3299
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3300
- config.timeout = 20000;
3301
- src_1.ServicesContainer.configure(config);
3302
- card = new src_1.CreditCardData();
3303
- card.number = "4263970000005262";
3304
- card.expMonth = "12";
3305
- card.expYear = "2020";
3306
- card.cvn = "123";
3307
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3308
- card.cardHolderName = "James Mason";
3309
- return [4 /*yield*/, card
3310
- .charge(100.01)
3311
- .withCurrency("EUR")
3312
- .withDescription("JAVA-Auth-028b")
3313
- .execute()];
3314
- case 1:
3315
- response = _a.sent();
3316
- t.truthy(response);
3317
- t.is("00", response.responseCode);
3318
- return [2 /*return*/];
3319
- }
3320
- });
3321
- }); });
3322
- ava_1.default("JAVA_Auth_028c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3323
- var config, card, error;
3324
- return __generator(this, function (_a) {
3325
- switch (_a.label) {
3326
- case 0:
3327
- t.plan(2);
3328
- config = new src_1.ServicesConfig();
3329
- config.merchantId = "heartlandgpsandbox";
3330
- config.accountId = "api";
3331
- config.sharedSecret = "secret";
3332
- config.refundPassword = "refund";
3333
- config.rebatePassword = "rebate";
3334
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3335
- config.timeout = 20000;
3336
- src_1.ServicesContainer.configure(config);
3337
- card = new src_1.CreditCardData();
3338
- card.number = "4263970000005262";
3339
- card.expMonth = "12";
3340
- card.expYear = "2020";
3341
- card.cvn = "123";
3342
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3343
- card.cardHolderName = "James Mason";
3344
- return [4 /*yield*/, t.throws(card
3345
- .charge(100.01)
3346
- .withCurrency("USD")
3347
- // tslint:disable:max-line-length
3348
- .withCustomerId("3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep33a4wpQQQQQQQQQ1")
3349
- // tslint:enable:max-line-length
3350
- .withDescription("JAVA-Auth-028c")
3351
- .execute(), src_1.GatewayError)];
3352
- case 1:
3353
- error = _a.sent();
3354
- t.truthy(error.message);
3355
- return [2 /*return*/];
3356
- }
3357
- });
3358
- }); });
3359
- ava_1.default("JAVA_Auth_028d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3360
- var config, card, error;
3361
- return __generator(this, function (_a) {
3362
- switch (_a.label) {
3363
- case 0:
3364
- t.plan(2);
3365
- config = new src_1.ServicesConfig();
3366
- config.merchantId = "heartlandgpsandbox";
3367
- config.accountId = "api";
3368
- config.sharedSecret = "secret";
3369
- config.refundPassword = "refund";
3370
- config.rebatePassword = "rebate";
3371
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3372
- config.timeout = 20000;
3373
- src_1.ServicesContainer.configure(config);
3374
- card = new src_1.CreditCardData();
3375
- card.number = "4263970000005262";
3376
- card.expMonth = "12";
3377
- card.expYear = "2020";
3378
- card.cvn = "123";
3379
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3380
- card.cardHolderName = "James Mason";
3381
- return [4 /*yield*/, t.throws(card
3382
- .charge(100.01)
3383
- .withCurrency("GBP")
3384
- .withCustomerId("123456~")
3385
- .withDescription("JAVA-Auth-028d")
3386
- .execute(), src_1.GatewayError)];
3387
- case 1:
3388
- error = _a.sent();
3389
- t.truthy(error.message);
3390
- return [2 /*return*/];
3391
- }
3392
- });
3393
- }); });
3394
- ava_1.default("JAVA_Auth_029a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3395
- var config, card, response;
3396
- return __generator(this, function (_a) {
3397
- switch (_a.label) {
3398
- case 0:
3399
- t.plan(2);
3400
- config = new src_1.ServicesConfig();
3401
- config.merchantId = "heartlandgpsandbox";
3402
- config.accountId = "api";
3403
- config.sharedSecret = "secret";
3404
- config.refundPassword = "refund";
3405
- config.rebatePassword = "rebate";
3406
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3407
- config.timeout = 20000;
3408
- src_1.ServicesContainer.configure(config);
3409
- card = new src_1.CreditCardData();
3410
- card.number = "4263970000005262";
3411
- card.expMonth = "12";
3412
- card.expYear = "2020";
3413
- card.cvn = "123";
3414
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3415
- card.cardHolderName = "James Mason";
3416
- return [4 /*yield*/, card
3417
- .charge(100.01)
3418
- .withCurrency("EUR")
3419
- .withProductId("123456")
3420
- .withDescription("JAVA-Auth-029a")
3421
- .execute()];
3422
- case 1:
3423
- response = _a.sent();
3424
- t.truthy(response);
3425
- t.is("00", response.responseCode);
3426
- return [2 /*return*/];
3427
- }
3428
- });
3429
- }); });
3430
- ava_1.default("JAVA_Auth_029b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3431
- var config, card, response;
3432
- return __generator(this, function (_a) {
3433
- switch (_a.label) {
3434
- case 0:
3435
- t.plan(2);
3436
- config = new src_1.ServicesConfig();
3437
- config.merchantId = "heartlandgpsandbox";
3438
- config.accountId = "api";
3439
- config.sharedSecret = "secret";
3440
- config.refundPassword = "refund";
3441
- config.rebatePassword = "rebate";
3442
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3443
- config.timeout = 20000;
3444
- src_1.ServicesContainer.configure(config);
3445
- card = new src_1.CreditCardData();
3446
- card.number = "4263970000005262";
3447
- card.expMonth = "12";
3448
- card.expYear = "2020";
3449
- card.cvn = "123";
3450
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3451
- card.cardHolderName = "James Mason";
3452
- return [4 /*yield*/, card
3453
- .charge(100.01)
3454
- .withCurrency("USD")
3455
- .withDescription("JAVA-Auth-029b")
3456
- .execute()];
3457
- case 1:
3458
- response = _a.sent();
3459
- t.truthy(response);
3460
- t.is("00", response.responseCode);
3461
- return [2 /*return*/];
3462
- }
3463
- });
3464
- }); });
3465
- ava_1.default("JAVA_Auth_029c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3466
- var config, card, error;
3467
- return __generator(this, function (_a) {
3468
- switch (_a.label) {
3469
- case 0:
3470
- t.plan(2);
3471
- config = new src_1.ServicesConfig();
3472
- config.merchantId = "heartlandgpsandbox";
3473
- config.accountId = "api";
3474
- config.sharedSecret = "secret";
3475
- config.refundPassword = "refund";
3476
- config.rebatePassword = "rebate";
3477
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3478
- config.timeout = 20000;
3479
- src_1.ServicesContainer.configure(config);
3480
- card = new src_1.CreditCardData();
3481
- card.number = "4263970000005262";
3482
- card.expMonth = "12";
3483
- card.expYear = "2020";
3484
- card.cvn = "123";
3485
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3486
- card.cardHolderName = "James Mason";
3487
- return [4 /*yield*/, t.throws(card
3488
- .charge(100.01)
3489
- .withCurrency("GBP")
3490
- // tslint:disable:max-line-length
3491
- .withProductId("3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep33a4wpQQQQQQQQQ1")
3492
- // tslint:enable:max-line-length
3493
- .withDescription("JAVA-Auth-029c")
3494
- .execute(), src_1.GatewayError)];
3495
- case 1:
3496
- error = _a.sent();
3497
- t.truthy(error.message);
3498
- return [2 /*return*/];
3499
- }
3500
- });
3501
- }); });
3502
- ava_1.default("JAVA_Auth_029d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3503
- var config, card, error;
3504
- return __generator(this, function (_a) {
3505
- switch (_a.label) {
3506
- case 0:
3507
- t.plan(2);
3508
- config = new src_1.ServicesConfig();
3509
- config.merchantId = "heartlandgpsandbox";
3510
- config.accountId = "api";
3511
- config.sharedSecret = "secret";
3512
- config.refundPassword = "refund";
3513
- config.rebatePassword = "rebate";
3514
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3515
- config.timeout = 20000;
3516
- src_1.ServicesContainer.configure(config);
3517
- card = new src_1.CreditCardData();
3518
- card.number = "4263970000005262";
3519
- card.expMonth = "12";
3520
- card.expYear = "2020";
3521
- card.cvn = "123";
3522
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3523
- card.cardHolderName = "James Mason";
3524
- return [4 /*yield*/, t.throws(card
3525
- .charge(100.01)
3526
- .withCurrency("EUR")
3527
- .withProductId("123456~")
3528
- .withDescription("JAVA-Auth-029d")
3529
- .execute(), src_1.GatewayError)];
3530
- case 1:
3531
- error = _a.sent();
3532
- t.truthy(error.message);
3533
- return [2 /*return*/];
3534
- }
3535
- });
3536
- }); });
3537
- ava_1.default("JAVA_Auth_030a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3538
- var config, card, response;
3539
- return __generator(this, function (_a) {
3540
- switch (_a.label) {
3541
- case 0:
3542
- t.plan(2);
3543
- config = new src_1.ServicesConfig();
3544
- config.merchantId = "heartlandgpsandbox";
3545
- config.accountId = "api";
3546
- config.sharedSecret = "secret";
3547
- config.refundPassword = "refund";
3548
- config.rebatePassword = "rebate";
3549
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3550
- config.timeout = 20000;
3551
- src_1.ServicesContainer.configure(config);
3552
- card = new src_1.CreditCardData();
3553
- card.number = "4263970000005262";
3554
- card.expMonth = "12";
3555
- card.expYear = "2020";
3556
- card.cvn = "123";
3557
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3558
- card.cardHolderName = "James Mason";
3559
- return [4 /*yield*/, card
3560
- .charge(100.01)
3561
- .withCurrency("USD")
3562
- .withClientTransactionId("123456")
3563
- .withDescription("JAVA-Auth-030a")
3564
- .execute()];
3565
- case 1:
3566
- response = _a.sent();
3567
- t.truthy(response);
3568
- t.is("00", response.responseCode);
3569
- return [2 /*return*/];
3570
- }
3571
- });
3572
- }); });
3573
- ava_1.default("JAVA_Auth_030b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3574
- var config, card, response;
3575
- return __generator(this, function (_a) {
3576
- switch (_a.label) {
3577
- case 0:
3578
- t.plan(2);
3579
- config = new src_1.ServicesConfig();
3580
- config.merchantId = "heartlandgpsandbox";
3581
- config.accountId = "api";
3582
- config.sharedSecret = "secret";
3583
- config.refundPassword = "refund";
3584
- config.rebatePassword = "rebate";
3585
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3586
- config.timeout = 20000;
3587
- src_1.ServicesContainer.configure(config);
3588
- card = new src_1.CreditCardData();
3589
- card.number = "4263970000005262";
3590
- card.expMonth = "12";
3591
- card.expYear = "2020";
3592
- card.cvn = "123";
3593
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3594
- card.cardHolderName = "James Mason";
3595
- return [4 /*yield*/, card
3596
- .charge(100.01)
3597
- .withCurrency("GBP")
3598
- .withDescription("JAVA-Auth-030b")
3599
- .execute()];
3600
- case 1:
3601
- response = _a.sent();
3602
- t.truthy(response);
3603
- t.is("00", response.responseCode);
3604
- return [2 /*return*/];
3605
- }
3606
- });
3607
- }); });
3608
- ava_1.default("JAVA_Auth_030c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3609
- var config, card, error;
3610
- return __generator(this, function (_a) {
3611
- switch (_a.label) {
3612
- case 0:
3613
- t.plan(2);
3614
- config = new src_1.ServicesConfig();
3615
- config.merchantId = "heartlandgpsandbox";
3616
- config.accountId = "api";
3617
- config.sharedSecret = "secret";
3618
- config.refundPassword = "refund";
3619
- config.rebatePassword = "rebate";
3620
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3621
- config.timeout = 20000;
3622
- src_1.ServicesContainer.configure(config);
3623
- card = new src_1.CreditCardData();
3624
- card.number = "4263970000005262";
3625
- card.expMonth = "12";
3626
- card.expYear = "2020";
3627
- card.cvn = "123";
3628
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3629
- card.cardHolderName = "James Mason";
3630
- return [4 /*yield*/, t.throws(card
3631
- .charge(100.01)
3632
- .withCurrency("EUR")
3633
- // tslint:disable:max-line-length
3634
- .withClientTransactionId("3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwepeep3a4wpIwep3uviSnW9XEB3a4wpIwep33a4wpQQQQQQQQQ1")
3635
- // tslint:enable:max-line-length
3636
- .withDescription("JAVA-Auth-030c")
3637
- .execute(), src_1.GatewayError)];
3638
- case 1:
3639
- error = _a.sent();
3640
- t.truthy(error.message);
3641
- return [2 /*return*/];
3642
- }
3643
- });
3644
- }); });
3645
- ava_1.default("JAVA_Auth_030d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3646
- var config, card, error;
3647
- return __generator(this, function (_a) {
3648
- switch (_a.label) {
3649
- case 0:
3650
- t.plan(2);
3651
- config = new src_1.ServicesConfig();
3652
- config.merchantId = "heartlandgpsandbox";
3653
- config.accountId = "api";
3654
- config.sharedSecret = "secret";
3655
- config.refundPassword = "refund";
3656
- config.rebatePassword = "rebate";
3657
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3658
- config.timeout = 20000;
3659
- src_1.ServicesContainer.configure(config);
3660
- card = new src_1.CreditCardData();
3661
- card.number = "4263970000005262";
3662
- card.expMonth = "12";
3663
- card.expYear = "2020";
3664
- card.cvn = "123";
3665
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3666
- card.cardHolderName = "James Mason";
3667
- return [4 /*yield*/, t.throws(card
3668
- .charge(100.01)
3669
- .withCurrency("USD")
3670
- .withClientTransactionId("123456~")
3671
- .withDescription("JAVA-Auth-030d")
3672
- .execute(), src_1.GatewayError)];
3673
- case 1:
3674
- error = _a.sent();
3675
- t.truthy(error.message);
3676
- return [2 /*return*/];
3677
- }
3678
- });
3679
- }); });
3680
- ava_1.default("JAVA_Auth_031a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3681
- var config, card, response;
3682
- return __generator(this, function (_a) {
3683
- switch (_a.label) {
3684
- case 0:
3685
- t.plan(2);
3686
- config = new src_1.ServicesConfig();
3687
- config.merchantId = "heartlandgpsandbox";
3688
- config.accountId = "api";
3689
- config.sharedSecret = "secret";
3690
- config.refundPassword = "refund";
3691
- config.rebatePassword = "rebate";
3692
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3693
- config.timeout = 20000;
3694
- src_1.ServicesContainer.configure(config);
3695
- card = new src_1.CreditCardData();
3696
- card.number = "4263970000005262";
3697
- card.expMonth = "12";
3698
- card.expYear = "2020";
3699
- card.cvn = "123";
3700
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3701
- card.cardHolderName = "James Mason";
3702
- return [4 /*yield*/, card
3703
- .charge(100.01)
3704
- .withCurrency("GBP")
3705
- .withCustomerIpAddress("123.123.123.123")
3706
- .withDescription("JAVA-Auth-031a")
3707
- .execute()];
3708
- case 1:
3709
- response = _a.sent();
3710
- t.truthy(response);
3711
- t.is("00", response.responseCode);
3712
- return [2 /*return*/];
3713
- }
3714
- });
3715
- }); });
3716
- ava_1.default("JAVA_Auth_031b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3717
- var config, card, response;
3718
- return __generator(this, function (_a) {
3719
- switch (_a.label) {
3720
- case 0:
3721
- t.plan(2);
3722
- config = new src_1.ServicesConfig();
3723
- config.merchantId = "heartlandgpsandbox";
3724
- config.accountId = "api";
3725
- config.sharedSecret = "secret";
3726
- config.refundPassword = "refund";
3727
- config.rebatePassword = "rebate";
3728
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3729
- config.timeout = 20000;
3730
- src_1.ServicesContainer.configure(config);
3731
- card = new src_1.CreditCardData();
3732
- card.number = "4263970000005262";
3733
- card.expMonth = "12";
3734
- card.expYear = "2020";
3735
- card.cvn = "123";
3736
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3737
- card.cardHolderName = "James Mason";
3738
- return [4 /*yield*/, card
3739
- .charge(100.01)
3740
- .withCurrency("EUR")
3741
- .withDescription("JAVA-Auth-031b")
3742
- .execute()];
3743
- case 1:
3744
- response = _a.sent();
3745
- t.truthy(response);
3746
- t.is("00", response.responseCode);
3747
- return [2 /*return*/];
3748
- }
3749
- });
3750
- }); });
3751
- ava_1.default("JAVA_Auth_031c1", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3752
- var config, card, response;
3753
- return __generator(this, function (_a) {
3754
- switch (_a.label) {
3755
- case 0:
3756
- t.plan(2);
3757
- config = new src_1.ServicesConfig();
3758
- config.merchantId = "heartlandgpsandbox";
3759
- config.accountId = "api";
3760
- config.sharedSecret = "secret";
3761
- config.refundPassword = "refund";
3762
- config.rebatePassword = "rebate";
3763
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3764
- config.timeout = 20000;
3765
- src_1.ServicesContainer.configure(config);
3766
- card = new src_1.CreditCardData();
3767
- card.number = "4263970000005262";
3768
- card.expMonth = "12";
3769
- card.expYear = "2020";
3770
- card.cvn = "123";
3771
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3772
- card.cardHolderName = "James Mason";
3773
- return [4 /*yield*/, card
3774
- .charge(100.01)
3775
- .withCurrency("USD")
3776
- .withCustomerIpAddress("123.123.123.123")
3777
- .withDescription("JAVA-Auth-031c1")
3778
- .execute()];
3779
- case 1:
3780
- response = _a.sent();
3781
- t.truthy(response);
3782
- t.is("00", response.responseCode);
3783
- return [2 /*return*/];
3784
- }
3785
- });
3786
- }); });
3787
- ava_1.default("JAVA_Auth_031c2", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3788
- var config, card, response;
3789
- return __generator(this, function (_a) {
3790
- switch (_a.label) {
3791
- case 0:
3792
- t.plan(2);
3793
- config = new src_1.ServicesConfig();
3794
- config.merchantId = "heartlandgpsandbox";
3795
- config.accountId = "api";
3796
- config.sharedSecret = "secret";
3797
- config.refundPassword = "refund";
3798
- config.rebatePassword = "rebate";
3799
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3800
- config.timeout = 20000;
3801
- src_1.ServicesContainer.configure(config);
3802
- card = new src_1.CreditCardData();
3803
- card.number = "4263970000005262";
3804
- card.expMonth = "12";
3805
- card.expYear = "2020";
3806
- card.cvn = "123";
3807
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3808
- card.cardHolderName = "James Mason";
3809
- return [4 /*yield*/, card
3810
- .charge(100.01)
3811
- .withCurrency("GBP")
3812
- .withCustomerIpAddress("123.123.123.123")
3813
- .withDescription("JAVA-Auth-031c2")
3814
- .execute()];
3815
- case 1:
3816
- response = _a.sent();
3817
- t.truthy(response);
3818
- t.is("00", response.responseCode);
3819
- return [2 /*return*/];
3820
- }
3821
- });
3822
- }); });
3823
- ava_1.default("JAVA_Auth_032a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3824
- var config, billingAddress, shippingAddress, card, response;
3825
- return __generator(this, function (_a) {
3826
- switch (_a.label) {
3827
- case 0:
3828
- t.plan(2);
3829
- config = new src_1.ServicesConfig();
3830
- config.merchantId = "heartlandgpsandbox";
3831
- config.accountId = "api";
3832
- config.sharedSecret = "secret";
3833
- config.refundPassword = "refund";
3834
- config.rebatePassword = "rebate";
3835
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3836
- config.timeout = 20000;
3837
- src_1.ServicesContainer.configure(config);
3838
- billingAddress = new src_1.Address();
3839
- billingAddress.postalCode = "E77 4QJ";
3840
- billingAddress.country = "United Kingdom";
3841
- shippingAddress = new src_1.Address();
3842
- shippingAddress.postalCode = "Z76 PO9";
3843
- shippingAddress.country = "France";
3844
- card = new src_1.CreditCardData();
3845
- card.number = "4263970000005262";
3846
- card.expMonth = "12";
3847
- card.expYear = "2020";
3848
- card.cvn = "123";
3849
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3850
- card.cardHolderName = "James Mason";
3851
- return [4 /*yield*/, card
3852
- .charge(100.01)
3853
- .withCurrency("EUR")
3854
- .withAddress(billingAddress)
3855
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
3856
- .withDescription("JAVA-Auth-032a")
3857
- .execute()];
3858
- case 1:
3859
- response = _a.sent();
3860
- t.truthy(response);
3861
- t.is("00", response.responseCode);
3862
- return [2 /*return*/];
3863
- }
3864
- });
3865
- }); });
3866
- ava_1.default("JAVA_Auth_033a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3867
- var config, billingAddress, shippingAddress, card, response;
3868
- return __generator(this, function (_a) {
3869
- switch (_a.label) {
3870
- case 0:
3871
- t.plan(2);
3872
- config = new src_1.ServicesConfig();
3873
- config.merchantId = "heartlandgpsandbox";
3874
- config.accountId = "api";
3875
- config.sharedSecret = "secret";
3876
- config.refundPassword = "refund";
3877
- config.rebatePassword = "rebate";
3878
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3879
- config.timeout = 20000;
3880
- src_1.ServicesContainer.configure(config);
3881
- billingAddress = new src_1.Address();
3882
- billingAddress.postalCode = "774|10";
3883
- shippingAddress = new src_1.Address();
3884
- shippingAddress.postalCode = "769|52";
3885
- card = new src_1.CreditCardData();
3886
- card.number = "4263970000005262";
3887
- card.expMonth = "12";
3888
- card.expYear = "2020";
3889
- card.cvn = "123";
3890
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3891
- card.cardHolderName = "James Mason";
3892
- return [4 /*yield*/, card
3893
- .charge(100.01)
3894
- .withCurrency("USD")
3895
- .withAddress(billingAddress)
3896
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
3897
- .withDescription("JAVA-Auth-033a")
3898
- .execute()];
3899
- case 1:
3900
- response = _a.sent();
3901
- t.truthy(response);
3902
- t.is("00", response.responseCode);
3903
- return [2 /*return*/];
3904
- }
3905
- });
3906
- }); });
3907
- ava_1.default("JAVA_Auth_033b1", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3908
- var config, billingAddress, card, response;
3909
- return __generator(this, function (_a) {
3910
- switch (_a.label) {
3911
- case 0:
3912
- t.plan(2);
3913
- config = new src_1.ServicesConfig();
3914
- config.merchantId = "heartlandgpsandbox";
3915
- config.accountId = "api";
3916
- config.sharedSecret = "secret";
3917
- config.refundPassword = "refund";
3918
- config.rebatePassword = "rebate";
3919
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3920
- config.timeout = 20000;
3921
- src_1.ServicesContainer.configure(config);
3922
- billingAddress = new src_1.Address();
3923
- billingAddress.postalCode = "774|10";
3924
- card = new src_1.CreditCardData();
3925
- card.number = "4263970000005262";
3926
- card.expMonth = "12";
3927
- card.expYear = "2020";
3928
- card.cvn = "123";
3929
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3930
- card.cardHolderName = "James Mason";
3931
- return [4 /*yield*/, card
3932
- .charge(100.01)
3933
- .withCurrency("USD")
3934
- .withAddress(billingAddress)
3935
- .withDescription("JAVA-Auth-033b1")
3936
- .execute()];
3937
- case 1:
3938
- response = _a.sent();
3939
- t.truthy(response);
3940
- t.is("00", response.responseCode);
3941
- return [2 /*return*/];
3942
- }
3943
- });
3944
- }); });
3945
- ava_1.default("JAVA_Auth_033b2", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3946
- var config, shippingAddress, card, response;
3947
- return __generator(this, function (_a) {
3948
- switch (_a.label) {
3949
- case 0:
3950
- t.plan(2);
3951
- config = new src_1.ServicesConfig();
3952
- config.merchantId = "heartlandgpsandbox";
3953
- config.accountId = "api";
3954
- config.sharedSecret = "secret";
3955
- config.refundPassword = "refund";
3956
- config.rebatePassword = "rebate";
3957
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3958
- config.timeout = 20000;
3959
- src_1.ServicesContainer.configure(config);
3960
- shippingAddress = new src_1.Address();
3961
- shippingAddress.postalCode = "769|52";
3962
- card = new src_1.CreditCardData();
3963
- card.number = "4263970000005262";
3964
- card.expMonth = "12";
3965
- card.expYear = "2020";
3966
- card.cvn = "123";
3967
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
3968
- card.cardHolderName = "James Mason";
3969
- return [4 /*yield*/, card
3970
- .charge(100.01)
3971
- .withCurrency("USD")
3972
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
3973
- .withDescription("JAVA-Auth-033b2")
3974
- .execute()];
3975
- case 1:
3976
- response = _a.sent();
3977
- t.truthy(response);
3978
- t.is("00", response.responseCode);
3979
- return [2 /*return*/];
3980
- }
3981
- });
3982
- }); });
3983
- ava_1.default("JAVA_Auth_033c1", function (t) { return __awaiter(void 0, void 0, void 0, function () {
3984
- var config, billingAddress, card, response;
3985
- return __generator(this, function (_a) {
3986
- switch (_a.label) {
3987
- case 0:
3988
- t.plan(2);
3989
- config = new src_1.ServicesConfig();
3990
- config.merchantId = "heartlandgpsandbox";
3991
- config.accountId = "api";
3992
- config.sharedSecret = "secret";
3993
- config.refundPassword = "refund";
3994
- config.rebatePassword = "rebate";
3995
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
3996
- config.timeout = 20000;
3997
- src_1.ServicesContainer.configure(config);
3998
- billingAddress = new src_1.Address();
3999
- billingAddress.postalCode =
4000
- "3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwep4wpIwep3u111";
4001
- card = new src_1.CreditCardData();
4002
- card.number = "4263970000005262";
4003
- card.expMonth = "12";
4004
- card.expYear = "2020";
4005
- card.cvn = "123";
4006
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
4007
- card.cardHolderName = "James Mason";
4008
- return [4 /*yield*/, card
4009
- .charge(100.01)
4010
- .withCurrency("USD")
4011
- .withAddress(billingAddress)
4012
- .withDescription("JAVA-Auth-033c1")
4013
- .execute()];
4014
- case 1:
4015
- response = _a.sent();
4016
- t.truthy(response);
4017
- t.is("00", response.responseCode);
4018
- return [2 /*return*/];
4019
- }
4020
- });
4021
- }); });
4022
- ava_1.default("JAVA_Auth_033c2", function (t) { return __awaiter(void 0, void 0, void 0, function () {
4023
- var config, shippingAddress, card, response;
4024
- return __generator(this, function (_a) {
4025
- switch (_a.label) {
4026
- case 0:
4027
- t.plan(2);
4028
- config = new src_1.ServicesConfig();
4029
- config.merchantId = "heartlandgpsandbox";
4030
- config.accountId = "api";
4031
- config.sharedSecret = "secret";
4032
- config.refundPassword = "refund";
4033
- config.rebatePassword = "rebate";
4034
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
4035
- config.timeout = 20000;
4036
- src_1.ServicesContainer.configure(config);
4037
- shippingAddress = new src_1.Address();
4038
- shippingAddress.postalCode =
4039
- "3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwep4wpIwep3u111";
4040
- card = new src_1.CreditCardData();
4041
- card.number = "4263970000005262";
4042
- card.expMonth = "12";
4043
- card.expYear = "2020";
4044
- card.cvn = "123";
4045
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
4046
- card.cardHolderName = "James Mason";
4047
- return [4 /*yield*/, card
4048
- .charge(100.01)
4049
- .withCurrency("GBP")
4050
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
4051
- .withDescription("JAVA-Auth-033c2")
4052
- .execute()];
4053
- case 1:
4054
- response = _a.sent();
4055
- t.truthy(response);
4056
- t.is("00", response.responseCode);
4057
- return [2 /*return*/];
4058
- }
4059
- });
4060
- }); });
4061
- ava_1.default("JAVA_Auth_034a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
4062
- var config, billingAddress, shippingAddress, card, response;
4063
- return __generator(this, function (_a) {
4064
- switch (_a.label) {
4065
- case 0:
4066
- t.plan(2);
4067
- config = new src_1.ServicesConfig();
4068
- config.merchantId = "heartlandgpsandbox";
4069
- config.accountId = "api";
4070
- config.sharedSecret = "secret";
4071
- config.refundPassword = "refund";
4072
- config.rebatePassword = "rebate";
4073
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
4074
- config.timeout = 20000;
4075
- src_1.ServicesContainer.configure(config);
4076
- billingAddress = new src_1.Address();
4077
- billingAddress.country = "GB";
4078
- shippingAddress = new src_1.Address();
4079
- shippingAddress.country = "FR";
4080
- card = new src_1.CreditCardData();
4081
- card.number = "4263970000005262";
4082
- card.expMonth = "12";
4083
- card.expYear = "2020";
4084
- card.cvn = "123";
4085
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
4086
- card.cardHolderName = "James Mason";
4087
- return [4 /*yield*/, card
4088
- .charge(100.01)
4089
- .withCurrency("EUR")
4090
- .withAddress(billingAddress)
4091
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
4092
- .withDescription("JAVA-Auth-034a")
4093
- .execute()];
4094
- case 1:
4095
- response = _a.sent();
4096
- t.truthy(response);
4097
- t.is("00", response.responseCode);
4098
- return [2 /*return*/];
4099
- }
4100
- });
4101
- }); });
4102
- ava_1.default("JAVA_Auth_034b1", function (t) { return __awaiter(void 0, void 0, void 0, function () {
4103
- var config, shippingAddress, card, response;
4104
- return __generator(this, function (_a) {
4105
- switch (_a.label) {
4106
- case 0:
4107
- t.plan(2);
4108
- config = new src_1.ServicesConfig();
4109
- config.merchantId = "heartlandgpsandbox";
4110
- config.accountId = "api";
4111
- config.sharedSecret = "secret";
4112
- config.refundPassword = "refund";
4113
- config.rebatePassword = "rebate";
4114
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
4115
- config.timeout = 20000;
4116
- src_1.ServicesContainer.configure(config);
4117
- shippingAddress = new src_1.Address();
4118
- shippingAddress.country = "GB";
4119
- card = new src_1.CreditCardData();
4120
- card.number = "4263970000005262";
4121
- card.expMonth = "12";
4122
- card.expYear = "2020";
4123
- card.cvn = "123";
4124
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
4125
- card.cardHolderName = "James Mason";
4126
- return [4 /*yield*/, card
4127
- .charge(100.01)
4128
- .withCurrency("USD")
4129
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
4130
- .withDescription("JAVA-Auth-034b1")
4131
- .execute()];
4132
- case 1:
4133
- response = _a.sent();
4134
- t.truthy(response);
4135
- t.is("00", response.responseCode);
4136
- return [2 /*return*/];
4137
- }
4138
- });
4139
- }); });
4140
- ava_1.default("JAVA_Auth_034b2", function (t) { return __awaiter(void 0, void 0, void 0, function () {
4141
- var config, billingAddress, card, response;
4142
- return __generator(this, function (_a) {
4143
- switch (_a.label) {
4144
- case 0:
4145
- t.plan(2);
4146
- config = new src_1.ServicesConfig();
4147
- config.merchantId = "heartlandgpsandbox";
4148
- config.accountId = "api";
4149
- config.sharedSecret = "secret";
4150
- config.refundPassword = "refund";
4151
- config.rebatePassword = "rebate";
4152
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
4153
- config.timeout = 20000;
4154
- src_1.ServicesContainer.configure(config);
4155
- billingAddress = new src_1.Address();
4156
- billingAddress.country = "GB";
4157
- card = new src_1.CreditCardData();
4158
- card.number = "4263970000005262";
4159
- card.expMonth = "12";
4160
- card.expYear = "2020";
4161
- card.cvn = "123";
4162
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
4163
- card.cardHolderName = "James Mason";
4164
- return [4 /*yield*/, card
4165
- .charge(100.01)
4166
- .withCurrency("GBP")
4167
- .withAddress(billingAddress)
4168
- .withDescription("JAVA-Auth-034b2")
4169
- .execute()];
4170
- case 1:
4171
- response = _a.sent();
4172
- t.truthy(response);
4173
- t.is("00", response.responseCode);
4174
- return [2 /*return*/];
4175
- }
4176
- });
4177
- }); });
4178
- ava_1.default("JAVA_Auth_034c1", function (t) { return __awaiter(void 0, void 0, void 0, function () {
4179
- var config, billingAddress, card, response;
4180
- return __generator(this, function (_a) {
4181
- switch (_a.label) {
4182
- case 0:
4183
- t.plan(2);
4184
- config = new src_1.ServicesConfig();
4185
- config.merchantId = "heartlandgpsandbox";
4186
- config.accountId = "api";
4187
- config.sharedSecret = "secret";
4188
- config.refundPassword = "refund";
4189
- config.rebatePassword = "rebate";
4190
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
4191
- config.timeout = 20000;
4192
- src_1.ServicesContainer.configure(config);
4193
- billingAddress = new src_1.Address();
4194
- billingAddress.country =
4195
- "3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwep4wpIwep3u111";
4196
- card = new src_1.CreditCardData();
4197
- card.number = "4263970000005262";
4198
- card.expMonth = "12";
4199
- card.expYear = "2020";
4200
- card.cvn = "123";
4201
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
4202
- card.cardHolderName = "James Mason";
4203
- return [4 /*yield*/, card
4204
- .charge(100.01)
4205
- .withCurrency("EUR")
4206
- .withAddress(billingAddress)
4207
- .withDescription("JAVA-Auth-034c1")
4208
- .execute()];
4209
- case 1:
4210
- response = _a.sent();
4211
- t.truthy(response);
4212
- t.is("00", response.responseCode);
4213
- return [2 /*return*/];
4214
- }
4215
- });
4216
- }); });
4217
- ava_1.default("JAVA_Auth_034c2", function (t) { return __awaiter(void 0, void 0, void 0, function () {
4218
- var config, shippingAddress, card, response;
4219
- return __generator(this, function (_a) {
4220
- switch (_a.label) {
4221
- case 0:
4222
- t.plan(2);
4223
- config = new src_1.ServicesConfig();
4224
- config.merchantId = "heartlandgpsandbox";
4225
- config.accountId = "api";
4226
- config.sharedSecret = "secret";
4227
- config.refundPassword = "refund";
4228
- config.rebatePassword = "rebate";
4229
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
4230
- config.timeout = 20000;
4231
- src_1.ServicesContainer.configure(config);
4232
- shippingAddress = new src_1.Address();
4233
- shippingAddress.country =
4234
- "3a4wpIwep3uviSnW9XEB3a4wpIwep3uviSnW9XEB3a4wpIwep4wpIwep3u111";
4235
- card = new src_1.CreditCardData();
4236
- card.number = "4263970000005262";
4237
- card.expMonth = "12";
4238
- card.expYear = "2020";
4239
- card.cvn = "123";
4240
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
4241
- card.cardHolderName = "James Mason";
4242
- return [4 /*yield*/, card
4243
- .charge(100.01)
4244
- .withCurrency("USD")
4245
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
4246
- .withDescription("JAVA-Auth-034c2")
4247
- .execute()];
4248
- case 1:
4249
- response = _a.sent();
4250
- t.truthy(response);
4251
- t.is("00", response.responseCode);
4252
- return [2 /*return*/];
4253
- }
4254
- });
4255
- }); });
4256
- ava_1.default("JAVA_Auth_035a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
4257
- var config, card, response;
4258
- return __generator(this, function (_a) {
4259
- switch (_a.label) {
4260
- case 0:
4261
- t.plan(2);
4262
- config = new src_1.ServicesConfig();
4263
- config.merchantId = "heartlandgpsandbox";
4264
- config.accountId = "api";
4265
- config.sharedSecret = "secret";
4266
- config.refundPassword = "refund";
4267
- config.rebatePassword = "rebate";
4268
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
4269
- config.timeout = 20000;
4270
- src_1.ServicesContainer.configure(config);
4271
- card = new src_1.CreditCardData();
4272
- card.number = "4263970000005262";
4273
- card.expMonth = "12";
4274
- card.expYear = "2020";
4275
- card.cvn = "123";
4276
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
4277
- card.cardHolderName = "James Mason";
4278
- return [4 /*yield*/, card
4279
- .charge(100.01)
4280
- .withCurrency("GBP")
4281
- .withDescription("JAVA-Auth-035a")
4282
- .execute()];
4283
- case 1:
4284
- response = _a.sent();
4285
- t.truthy(response);
4286
- t.is("00", response.responseCode);
4287
- return [2 /*return*/];
4288
- }
4289
- });
4290
- }); });
4291
- ava_1.default("JAVA_Auth_035b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
4292
- var config, card, response;
4293
- return __generator(this, function (_a) {
4294
- switch (_a.label) {
4295
- case 0:
4296
- t.plan(2);
4297
- config = new src_1.ServicesConfig();
4298
- config.merchantId = "heartlandgpsandbox";
4299
- config.accountId = "api";
4300
- config.sharedSecret = "secret";
4301
- config.refundPassword = "refund";
4302
- config.rebatePassword = "rebate";
4303
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
4304
- config.timeout = 20000;
4305
- src_1.ServicesContainer.configure(config);
4306
- card = new src_1.CreditCardData();
4307
- card.number = "4263970000005262";
4308
- card.expMonth = "12";
4309
- card.expYear = "2020";
4310
- card.cvn = "123";
4311
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
4312
- card.cardHolderName = "James Mason";
4313
- return [4 /*yield*/, card
4314
- .charge(100.01)
4315
- .withCurrency("EUR")
4316
- .withDescription("JAVA-Auth-035b")
4317
- .execute()];
4318
- case 1:
4319
- response = _a.sent();
4320
- t.truthy(response);
4321
- t.is("00", response.responseCode);
4322
- return [2 /*return*/];
4323
- }
4324
- });
4325
- }); });
4326
- ava_1.default("JAVA_Auth_055a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
4327
- var config, billingAddress, shippingAddress, card, response;
4328
- return __generator(this, function (_a) {
4329
- switch (_a.label) {
4330
- case 0:
4331
- t.plan(2);
4332
- config = new src_1.ServicesConfig();
4333
- config.merchantId = "heartlandgpsandbox";
4334
- config.accountId = "api";
4335
- config.sharedSecret = "secret";
4336
- config.refundPassword = "refund";
4337
- config.rebatePassword = "rebate";
4338
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
4339
- config.timeout = 20000;
4340
- config.channel = "ECOM";
4341
- src_1.ServicesContainer.configure(config);
4342
- billingAddress = new src_1.Address();
4343
- billingAddress.postalCode = "774|10";
4344
- billingAddress.country = "GB";
4345
- shippingAddress = new src_1.Address();
4346
- shippingAddress.postalCode = "769|52";
4347
- shippingAddress.country = "FR";
4348
- card = new src_1.CreditCardData();
4349
- card.number = "4263970000005262";
4350
- card.expMonth = "12";
4351
- card.expYear = "2020";
4352
- card.cvn = "123";
4353
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
4354
- card.cardHolderName = "James Mason";
4355
- return [4 /*yield*/, card
4356
- .charge(100.01)
4357
- .withCurrency("EUR")
4358
- .withCustomerId("12345")
4359
- .withProductId("654321")
4360
- .withClientTransactionId("987654")
4361
- .withCustomerIpAddress("123.123.123.123")
4362
- .withAddress(billingAddress)
4363
- .withAddress(shippingAddress, src_1.AddressType.Shipping)
4364
- .withDescription("JAVA-Auth-055a")
4365
- .execute()];
4366
- case 1:
4367
- response = _a.sent();
4368
- t.truthy(response);
4369
- t.is("00", response.responseCode);
4370
- return [2 /*return*/];
4371
- }
4372
- });
4373
- }); });
4374
- //# sourceMappingURL=AuthTest.js.map