globalpayments-api 2.0.0 → 2.0.1

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