globalpayments-api 1.4.9 → 2.0.0

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