globalpayments-api 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (507) hide show
  1. package/.eslintignore +9 -0
  2. package/.eslintrc.cjs +39 -0
  3. package/.prettierrc +14 -4
  4. package/CHANGELOG.md +44 -32
  5. package/package.json +65 -58
  6. package/tsconfig.eslint.json +15 -0
  7. package/lib/src/Builders/AuthorizationBuilder.d.ts +0 -325
  8. package/lib/src/Builders/AuthorizationBuilder.js +0 -601
  9. package/lib/src/Builders/AuthorizationBuilder.js.map +0 -1
  10. package/lib/src/Builders/BaseBuilder/ValidationClause.d.ts +0 -14
  11. package/lib/src/Builders/BaseBuilder/ValidationClause.js +0 -62
  12. package/lib/src/Builders/BaseBuilder/ValidationClause.js.map +0 -1
  13. package/lib/src/Builders/BaseBuilder/ValidationTarget.d.ts +0 -16
  14. package/lib/src/Builders/BaseBuilder/ValidationTarget.js +0 -29
  15. package/lib/src/Builders/BaseBuilder/ValidationTarget.js.map +0 -1
  16. package/lib/src/Builders/BaseBuilder/Validations.d.ts +0 -11
  17. package/lib/src/Builders/BaseBuilder/Validations.js +0 -57
  18. package/lib/src/Builders/BaseBuilder/Validations.js.map +0 -1
  19. package/lib/src/Builders/BaseBuilder.d.ts +0 -11
  20. package/lib/src/Builders/BaseBuilder.js +0 -17
  21. package/lib/src/Builders/BaseBuilder.js.map +0 -1
  22. package/lib/src/Builders/ManagementBuilder.d.ts +0 -103
  23. package/lib/src/Builders/ManagementBuilder.js +0 -228
  24. package/lib/src/Builders/ManagementBuilder.js.map +0 -1
  25. package/lib/src/Builders/PayFacBuilder.d.ts +0 -96
  26. package/lib/src/Builders/PayFacBuilder.js +0 -185
  27. package/lib/src/Builders/PayFacBuilder.js.map +0 -1
  28. package/lib/src/Builders/RecurringBuilder.d.ts +0 -13
  29. package/lib/src/Builders/RecurringBuilder.js +0 -48
  30. package/lib/src/Builders/RecurringBuilder.js.map +0 -1
  31. package/lib/src/Builders/ReportBuilder.d.ts +0 -8
  32. package/lib/src/Builders/ReportBuilder.js +0 -37
  33. package/lib/src/Builders/ReportBuilder.js.map +0 -1
  34. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.d.ts +0 -22
  35. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.js +0 -160
  36. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.js.map +0 -1
  37. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.d.ts +0 -6
  38. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.js +0 -24
  39. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.js.map +0 -1
  40. package/lib/src/Builders/RequestBuilder/GpEcom/index.d.ts +0 -2
  41. package/lib/src/Builders/RequestBuilder/GpEcom/index.js +0 -15
  42. package/lib/src/Builders/RequestBuilder/GpEcom/index.js.map +0 -1
  43. package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.d.ts +0 -6
  44. package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.js +0 -30
  45. package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.js.map +0 -1
  46. package/lib/src/Builders/RequestBuilder/index.d.ts +0 -2
  47. package/lib/src/Builders/RequestBuilder/index.js +0 -15
  48. package/lib/src/Builders/RequestBuilder/index.js.map +0 -1
  49. package/lib/src/Builders/TransactionBuilder.d.ts +0 -10
  50. package/lib/src/Builders/TransactionBuilder.js +0 -47
  51. package/lib/src/Builders/TransactionBuilder.js.map +0 -1
  52. package/lib/src/Builders/TransactionReportBuilder.d.ts +0 -15
  53. package/lib/src/Builders/TransactionReportBuilder.js +0 -80
  54. package/lib/src/Builders/TransactionReportBuilder.js.map +0 -1
  55. package/lib/src/Builders/index.d.ts +0 -8
  56. package/lib/src/Builders/index.js +0 -21
  57. package/lib/src/Builders/index.js.map +0 -1
  58. package/lib/src/ConfiguredServices.d.ts +0 -22
  59. package/lib/src/ConfiguredServices.js +0 -57
  60. package/lib/src/ConfiguredServices.js.map +0 -1
  61. package/lib/src/Entities/Address.d.ts +0 -13
  62. package/lib/src/Entities/Address.js +0 -20
  63. package/lib/src/Entities/Address.js.map +0 -1
  64. package/lib/src/Entities/BatchSummary.d.ts +0 -6
  65. package/lib/src/Entities/BatchSummary.js +0 -10
  66. package/lib/src/Entities/BatchSummary.js.map +0 -1
  67. package/lib/src/Entities/Customer.d.ts +0 -64
  68. package/lib/src/Entities/Customer.js +0 -48
  69. package/lib/src/Entities/Customer.js.map +0 -1
  70. package/lib/src/Entities/DocumentUploadData.d.ts +0 -13
  71. package/lib/src/Entities/DocumentUploadData.js +0 -49
  72. package/lib/src/Entities/DocumentUploadData.js.map +0 -1
  73. package/lib/src/Entities/EcommerceInfo.d.ts +0 -12
  74. package/lib/src/Entities/EcommerceInfo.js +0 -15
  75. package/lib/src/Entities/EcommerceInfo.js.map +0 -1
  76. package/lib/src/Entities/EncryptionData.d.ts +0 -6
  77. package/lib/src/Entities/EncryptionData.js +0 -10
  78. package/lib/src/Entities/EncryptionData.js.map +0 -1
  79. package/lib/src/Entities/Enums.d.ts +0 -373
  80. package/lib/src/Entities/Enums.js +0 -498
  81. package/lib/src/Entities/Enums.js.map +0 -1
  82. package/lib/src/Entities/Errors.d.ts +0 -23
  83. package/lib/src/Entities/Errors.js +0 -107
  84. package/lib/src/Entities/Errors.js.map +0 -1
  85. package/lib/src/Entities/HostedPaymentData.d.ts +0 -10
  86. package/lib/src/Entities/HostedPaymentData.js +0 -11
  87. package/lib/src/Entities/HostedPaymentData.js.map +0 -1
  88. package/lib/src/Entities/IRequestBuilder.d.ts +0 -7
  89. package/lib/src/Entities/IRequestBuilder.js +0 -3
  90. package/lib/src/Entities/IRequestBuilder.js.map +0 -1
  91. package/lib/src/Entities/ProFac/AccountBalanceResponseData.d.ts +0 -7
  92. package/lib/src/Entities/ProFac/AccountBalanceResponseData.js +0 -10
  93. package/lib/src/Entities/ProFac/AccountBalanceResponseData.js.map +0 -1
  94. package/lib/src/Entities/ProFac/AccountPermissions.d.ts +0 -15
  95. package/lib/src/Entities/ProFac/AccountPermissions.js +0 -10
  96. package/lib/src/Entities/ProFac/AccountPermissions.js.map +0 -1
  97. package/lib/src/Entities/ProFac/BankAccountData.d.ts +0 -10
  98. package/lib/src/Entities/ProFac/BankAccountData.js +0 -10
  99. package/lib/src/Entities/ProFac/BankAccountData.js.map +0 -1
  100. package/lib/src/Entities/ProFac/BankAccountOwnershipData.d.ts +0 -8
  101. package/lib/src/Entities/ProFac/BankAccountOwnershipData.js +0 -12
  102. package/lib/src/Entities/ProFac/BankAccountOwnershipData.js.map +0 -1
  103. package/lib/src/Entities/ProFac/BeneficialOwnerData.d.ts +0 -6
  104. package/lib/src/Entities/ProFac/BeneficialOwnerData.js +0 -11
  105. package/lib/src/Entities/ProFac/BeneficialOwnerData.js.map +0 -1
  106. package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.d.ts +0 -5
  107. package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.js +0 -10
  108. package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.js.map +0 -1
  109. package/lib/src/Entities/ProFac/BusinessData.d.ts +0 -14
  110. package/lib/src/Entities/ProFac/BusinessData.js +0 -12
  111. package/lib/src/Entities/ProFac/BusinessData.js.map +0 -1
  112. package/lib/src/Entities/ProFac/DeviceAttributeInfo.d.ts +0 -4
  113. package/lib/src/Entities/ProFac/DeviceAttributeInfo.js +0 -10
  114. package/lib/src/Entities/ProFac/DeviceAttributeInfo.js.map +0 -1
  115. package/lib/src/Entities/ProFac/DeviceData.d.ts +0 -5
  116. package/lib/src/Entities/ProFac/DeviceData.js +0 -11
  117. package/lib/src/Entities/ProFac/DeviceData.js.map +0 -1
  118. package/lib/src/Entities/ProFac/DeviceInfo.d.ts +0 -6
  119. package/lib/src/Entities/ProFac/DeviceInfo.js +0 -10
  120. package/lib/src/Entities/ProFac/DeviceInfo.js.map +0 -1
  121. package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.d.ts +0 -7
  122. package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.js +0 -14
  123. package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.js.map +0 -1
  124. package/lib/src/Entities/ProFac/GrossBillingInformation.d.ts +0 -8
  125. package/lib/src/Entities/ProFac/GrossBillingInformation.js +0 -10
  126. package/lib/src/Entities/ProFac/GrossBillingInformation.js.map +0 -1
  127. package/lib/src/Entities/ProFac/OrderDevice.d.ts +0 -18
  128. package/lib/src/Entities/ProFac/OrderDevice.js +0 -10
  129. package/lib/src/Entities/ProFac/OrderDevice.js.map +0 -1
  130. package/lib/src/Entities/ProFac/OwnersData.d.ts +0 -12
  131. package/lib/src/Entities/ProFac/OwnersData.js +0 -12
  132. package/lib/src/Entities/ProFac/OwnersData.js.map +0 -1
  133. package/lib/src/Entities/ProFac/PayFacResponseData.d.ts +0 -55
  134. package/lib/src/Entities/ProFac/PayFacResponseData.js +0 -10
  135. package/lib/src/Entities/ProFac/PayFacResponseData.js.map +0 -1
  136. package/lib/src/Entities/ProFac/RenewAccountData.d.ts +0 -10
  137. package/lib/src/Entities/ProFac/RenewAccountData.js +0 -12
  138. package/lib/src/Entities/ProFac/RenewAccountData.js.map +0 -1
  139. package/lib/src/Entities/ProFac/SignificantOwnerData.d.ts +0 -8
  140. package/lib/src/Entities/ProFac/SignificantOwnerData.js +0 -12
  141. package/lib/src/Entities/ProFac/SignificantOwnerData.js.map +0 -1
  142. package/lib/src/Entities/ProFac/ThreatRiskData.d.ts +0 -5
  143. package/lib/src/Entities/ProFac/ThreatRiskData.js +0 -10
  144. package/lib/src/Entities/ProFac/ThreatRiskData.js.map +0 -1
  145. package/lib/src/Entities/ProFac/UserPersonalData.d.ts +0 -26
  146. package/lib/src/Entities/ProFac/UserPersonalData.js +0 -15
  147. package/lib/src/Entities/ProFac/UserPersonalData.js.map +0 -1
  148. package/lib/src/Entities/RecurringEntity.d.ts +0 -14
  149. package/lib/src/Entities/RecurringEntity.js +0 -87
  150. package/lib/src/Entities/RecurringEntity.js.map +0 -1
  151. package/lib/src/Entities/Request.d.ts +0 -9
  152. package/lib/src/Entities/Request.js +0 -15
  153. package/lib/src/Entities/Request.js.map +0 -1
  154. package/lib/src/Entities/SSORequestData.d.ts +0 -5
  155. package/lib/src/Entities/SSORequestData.js +0 -10
  156. package/lib/src/Entities/SSORequestData.js.map +0 -1
  157. package/lib/src/Entities/Schedule.d.ts +0 -47
  158. package/lib/src/Entities/Schedule.js +0 -254
  159. package/lib/src/Entities/Schedule.js.map +0 -1
  160. package/lib/src/Entities/ServiceEndpoints.d.ts +0 -4
  161. package/lib/src/Entities/ServiceEndpoints.js +0 -9
  162. package/lib/src/Entities/ServiceEndpoints.js.map +0 -1
  163. package/lib/src/Entities/Transaction.d.ts +0 -78
  164. package/lib/src/Entities/Transaction.js +0 -109
  165. package/lib/src/Entities/Transaction.js.map +0 -1
  166. package/lib/src/Entities/TransactionSummary.d.ts +0 -61
  167. package/lib/src/Entities/TransactionSummary.js +0 -10
  168. package/lib/src/Entities/TransactionSummary.js.map +0 -1
  169. package/lib/src/Entities/index.d.ts +0 -15
  170. package/lib/src/Entities/index.js +0 -28
  171. package/lib/src/Entities/index.js.map +0 -1
  172. package/lib/src/Gateways/Gateway.d.ts +0 -10
  173. package/lib/src/Gateways/Gateway.js +0 -43
  174. package/lib/src/Gateways/Gateway.js.map +0 -1
  175. package/lib/src/Gateways/GpEcomConnector.d.ts +0 -36
  176. package/lib/src/Gateways/GpEcomConnector.js +0 -557
  177. package/lib/src/Gateways/GpEcomConnector.js.map +0 -1
  178. package/lib/src/Gateways/IPayFacProvider.d.ts +0 -5
  179. package/lib/src/Gateways/IPayFacProvider.js +0 -3
  180. package/lib/src/Gateways/IPayFacProvider.js.map +0 -1
  181. package/lib/src/Gateways/IPaymentGateway.d.ts +0 -8
  182. package/lib/src/Gateways/IPaymentGateway.js +0 -3
  183. package/lib/src/Gateways/IPaymentGateway.js.map +0 -1
  184. package/lib/src/Gateways/IRecurringService.d.ts +0 -6
  185. package/lib/src/Gateways/IRecurringService.js +0 -3
  186. package/lib/src/Gateways/IRecurringService.js.map +0 -1
  187. package/lib/src/Gateways/PayPlanConnector.d.ts +0 -42
  188. package/lib/src/Gateways/PayPlanConnector.js +0 -553
  189. package/lib/src/Gateways/PayPlanConnector.js.map +0 -1
  190. package/lib/src/Gateways/PorticoConnector.d.ts +0 -44
  191. package/lib/src/Gateways/PorticoConnector.js +0 -1018
  192. package/lib/src/Gateways/PorticoConnector.js.map +0 -1
  193. package/lib/src/Gateways/ProPayConnector.d.ts +0 -41
  194. package/lib/src/Gateways/ProPayConnector.js +0 -695
  195. package/lib/src/Gateways/ProPayConnector.js.map +0 -1
  196. package/lib/src/Gateways/RealexConnector.d.ts +0 -30
  197. package/lib/src/Gateways/RealexConnector.js +0 -524
  198. package/lib/src/Gateways/RealexConnector.js.map +0 -1
  199. package/lib/src/Gateways/RestGateway.d.ts +0 -6
  200. package/lib/src/Gateways/RestGateway.js +0 -32
  201. package/lib/src/Gateways/RestGateway.js.map +0 -1
  202. package/lib/src/Gateways/XmlGateway.d.ts +0 -6
  203. package/lib/src/Gateways/XmlGateway.js +0 -38
  204. package/lib/src/Gateways/XmlGateway.js.map +0 -1
  205. package/lib/src/Gateways/https-wrapper.d.ts +0 -3
  206. package/lib/src/Gateways/https-wrapper.js +0 -36
  207. package/lib/src/Gateways/https-wrapper.js.map +0 -1
  208. package/lib/src/Gateways/index.d.ts +0 -8
  209. package/lib/src/Gateways/index.js +0 -21
  210. package/lib/src/Gateways/index.js.map +0 -1
  211. package/lib/src/HostedPaymentConfig.d.ts +0 -12
  212. package/lib/src/HostedPaymentConfig.js +0 -10
  213. package/lib/src/HostedPaymentConfig.js.map +0 -1
  214. package/lib/src/Mapping/GpEcomMapping.d.ts +0 -9
  215. package/lib/src/Mapping/GpEcomMapping.js +0 -74
  216. package/lib/src/Mapping/GpEcomMapping.js.map +0 -1
  217. package/lib/src/Mapping/index.d.ts +0 -1
  218. package/lib/src/Mapping/index.js +0 -14
  219. package/lib/src/Mapping/index.js.map +0 -1
  220. package/lib/src/PaymentMethods/Cash.d.ts +0 -8
  221. package/lib/src/PaymentMethods/Cash.js +0 -37
  222. package/lib/src/PaymentMethods/Cash.js.map +0 -1
  223. package/lib/src/PaymentMethods/Credit.d.ts +0 -85
  224. package/lib/src/PaymentMethods/Credit.js +0 -107
  225. package/lib/src/PaymentMethods/Credit.js.map +0 -1
  226. package/lib/src/PaymentMethods/CreditCardData.d.ts +0 -20
  227. package/lib/src/PaymentMethods/CreditCardData.js +0 -58
  228. package/lib/src/PaymentMethods/CreditCardData.js.map +0 -1
  229. package/lib/src/PaymentMethods/CreditTrackData.d.ts +0 -7
  230. package/lib/src/PaymentMethods/CreditTrackData.js +0 -28
  231. package/lib/src/PaymentMethods/CreditTrackData.js.map +0 -1
  232. package/lib/src/PaymentMethods/Debit.d.ts +0 -40
  233. package/lib/src/PaymentMethods/Debit.js +0 -71
  234. package/lib/src/PaymentMethods/Debit.js.map +0 -1
  235. package/lib/src/PaymentMethods/DebitTrackData.d.ts +0 -7
  236. package/lib/src/PaymentMethods/DebitTrackData.js +0 -28
  237. package/lib/src/PaymentMethods/DebitTrackData.js.map +0 -1
  238. package/lib/src/PaymentMethods/EBT.d.ts +0 -48
  239. package/lib/src/PaymentMethods/EBT.js +0 -89
  240. package/lib/src/PaymentMethods/EBT.js.map +0 -1
  241. package/lib/src/PaymentMethods/EBTCardData.d.ts +0 -16
  242. package/lib/src/PaymentMethods/EBTCardData.js +0 -33
  243. package/lib/src/PaymentMethods/EBTCardData.js.map +0 -1
  244. package/lib/src/PaymentMethods/EBTTrackData.d.ts +0 -8
  245. package/lib/src/PaymentMethods/EBTTrackData.js +0 -28
  246. package/lib/src/PaymentMethods/EBTTrackData.js.map +0 -1
  247. package/lib/src/PaymentMethods/ECheck.d.ts +0 -32
  248. package/lib/src/PaymentMethods/ECheck.js +0 -41
  249. package/lib/src/PaymentMethods/ECheck.js.map +0 -1
  250. package/lib/src/PaymentMethods/GiftCard.d.ts +0 -131
  251. package/lib/src/PaymentMethods/GiftCard.js +0 -206
  252. package/lib/src/PaymentMethods/GiftCard.js.map +0 -1
  253. package/lib/src/PaymentMethods/Interfaces.d.ts +0 -55
  254. package/lib/src/PaymentMethods/Interfaces.js +0 -3
  255. package/lib/src/PaymentMethods/Interfaces.js.map +0 -1
  256. package/lib/src/PaymentMethods/PaymentMethod.d.ts +0 -19
  257. package/lib/src/PaymentMethods/PaymentMethod.js +0 -115
  258. package/lib/src/PaymentMethods/PaymentMethod.js.map +0 -1
  259. package/lib/src/PaymentMethods/RecurringPaymentMethod.d.ts +0 -23
  260. package/lib/src/PaymentMethods/RecurringPaymentMethod.js +0 -78
  261. package/lib/src/PaymentMethods/RecurringPaymentMethod.js.map +0 -1
  262. package/lib/src/PaymentMethods/TransactionReference.d.ts +0 -10
  263. package/lib/src/PaymentMethods/TransactionReference.js +0 -13
  264. package/lib/src/PaymentMethods/TransactionReference.js.map +0 -1
  265. package/lib/src/PaymentMethods/index.d.ts +0 -15
  266. package/lib/src/PaymentMethods/index.js +0 -28
  267. package/lib/src/PaymentMethods/index.js.map +0 -1
  268. package/lib/src/ServiceConfigs/AcceptorConfig.d.ts +0 -41
  269. package/lib/src/ServiceConfigs/AcceptorConfig.js +0 -30
  270. package/lib/src/ServiceConfigs/AcceptorConfig.js.map +0 -1
  271. package/lib/src/ServiceConfigs/Configuration.d.ts +0 -15
  272. package/lib/src/ServiceConfigs/Configuration.js +0 -16
  273. package/lib/src/ServiceConfigs/Configuration.js.map +0 -1
  274. package/lib/src/ServiceConfigs/Gateways/GatewayConfig.d.ts +0 -14
  275. package/lib/src/ServiceConfigs/Gateways/GatewayConfig.js +0 -46
  276. package/lib/src/ServiceConfigs/Gateways/GatewayConfig.js.map +0 -1
  277. package/lib/src/ServiceConfigs/Gateways/GpEcomConfig.d.ts +0 -27
  278. package/lib/src/ServiceConfigs/Gateways/GpEcomConfig.js +0 -61
  279. package/lib/src/ServiceConfigs/Gateways/GpEcomConfig.js.map +0 -1
  280. package/lib/src/ServiceConfigs/Gateways/index.d.ts +0 -2
  281. package/lib/src/ServiceConfigs/Gateways/index.js +0 -15
  282. package/lib/src/ServiceConfigs/Gateways/index.js.map +0 -1
  283. package/lib/src/ServiceConfigs/ServicesConfig.d.ts +0 -27
  284. package/lib/src/ServiceConfigs/ServicesConfig.js +0 -51
  285. package/lib/src/ServiceConfigs/ServicesConfig.js.map +0 -1
  286. package/lib/src/ServiceConfigs/ServicesConfigsAdded.d.ts +0 -10
  287. package/lib/src/ServiceConfigs/ServicesConfigsAdded.js +0 -27
  288. package/lib/src/ServiceConfigs/ServicesConfigsAdded.js.map +0 -1
  289. package/lib/src/ServiceConfigs/index.d.ts +0 -5
  290. package/lib/src/ServiceConfigs/index.js +0 -18
  291. package/lib/src/ServiceConfigs/index.js.map +0 -1
  292. package/lib/src/Services/BatchService.d.ts +0 -4
  293. package/lib/src/Services/BatchService.js +0 -18
  294. package/lib/src/Services/BatchService.js.map +0 -1
  295. package/lib/src/Services/CheckService.d.ts +0 -6
  296. package/lib/src/Services/CheckService.js +0 -21
  297. package/lib/src/Services/CheckService.js.map +0 -1
  298. package/lib/src/Services/CreditService.d.ts +0 -12
  299. package/lib/src/Services/CreditService.js +0 -55
  300. package/lib/src/Services/CreditService.js.map +0 -1
  301. package/lib/src/Services/DebitService.d.ts +0 -7
  302. package/lib/src/Services/DebitService.js +0 -29
  303. package/lib/src/Services/DebitService.js.map +0 -1
  304. package/lib/src/Services/EBTService.d.ts +0 -8
  305. package/lib/src/Services/EBTService.js +0 -33
  306. package/lib/src/Services/EBTService.js.map +0 -1
  307. package/lib/src/Services/GiftService.d.ts +0 -16
  308. package/lib/src/Services/GiftService.js +0 -55
  309. package/lib/src/Services/GiftService.js.map +0 -1
  310. package/lib/src/Services/HostedService.d.ts +0 -9
  311. package/lib/src/Services/HostedService.js +0 -60
  312. package/lib/src/Services/HostedService.js.map +0 -1
  313. package/lib/src/Services/PayFacService.d.ts +0 -26
  314. package/lib/src/Services/PayFacService.js +0 -78
  315. package/lib/src/Services/PayFacService.js.map +0 -1
  316. package/lib/src/Services/RecurringService.d.ts +0 -8
  317. package/lib/src/Services/RecurringService.js +0 -28
  318. package/lib/src/Services/RecurringService.js.map +0 -1
  319. package/lib/src/Services/ReportingService.d.ts +0 -6
  320. package/lib/src/Services/ReportingService.js +0 -20
  321. package/lib/src/Services/ReportingService.js.map +0 -1
  322. package/lib/src/Services/index.d.ts +0 -9
  323. package/lib/src/Services/index.js +0 -22
  324. package/lib/src/Services/index.js.map +0 -1
  325. package/lib/src/ServicesConfig.d.ts +0 -27
  326. package/lib/src/ServicesConfig.js +0 -51
  327. package/lib/src/ServicesConfig.js.map +0 -1
  328. package/lib/src/ServicesContainer.d.ts +0 -26
  329. package/lib/src/ServicesContainer.js +0 -140
  330. package/lib/src/ServicesContainer.js.map +0 -1
  331. package/lib/src/Utils/GenerationUtils.d.ts +0 -5
  332. package/lib/src/Utils/GenerationUtils.js +0 -37
  333. package/lib/src/Utils/GenerationUtils.js.map +0 -1
  334. package/lib/src/Utils/InputValidation.d.ts +0 -12
  335. package/lib/src/Utils/InputValidation.js +0 -73
  336. package/lib/src/Utils/InputValidation.js.map +0 -1
  337. package/lib/src/Utils/Sha1.d.ts +0 -6
  338. package/lib/src/Utils/Sha1.js +0 -226
  339. package/lib/src/Utils/Sha1.js.map +0 -1
  340. package/lib/src/Utils/StringUtils.d.ts +0 -6
  341. package/lib/src/Utils/StringUtils.js +0 -54
  342. package/lib/src/Utils/StringUtils.js.map +0 -1
  343. package/lib/src/Utils/index.d.ts +0 -2
  344. package/lib/src/Utils/index.js +0 -15
  345. package/lib/src/Utils/index.js.map +0 -1
  346. package/lib/src/index.d.ts +0 -12
  347. package/lib/src/index.js +0 -29
  348. package/lib/src/index.js.map +0 -1
  349. package/lib/test/Data/TestCards.d.ts +0 -24
  350. package/lib/test/Data/TestCards.js +0 -233
  351. package/lib/test/Data/TestCards.js.map +0 -1
  352. package/lib/test/Data/TestChecks.d.ts +0 -4
  353. package/lib/test/Data/TestChecks.js +0 -33
  354. package/lib/test/Data/TestChecks.js.map +0 -1
  355. package/lib/test/Data/index.d.ts +0 -2
  356. package/lib/test/Data/index.js +0 -15
  357. package/lib/test/Data/index.js.map +0 -1
  358. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.d.ts +0 -1
  359. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js +0 -113
  360. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js.map +0 -1
  361. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.d.ts +0 -1
  362. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js +0 -484
  363. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js.map +0 -1
  364. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.d.ts +0 -1
  365. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js +0 -84
  366. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js.map +0 -1
  367. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.d.ts +0 -1
  368. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js +0 -1721
  369. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js.map +0 -1
  370. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.d.ts +0 -1
  371. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js +0 -84
  372. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js.map +0 -1
  373. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.d.ts +0 -1
  374. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js +0 -1758
  375. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js.map +0 -1
  376. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.d.ts +0 -1
  377. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js +0 -683
  378. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js.map +0 -1
  379. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.d.ts +0 -1
  380. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js +0 -2219
  381. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js.map +0 -1
  382. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.d.ts +0 -1
  383. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js +0 -708
  384. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js.map +0 -1
  385. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.d.ts +0 -1
  386. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js +0 -152
  387. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js.map +0 -1
  388. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.d.ts +0 -1
  389. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js +0 -172
  390. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js.map +0 -1
  391. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.d.ts +0 -1
  392. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js +0 -193
  393. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js.map +0 -1
  394. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.d.ts +0 -1
  395. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js +0 -378
  396. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js.map +0 -1
  397. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.d.ts +0 -1
  398. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js +0 -197
  399. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js.map +0 -1
  400. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.d.ts +0 -1
  401. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js +0 -48
  402. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js.map +0 -1
  403. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.d.ts +0 -1
  404. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.js +0 -101
  405. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.js.map +0 -1
  406. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.d.ts +0 -1
  407. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.js +0 -353
  408. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.js.map +0 -1
  409. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.d.ts +0 -1
  410. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.js +0 -124
  411. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.js.map +0 -1
  412. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.d.ts +0 -1
  413. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.js +0 -143
  414. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.js.map +0 -1
  415. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.d.ts +0 -39
  416. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.js +0 -372
  417. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.js.map +0 -1
  418. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.d.ts +0 -1
  419. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.js +0 -101
  420. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.js.map +0 -1
  421. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.d.ts +0 -1
  422. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.js +0 -536
  423. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.js.map +0 -1
  424. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.d.ts +0 -1
  425. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.js +0 -125
  426. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.js.map +0 -1
  427. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.d.ts +0 -1
  428. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.js +0 -145
  429. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.js.map +0 -1
  430. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.d.ts +0 -33
  431. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.js +0 -269
  432. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.js.map +0 -1
  433. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.d.ts +0 -4
  434. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.js +0 -31
  435. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.js.map +0 -1
  436. package/lib/test/Integration/Gateways/RealexConnector/Certification/AuthTest.d.ts +0 -1
  437. package/lib/test/Integration/Gateways/RealexConnector/Certification/AuthTest.js +0 -4374
  438. package/lib/test/Integration/Gateways/RealexConnector/Certification/AuthTest.js.map +0 -1
  439. package/lib/test/Integration/Gateways/RealexConnector/Certification/AvsTest.d.ts +0 -1
  440. package/lib/test/Integration/Gateways/RealexConnector/Certification/AvsTest.js +0 -759
  441. package/lib/test/Integration/Gateways/RealexConnector/Certification/AvsTest.js.map +0 -1
  442. package/lib/test/Integration/Gateways/RealexConnector/Certification/CreditTest.d.ts +0 -1
  443. package/lib/test/Integration/Gateways/RealexConnector/Certification/CreditTest.js +0 -2400
  444. package/lib/test/Integration/Gateways/RealexConnector/Certification/CreditTest.js.map +0 -1
  445. package/lib/test/Integration/Gateways/RealexConnector/Certification/HoldTest.d.ts +0 -1
  446. package/lib/test/Integration/Gateways/RealexConnector/Certification/HoldTest.js +0 -1657
  447. package/lib/test/Integration/Gateways/RealexConnector/Certification/HoldTest.js.map +0 -1
  448. package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.d.ts +0 -1
  449. package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.js +0 -5651
  450. package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.js.map +0 -1
  451. package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.d.ts +0 -1
  452. package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.js +0 -1986
  453. package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.js.map +0 -1
  454. package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.d.ts +0 -1
  455. package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.js +0 -2370
  456. package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.js.map +0 -1
  457. package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.d.ts +0 -1
  458. package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.js +0 -1704
  459. package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.js.map +0 -1
  460. package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.d.ts +0 -1
  461. package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.js +0 -2054
  462. package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.js.map +0 -1
  463. package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.d.ts +0 -1
  464. package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.js +0 -2470
  465. package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.js.map +0 -1
  466. package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.d.ts +0 -1
  467. package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.js +0 -3117
  468. package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.js.map +0 -1
  469. package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.d.ts +0 -1
  470. package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.js +0 -2032
  471. package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.js.map +0 -1
  472. package/lib/test/Integration/Gateways/RealexConnector/CreditTest.d.ts +0 -1
  473. package/lib/test/Integration/Gateways/RealexConnector/CreditTest.js +0 -323
  474. package/lib/test/Integration/Gateways/RealexConnector/CreditTest.js.map +0 -1
  475. package/lib/test/Integration/Gateways/RealexConnector/HppTest.d.ts +0 -1
  476. package/lib/test/Integration/Gateways/RealexConnector/HppTest.js +0 -99
  477. package/lib/test/Integration/Gateways/RealexConnector/HppTest.js.map +0 -1
  478. package/lib/test/Integration/Gateways/RealexConnector/RecurringTest.d.ts +0 -1
  479. package/lib/test/Integration/Gateways/RealexConnector/RecurringTest.js +0 -264
  480. package/lib/test/Integration/Gateways/RealexConnector/RecurringTest.js.map +0 -1
  481. package/lib/test/Integration/Services/CheckServiceTest.d.ts +0 -1
  482. package/lib/test/Integration/Services/CheckServiceTest.js +0 -99
  483. package/lib/test/Integration/Services/CheckServiceTest.js.map +0 -1
  484. package/lib/test/Integration/Services/CreditServiceTest.d.ts +0 -1
  485. package/lib/test/Integration/Services/CreditServiceTest.js +0 -314
  486. package/lib/test/Integration/Services/CreditServiceTest.js.map +0 -1
  487. package/lib/test/Integration/Services/DebitServiceTest.d.ts +0 -1
  488. package/lib/test/Integration/Services/DebitServiceTest.js +0 -155
  489. package/lib/test/Integration/Services/DebitServiceTest.js.map +0 -1
  490. package/lib/test/Integration/Services/EBTServiceTest.d.ts +0 -1
  491. package/lib/test/Integration/Services/EBTServiceTest.js +0 -136
  492. package/lib/test/Integration/Services/EBTServiceTest.js.map +0 -1
  493. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.d.ts +0 -1
  494. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js +0 -162
  495. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js.map +0 -1
  496. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.d.ts +0 -1
  497. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js +0 -140
  498. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js.map +0 -1
  499. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.d.ts +0 -1
  500. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js +0 -73
  501. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js.map +0 -1
  502. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.d.ts +0 -1
  503. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js +0 -203
  504. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js.map +0 -1
  505. package/lib/test/Unit/Gateways/RealexConnector/CreditTest.d.ts +0 -1
  506. package/lib/test/Unit/Gateways/RealexConnector/CreditTest.js +0 -71
  507. package/lib/test/Unit/Gateways/RealexConnector/CreditTest.js.map +0 -1
@@ -1,1657 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- var ava_1 = require("ava");
40
- var src_1 = require("../../../../../src/");
41
- var throttle = function () { return new Promise(function (resolve) { return setTimeout(resolve, 1500); }); };
42
- ava_1.default.beforeEach(function () { return __awaiter(void 0, void 0, void 0, function () {
43
- return __generator(this, function (_a) {
44
- switch (_a.label) {
45
- case 0: return [4 /*yield*/, throttle()];
46
- case 1:
47
- _a.sent();
48
- return [2 /*return*/];
49
- }
50
- });
51
- }); });
52
- // TODO
53
- ava_1.default("JAVA_Hold_Sample", function (t) { return __awaiter(void 0, void 0, void 0, function () {
54
- var config, card, saleResponse, response;
55
- return __generator(this, function (_a) {
56
- switch (_a.label) {
57
- case 0:
58
- t.plan(2);
59
- config = new src_1.ServicesConfig();
60
- config.merchantId = "heartlandgpsandbox";
61
- config.accountId = "api";
62
- config.sharedSecret = "secret";
63
- config.refundPassword = "refund";
64
- config.rebatePassword = "rebate";
65
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
66
- config.timeout = 5000;
67
- config.channel = "ECOM";
68
- src_1.ServicesContainer.configure(config);
69
- card = new src_1.CreditCardData();
70
- card.number = "4263970000005262";
71
- card.expMonth = "12";
72
- card.expYear = "2020";
73
- card.cvn = "123";
74
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
75
- card.cardHolderName = "James Mason";
76
- return [4 /*yield*/, card
77
- .charge(10)
78
- .withCurrency("EUR")
79
- .execute()];
80
- case 1:
81
- saleResponse = _a.sent();
82
- t.truthy(saleResponse);
83
- t.is("00", saleResponse.responseCode);
84
- return [4 /*yield*/, throttle()];
85
- case 2:
86
- _a.sent();
87
- return [4 /*yield*/, saleResponse
88
- .hold()
89
- .withReasonCode(src_1.ReasonCode.Fraud)
90
- .withDescription("JAVA-Hold")
91
- .execute()];
92
- case 3:
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_Hold_006a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
101
- var config, card, saleResponse, 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 = 5000;
114
- config.channel = "ECOM";
115
- src_1.ServicesContainer.configure(config);
116
- card = new src_1.CreditCardData();
117
- card.number = "4263970000005262";
118
- card.expMonth = "12";
119
- card.expYear = "2020";
120
- card.cvn = "123";
121
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
122
- card.cardHolderName = "James Mason";
123
- return [4 /*yield*/, card
124
- .charge(10)
125
- .withCurrency("EUR")
126
- .execute()];
127
- case 1:
128
- saleResponse = _a.sent();
129
- t.truthy(saleResponse);
130
- t.is("00", saleResponse.responseCode);
131
- return [4 /*yield*/, throttle()];
132
- case 2:
133
- _a.sent();
134
- return [4 /*yield*/, saleResponse
135
- .hold()
136
- .withReasonCode(src_1.ReasonCode.Fraud)
137
- .withDescription("JAVA-Hold")
138
- .execute()];
139
- case 3:
140
- response = _a.sent();
141
- t.truthy(response);
142
- t.is("00", response.responseCode);
143
- return [2 /*return*/];
144
- }
145
- });
146
- }); });
147
- ava_1.default("JAVA_Hold_006b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
148
- var config, card, saleResponse, response;
149
- return __generator(this, function (_a) {
150
- switch (_a.label) {
151
- case 0:
152
- t.plan(2);
153
- config = new src_1.ServicesConfig();
154
- config.merchantId = "heartlandgpsandbox";
155
- config.accountId = "api";
156
- config.sharedSecret = "secret";
157
- config.refundPassword = "refund";
158
- config.rebatePassword = "rebate";
159
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
160
- config.timeout = 5000;
161
- config.channel = "ECOM";
162
- src_1.ServicesContainer.configure(config);
163
- card = new src_1.CreditCardData();
164
- card.number = "4263970000005262";
165
- card.expMonth = "12";
166
- card.expYear = "2020";
167
- card.cvn = "123";
168
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
169
- card.cardHolderName = "James Mason";
170
- return [4 /*yield*/, card
171
- .charge(10)
172
- .withCurrency("EUR")
173
- .execute()];
174
- case 1:
175
- saleResponse = _a.sent();
176
- t.truthy(saleResponse);
177
- t.is("00", saleResponse.responseCode);
178
- return [4 /*yield*/, throttle()];
179
- case 2:
180
- _a.sent();
181
- return [4 /*yield*/, saleResponse
182
- .hold()
183
- .withReasonCode(src_1.ReasonCode.Fraud)
184
- .withDescription("JAVA-Hold")
185
- .execute()];
186
- case 3:
187
- response = _a.sent();
188
- t.truthy(response);
189
- t.is("00", response.responseCode);
190
- return [2 /*return*/];
191
- }
192
- });
193
- }); });
194
- ava_1.default("JAVA_Hold_006c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
195
- var config, card, saleResponse, response;
196
- return __generator(this, function (_a) {
197
- switch (_a.label) {
198
- case 0:
199
- t.plan(2);
200
- config = new src_1.ServicesConfig();
201
- config.merchantId = "heartlandgpsandbox";
202
- config.accountId = "api";
203
- config.sharedSecret = "secret";
204
- config.refundPassword = "refund";
205
- config.rebatePassword = "rebate";
206
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
207
- config.timeout = 5000;
208
- config.channel = "ECOM";
209
- src_1.ServicesContainer.configure(config);
210
- card = new src_1.CreditCardData();
211
- card.number = "4263970000005262";
212
- card.expMonth = "12";
213
- card.expYear = "2020";
214
- card.cvn = "123";
215
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
216
- card.cardHolderName = "James Mason";
217
- return [4 /*yield*/, card
218
- .charge(10)
219
- .withCurrency("EUR")
220
- .execute()];
221
- case 1:
222
- saleResponse = _a.sent();
223
- t.truthy(saleResponse);
224
- t.is("00", saleResponse.responseCode);
225
- return [4 /*yield*/, throttle()];
226
- case 2:
227
- _a.sent();
228
- return [4 /*yield*/, saleResponse
229
- .hold()
230
- .withReasonCode(src_1.ReasonCode.Fraud)
231
- .withDescription("JAVA-Hold")
232
- .execute()];
233
- case 3:
234
- response = _a.sent();
235
- t.truthy(response);
236
- t.is("00", response.responseCode);
237
- return [2 /*return*/];
238
- }
239
- });
240
- }); });
241
- ava_1.default("JAVA_Hold_006d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
242
- var config, card, saleResponse, response;
243
- return __generator(this, function (_a) {
244
- switch (_a.label) {
245
- case 0:
246
- t.plan(2);
247
- config = new src_1.ServicesConfig();
248
- config.merchantId = "heartlandgpsandbox";
249
- config.accountId = "api";
250
- config.sharedSecret = "secret";
251
- config.refundPassword = "refund";
252
- config.rebatePassword = "rebate";
253
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
254
- config.timeout = 5000;
255
- config.channel = "ECOM";
256
- src_1.ServicesContainer.configure(config);
257
- card = new src_1.CreditCardData();
258
- card.number = "4263970000005262";
259
- card.expMonth = "12";
260
- card.expYear = "2020";
261
- card.cvn = "123";
262
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
263
- card.cardHolderName = "James Mason";
264
- return [4 /*yield*/, card
265
- .charge(10)
266
- .withCurrency("EUR")
267
- .execute()];
268
- case 1:
269
- saleResponse = _a.sent();
270
- t.truthy(saleResponse);
271
- t.is("00", saleResponse.responseCode);
272
- return [4 /*yield*/, throttle()];
273
- case 2:
274
- _a.sent();
275
- return [4 /*yield*/, saleResponse
276
- .hold()
277
- .withReasonCode(src_1.ReasonCode.Fraud)
278
- .withDescription("JAVA-Hold")
279
- .execute()];
280
- case 3:
281
- response = _a.sent();
282
- t.truthy(response);
283
- t.is("00", response.responseCode);
284
- return [2 /*return*/];
285
- }
286
- });
287
- }); });
288
- ava_1.default("JAVA_Hold_006e", function (t) { return __awaiter(void 0, void 0, void 0, function () {
289
- var config, card, saleResponse, response;
290
- return __generator(this, function (_a) {
291
- switch (_a.label) {
292
- case 0:
293
- t.plan(2);
294
- config = new src_1.ServicesConfig();
295
- config.merchantId = "heartlandgpsandbox";
296
- config.accountId = "api";
297
- config.sharedSecret = "secret";
298
- config.refundPassword = "refund";
299
- config.rebatePassword = "rebate";
300
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
301
- config.timeout = 5000;
302
- config.channel = "ECOM";
303
- src_1.ServicesContainer.configure(config);
304
- card = new src_1.CreditCardData();
305
- card.number = "4263970000005262";
306
- card.expMonth = "12";
307
- card.expYear = "2020";
308
- card.cvn = "123";
309
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
310
- card.cardHolderName = "James Mason";
311
- return [4 /*yield*/, card
312
- .charge(10)
313
- .withCurrency("EUR")
314
- .execute()];
315
- case 1:
316
- saleResponse = _a.sent();
317
- t.truthy(saleResponse);
318
- t.is("00", saleResponse.responseCode);
319
- return [4 /*yield*/, throttle()];
320
- case 2:
321
- _a.sent();
322
- return [4 /*yield*/, saleResponse
323
- .hold()
324
- .withReasonCode(src_1.ReasonCode.Fraud)
325
- .withDescription("JAVA-Hold")
326
- .execute()];
327
- case 3:
328
- response = _a.sent();
329
- t.truthy(response);
330
- t.is("00", response.responseCode);
331
- return [2 /*return*/];
332
- }
333
- });
334
- }); });
335
- ava_1.default("JAVA_Hold_006f", function (t) { return __awaiter(void 0, void 0, void 0, function () {
336
- var config, card, saleResponse, response;
337
- return __generator(this, function (_a) {
338
- switch (_a.label) {
339
- case 0:
340
- t.plan(2);
341
- config = new src_1.ServicesConfig();
342
- config.merchantId = "heartlandgpsandbox";
343
- config.accountId = "api";
344
- config.sharedSecret = "secret";
345
- config.refundPassword = "refund";
346
- config.rebatePassword = "rebate";
347
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
348
- config.timeout = 5000;
349
- config.channel = "ECOM";
350
- src_1.ServicesContainer.configure(config);
351
- card = new src_1.CreditCardData();
352
- card.number = "4263970000005262";
353
- card.expMonth = "12";
354
- card.expYear = "2020";
355
- card.cvn = "123";
356
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
357
- card.cardHolderName = "James Mason";
358
- return [4 /*yield*/, card
359
- .charge(10)
360
- .withCurrency("EUR")
361
- .execute()];
362
- case 1:
363
- saleResponse = _a.sent();
364
- t.truthy(saleResponse);
365
- t.is("00", saleResponse.responseCode);
366
- return [4 /*yield*/, throttle()];
367
- case 2:
368
- _a.sent();
369
- return [4 /*yield*/, saleResponse
370
- .hold()
371
- .withReasonCode(src_1.ReasonCode.Fraud)
372
- .withDescription("JAVA-Hold")
373
- .execute()];
374
- case 3:
375
- response = _a.sent();
376
- t.truthy(response);
377
- t.is("00", response.responseCode);
378
- return [2 /*return*/];
379
- }
380
- });
381
- }); });
382
- ava_1.default("JAVA_Hold_006g", function (t) { return __awaiter(void 0, void 0, void 0, function () {
383
- var config, card, saleResponse, response;
384
- return __generator(this, function (_a) {
385
- switch (_a.label) {
386
- case 0:
387
- t.plan(2);
388
- config = new src_1.ServicesConfig();
389
- config.merchantId = "heartlandgpsandbox";
390
- config.accountId = "api";
391
- config.sharedSecret = "secret";
392
- config.refundPassword = "refund";
393
- config.rebatePassword = "rebate";
394
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
395
- config.timeout = 5000;
396
- config.channel = "ECOM";
397
- src_1.ServicesContainer.configure(config);
398
- card = new src_1.CreditCardData();
399
- card.number = "4263970000005262";
400
- card.expMonth = "12";
401
- card.expYear = "2020";
402
- card.cvn = "123";
403
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
404
- card.cardHolderName = "James Mason";
405
- return [4 /*yield*/, card
406
- .charge(10)
407
- .withCurrency("EUR")
408
- .execute()];
409
- case 1:
410
- saleResponse = _a.sent();
411
- t.truthy(saleResponse);
412
- t.is("00", saleResponse.responseCode);
413
- return [4 /*yield*/, throttle()];
414
- case 2:
415
- _a.sent();
416
- return [4 /*yield*/, saleResponse
417
- .hold()
418
- .withReasonCode(src_1.ReasonCode.Fraud)
419
- .withDescription("JAVA-Hold")
420
- .execute()];
421
- case 3:
422
- response = _a.sent();
423
- t.truthy(response);
424
- t.is("00", response.responseCode);
425
- return [2 /*return*/];
426
- }
427
- });
428
- }); });
429
- ava_1.default("JAVA_Hold_006h", function (t) { return __awaiter(void 0, void 0, void 0, function () {
430
- var config, card, saleResponse, response;
431
- return __generator(this, function (_a) {
432
- switch (_a.label) {
433
- case 0:
434
- t.plan(2);
435
- config = new src_1.ServicesConfig();
436
- config.merchantId = "heartlandgpsandbox";
437
- config.accountId = "api";
438
- config.sharedSecret = "secret";
439
- config.refundPassword = "refund";
440
- config.rebatePassword = "rebate";
441
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
442
- config.timeout = 5000;
443
- config.channel = "ECOM";
444
- src_1.ServicesContainer.configure(config);
445
- card = new src_1.CreditCardData();
446
- card.number = "4263970000005262";
447
- card.expMonth = "12";
448
- card.expYear = "2020";
449
- card.cvn = "123";
450
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
451
- card.cardHolderName = "James Mason";
452
- return [4 /*yield*/, card
453
- .charge(10)
454
- .withCurrency("EUR")
455
- .execute()];
456
- case 1:
457
- saleResponse = _a.sent();
458
- t.truthy(saleResponse);
459
- t.is("00", saleResponse.responseCode);
460
- return [4 /*yield*/, throttle()];
461
- case 2:
462
- _a.sent();
463
- return [4 /*yield*/, saleResponse
464
- .hold()
465
- .withReasonCode(src_1.ReasonCode.Fraud)
466
- .withDescription("JAVA-Hold")
467
- .execute()];
468
- case 3:
469
- response = _a.sent();
470
- t.truthy(response);
471
- t.is("00", response.responseCode);
472
- return [2 /*return*/];
473
- }
474
- });
475
- }); });
476
- ava_1.default("JAVA_Hold_006i", function (t) { return __awaiter(void 0, void 0, void 0, function () {
477
- var config, card, saleResponse, response;
478
- return __generator(this, function (_a) {
479
- switch (_a.label) {
480
- case 0:
481
- t.plan(2);
482
- config = new src_1.ServicesConfig();
483
- config.merchantId = "heartlandgpsandbox";
484
- config.accountId = "api";
485
- config.sharedSecret = "secret";
486
- config.refundPassword = "refund";
487
- config.rebatePassword = "rebate";
488
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
489
- config.timeout = 5000;
490
- config.channel = "ECOM";
491
- src_1.ServicesContainer.configure(config);
492
- card = new src_1.CreditCardData();
493
- card.number = "4263970000005262";
494
- card.expMonth = "12";
495
- card.expYear = "2020";
496
- card.cvn = "123";
497
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
498
- card.cardHolderName = "James Mason";
499
- return [4 /*yield*/, card
500
- .charge(10)
501
- .withCurrency("EUR")
502
- .execute()];
503
- case 1:
504
- saleResponse = _a.sent();
505
- t.truthy(saleResponse);
506
- t.is("00", saleResponse.responseCode);
507
- return [4 /*yield*/, throttle()];
508
- case 2:
509
- _a.sent();
510
- return [4 /*yield*/, saleResponse
511
- .hold()
512
- .withReasonCode(src_1.ReasonCode.Fraud)
513
- .withDescription("JAVA-Hold")
514
- .execute()];
515
- case 3:
516
- response = _a.sent();
517
- t.truthy(response);
518
- t.is("00", response.responseCode);
519
- return [2 /*return*/];
520
- }
521
- });
522
- }); });
523
- ava_1.default("JAVA_Hold_006k", function (t) { return __awaiter(void 0, void 0, void 0, function () {
524
- var config, card, saleResponse, response;
525
- return __generator(this, function (_a) {
526
- switch (_a.label) {
527
- case 0:
528
- t.plan(2);
529
- config = new src_1.ServicesConfig();
530
- config.merchantId = "heartlandgpsandbox";
531
- config.accountId = "api";
532
- config.sharedSecret = "secret";
533
- config.refundPassword = "refund";
534
- config.rebatePassword = "rebate";
535
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
536
- config.timeout = 5000;
537
- config.channel = "ECOM";
538
- src_1.ServicesContainer.configure(config);
539
- card = new src_1.CreditCardData();
540
- card.number = "4263970000005262";
541
- card.expMonth = "12";
542
- card.expYear = "2020";
543
- card.cvn = "123";
544
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
545
- card.cardHolderName = "James Mason";
546
- return [4 /*yield*/, card
547
- .charge(10)
548
- .withCurrency("EUR")
549
- .execute()];
550
- case 1:
551
- saleResponse = _a.sent();
552
- t.truthy(saleResponse);
553
- t.is("00", saleResponse.responseCode);
554
- return [4 /*yield*/, throttle()];
555
- case 2:
556
- _a.sent();
557
- return [4 /*yield*/, saleResponse
558
- .hold()
559
- .withReasonCode(src_1.ReasonCode.Fraud)
560
- .withDescription("JAVA-Hold")
561
- .execute()];
562
- case 3:
563
- response = _a.sent();
564
- t.truthy(response);
565
- t.is("00", response.responseCode);
566
- return [2 /*return*/];
567
- }
568
- });
569
- }); });
570
- ava_1.default("JAVA_Hold_006l", function (t) { return __awaiter(void 0, void 0, void 0, function () {
571
- var config, card, saleResponse, response;
572
- return __generator(this, function (_a) {
573
- switch (_a.label) {
574
- case 0:
575
- t.plan(2);
576
- config = new src_1.ServicesConfig();
577
- config.merchantId = "heartlandgpsandbox";
578
- config.accountId = "api";
579
- config.sharedSecret = "secret";
580
- config.refundPassword = "refund";
581
- config.rebatePassword = "rebate";
582
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
583
- config.timeout = 5000;
584
- config.channel = "ECOM";
585
- src_1.ServicesContainer.configure(config);
586
- card = new src_1.CreditCardData();
587
- card.number = "4263970000005262";
588
- card.expMonth = "12";
589
- card.expYear = "2020";
590
- card.cvn = "123";
591
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
592
- card.cardHolderName = "James Mason";
593
- return [4 /*yield*/, card
594
- .charge(10)
595
- .withCurrency("EUR")
596
- .execute()];
597
- case 1:
598
- saleResponse = _a.sent();
599
- t.truthy(saleResponse);
600
- t.is("00", saleResponse.responseCode);
601
- return [4 /*yield*/, throttle()];
602
- case 2:
603
- _a.sent();
604
- return [4 /*yield*/, saleResponse
605
- .hold()
606
- .withReasonCode(src_1.ReasonCode.Fraud)
607
- .withDescription("JAVA-Hold")
608
- .execute()];
609
- case 3:
610
- response = _a.sent();
611
- t.truthy(response);
612
- t.is("00", response.responseCode);
613
- return [2 /*return*/];
614
- }
615
- });
616
- }); });
617
- ava_1.default("JAVA_Hold_007a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
618
- var config, card, saleResponse, response;
619
- return __generator(this, function (_a) {
620
- switch (_a.label) {
621
- case 0:
622
- t.plan(2);
623
- config = new src_1.ServicesConfig();
624
- config.merchantId = "heartlandgpsandbox";
625
- config.accountId = "api";
626
- config.sharedSecret = "secret";
627
- config.refundPassword = "refund";
628
- config.rebatePassword = "rebate";
629
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
630
- config.timeout = 5000;
631
- config.channel = "ECOM";
632
- src_1.ServicesContainer.configure(config);
633
- card = new src_1.CreditCardData();
634
- card.number = "4263970000005262";
635
- card.expMonth = "12";
636
- card.expYear = "2020";
637
- card.cvn = "123";
638
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
639
- card.cardHolderName = "James Mason";
640
- return [4 /*yield*/, card
641
- .charge(10)
642
- .withCurrency("EUR")
643
- .execute()];
644
- case 1:
645
- saleResponse = _a.sent();
646
- t.truthy(saleResponse);
647
- t.is("00", saleResponse.responseCode);
648
- return [4 /*yield*/, throttle()];
649
- case 2:
650
- _a.sent();
651
- return [4 /*yield*/, saleResponse
652
- .hold()
653
- .withReasonCode(src_1.ReasonCode.Fraud)
654
- .withDescription("JAVA-Hold")
655
- .execute()];
656
- case 3:
657
- response = _a.sent();
658
- t.truthy(response);
659
- t.is("00", response.responseCode);
660
- return [2 /*return*/];
661
- }
662
- });
663
- }); });
664
- ava_1.default("JAVA_Hold_007b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
665
- var config, card, saleResponse, response;
666
- return __generator(this, function (_a) {
667
- switch (_a.label) {
668
- case 0:
669
- t.plan(2);
670
- config = new src_1.ServicesConfig();
671
- config.merchantId = "heartlandgpsandbox";
672
- config.accountId = "api";
673
- config.sharedSecret = "secret";
674
- config.refundPassword = "refund";
675
- config.rebatePassword = "rebate";
676
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
677
- config.timeout = 5000;
678
- config.channel = "ECOM";
679
- src_1.ServicesContainer.configure(config);
680
- card = new src_1.CreditCardData();
681
- card.number = "4263970000005262";
682
- card.expMonth = "12";
683
- card.expYear = "2020";
684
- card.cvn = "123";
685
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
686
- card.cardHolderName = "James Mason";
687
- return [4 /*yield*/, card
688
- .charge(10)
689
- .withCurrency("EUR")
690
- .execute()];
691
- case 1:
692
- saleResponse = _a.sent();
693
- t.truthy(saleResponse);
694
- t.is("00", saleResponse.responseCode);
695
- return [4 /*yield*/, throttle()];
696
- case 2:
697
- _a.sent();
698
- return [4 /*yield*/, saleResponse
699
- .hold()
700
- .withReasonCode(src_1.ReasonCode.Fraud)
701
- .withDescription("JAVA-Hold")
702
- .execute()];
703
- case 3:
704
- response = _a.sent();
705
- t.truthy(response);
706
- t.is("00", response.responseCode);
707
- return [2 /*return*/];
708
- }
709
- });
710
- }); });
711
- ava_1.default("JAVA_Hold_007c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
712
- var config, card, saleResponse, response;
713
- return __generator(this, function (_a) {
714
- switch (_a.label) {
715
- case 0:
716
- t.plan(2);
717
- config = new src_1.ServicesConfig();
718
- config.merchantId = "heartlandgpsandbox";
719
- config.accountId = "api";
720
- config.sharedSecret = "secret";
721
- config.refundPassword = "refund";
722
- config.rebatePassword = "rebate";
723
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
724
- config.timeout = 5000;
725
- config.channel = "ECOM";
726
- src_1.ServicesContainer.configure(config);
727
- card = new src_1.CreditCardData();
728
- card.number = "4263970000005262";
729
- card.expMonth = "12";
730
- card.expYear = "2020";
731
- card.cvn = "123";
732
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
733
- card.cardHolderName = "James Mason";
734
- return [4 /*yield*/, card
735
- .charge(10)
736
- .withCurrency("EUR")
737
- .execute()];
738
- case 1:
739
- saleResponse = _a.sent();
740
- t.truthy(saleResponse);
741
- t.is("00", saleResponse.responseCode);
742
- return [4 /*yield*/, throttle()];
743
- case 2:
744
- _a.sent();
745
- return [4 /*yield*/, saleResponse
746
- .hold()
747
- .withReasonCode(src_1.ReasonCode.Fraud)
748
- .withDescription("JAVA-Hold")
749
- .execute()];
750
- case 3:
751
- response = _a.sent();
752
- t.truthy(response);
753
- t.is("00", response.responseCode);
754
- return [2 /*return*/];
755
- }
756
- });
757
- }); });
758
- ava_1.default("JAVA_Hold_007d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
759
- var config, saleResponse, error;
760
- return __generator(this, function (_a) {
761
- t.plan(2);
762
- config = new src_1.ServicesConfig();
763
- config.merchantId = "heartlandgpsandbox";
764
- config.accountId = "api";
765
- config.sharedSecret = "secret";
766
- config.refundPassword = "refund";
767
- config.rebatePassword = "rebate";
768
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
769
- config.timeout = 5000;
770
- src_1.ServicesContainer.configure(config);
771
- saleResponse = src_1.Transaction.fromId(undefined);
772
- error = t.throws(function () {
773
- return saleResponse
774
- .hold()
775
- .withReasonCode(src_1.ReasonCode.Fraud)
776
- .execute();
777
- }, src_1.BuilderError);
778
- t.truthy(error.message);
779
- return [2 /*return*/];
780
- });
781
- }); });
782
- ava_1.default("JAVA_Hold_007e", function (t) { return __awaiter(void 0, void 0, void 0, function () {
783
- var config, saleResponse, error;
784
- return __generator(this, function (_a) {
785
- t.plan(2);
786
- config = new src_1.ServicesConfig();
787
- config.merchantId = "heartlandgpsandbox";
788
- config.accountId = "api";
789
- config.sharedSecret = "secret";
790
- config.refundPassword = "refund";
791
- config.rebatePassword = "rebate";
792
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
793
- config.timeout = 5000;
794
- src_1.ServicesContainer.configure(config);
795
- saleResponse = src_1.Transaction.fromId(undefined);
796
- error = t.throws(function () {
797
- return saleResponse
798
- .hold()
799
- .withReasonCode(src_1.ReasonCode.Fraud)
800
- .execute();
801
- }, src_1.BuilderError);
802
- t.truthy(error.message);
803
- return [2 /*return*/];
804
- });
805
- }); });
806
- ava_1.default("JAVA_Hold_008a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
807
- var config, card, saleResponse, response;
808
- return __generator(this, function (_a) {
809
- switch (_a.label) {
810
- case 0:
811
- t.plan(2);
812
- config = new src_1.ServicesConfig();
813
- config.merchantId = "heartlandgpsandbox";
814
- config.accountId = "api";
815
- config.sharedSecret = "secret";
816
- config.refundPassword = "refund";
817
- config.rebatePassword = "rebate";
818
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
819
- config.timeout = 5000;
820
- config.channel = "ECOM";
821
- src_1.ServicesContainer.configure(config);
822
- card = new src_1.CreditCardData();
823
- card.number = "4263970000005262";
824
- card.expMonth = "12";
825
- card.expYear = "2020";
826
- card.cvn = "123";
827
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
828
- card.cardHolderName = "James Mason";
829
- return [4 /*yield*/, card
830
- .charge(10)
831
- .withCurrency("EUR")
832
- .execute()];
833
- case 1:
834
- saleResponse = _a.sent();
835
- t.truthy(saleResponse);
836
- t.is("00", saleResponse.responseCode);
837
- return [4 /*yield*/, throttle()];
838
- case 2:
839
- _a.sent();
840
- return [4 /*yield*/, saleResponse
841
- .hold()
842
- .withReasonCode(src_1.ReasonCode.Fraud)
843
- .withDescription("JAVA-Hold")
844
- .execute()];
845
- case 3:
846
- response = _a.sent();
847
- t.truthy(response);
848
- t.is("00", response.responseCode);
849
- return [2 /*return*/];
850
- }
851
- });
852
- }); });
853
- ava_1.default("JAVA_Hold_008b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
854
- var config, card, saleResponse, response;
855
- return __generator(this, function (_a) {
856
- switch (_a.label) {
857
- case 0:
858
- t.plan(2);
859
- config = new src_1.ServicesConfig();
860
- config.merchantId = "heartlandgpsandbox";
861
- config.accountId = "api";
862
- config.sharedSecret = "secret";
863
- config.refundPassword = "refund";
864
- config.rebatePassword = "rebate";
865
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
866
- config.timeout = 5000;
867
- config.channel = "ECOM";
868
- src_1.ServicesContainer.configure(config);
869
- card = new src_1.CreditCardData();
870
- card.number = "4263970000005262";
871
- card.expMonth = "12";
872
- card.expYear = "2020";
873
- card.cvn = "123";
874
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
875
- card.cardHolderName = "James Mason";
876
- return [4 /*yield*/, card
877
- .charge(10)
878
- .withCurrency("EUR")
879
- .execute()];
880
- case 1:
881
- saleResponse = _a.sent();
882
- t.truthy(saleResponse);
883
- t.is("00", saleResponse.responseCode);
884
- return [4 /*yield*/, throttle()];
885
- case 2:
886
- _a.sent();
887
- return [4 /*yield*/, saleResponse
888
- .hold()
889
- .withReasonCode(src_1.ReasonCode.Fraud)
890
- .withDescription("JAVA-Hold")
891
- .execute()];
892
- case 3:
893
- response = _a.sent();
894
- t.truthy(response);
895
- t.is("00", response.responseCode);
896
- return [2 /*return*/];
897
- }
898
- });
899
- }); });
900
- ava_1.default("JAVA_Hold_008c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
901
- var config, saleResponse, error;
902
- return __generator(this, function (_a) {
903
- t.plan(2);
904
- config = new src_1.ServicesConfig();
905
- config.merchantId = "heartlandgpsandbox";
906
- config.accountId = "api";
907
- config.sharedSecret = "secret";
908
- config.refundPassword = "refund";
909
- config.rebatePassword = "rebate";
910
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
911
- config.timeout = 5000;
912
- src_1.ServicesContainer.configure(config);
913
- saleResponse = src_1.Transaction.fromId(undefined);
914
- error = t.throws(function () {
915
- return saleResponse
916
- .hold()
917
- .withReasonCode(src_1.ReasonCode.Fraud)
918
- .execute();
919
- }, src_1.BuilderError);
920
- t.truthy(error.message);
921
- return [2 /*return*/];
922
- });
923
- }); });
924
- ava_1.default("JAVA_Hold_008d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
925
- var config, saleResponse, error;
926
- return __generator(this, function (_a) {
927
- t.plan(2);
928
- config = new src_1.ServicesConfig();
929
- config.merchantId = "heartlandgpsandbox";
930
- config.accountId = "api";
931
- config.sharedSecret = "secret";
932
- config.refundPassword = "refund";
933
- config.rebatePassword = "rebate";
934
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
935
- config.timeout = 5000;
936
- src_1.ServicesContainer.configure(config);
937
- saleResponse = src_1.Transaction.fromId(undefined);
938
- error = t.throws(function () {
939
- return saleResponse
940
- .hold()
941
- .withReasonCode(src_1.ReasonCode.Fraud)
942
- .execute();
943
- }, src_1.BuilderError);
944
- t.truthy(error.message);
945
- return [2 /*return*/];
946
- });
947
- }); });
948
- ava_1.default("JAVA_Hold_008e", function (t) { return __awaiter(void 0, void 0, void 0, function () {
949
- var config, saleResponse, error;
950
- return __generator(this, function (_a) {
951
- t.plan(2);
952
- config = new src_1.ServicesConfig();
953
- config.merchantId = "heartlandgpsandbox";
954
- config.accountId = "api";
955
- config.sharedSecret = "secret";
956
- config.refundPassword = "refund";
957
- config.rebatePassword = "rebate";
958
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
959
- config.timeout = 5000;
960
- src_1.ServicesContainer.configure(config);
961
- saleResponse = src_1.Transaction.fromId(undefined);
962
- error = t.throws(function () {
963
- return saleResponse
964
- .hold()
965
- .withReasonCode(src_1.ReasonCode.Fraud)
966
- .execute();
967
- }, src_1.BuilderError);
968
- t.truthy(error.message);
969
- return [2 /*return*/];
970
- });
971
- }); });
972
- ava_1.default("JAVA_Hold_009c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
973
- var config, card, saleResponse, response;
974
- return __generator(this, function (_a) {
975
- switch (_a.label) {
976
- case 0:
977
- t.plan(2);
978
- config = new src_1.ServicesConfig();
979
- config.merchantId = "heartlandgpsandbox";
980
- config.accountId = "api";
981
- config.sharedSecret = "secret";
982
- config.refundPassword = "refund";
983
- config.rebatePassword = "rebate";
984
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
985
- config.timeout = 5000;
986
- config.channel = "ECOM";
987
- src_1.ServicesContainer.configure(config);
988
- card = new src_1.CreditCardData();
989
- card.number = "4263970000005262";
990
- card.expMonth = "12";
991
- card.expYear = "2020";
992
- card.cvn = "123";
993
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
994
- card.cardHolderName = "James Mason";
995
- return [4 /*yield*/, card
996
- .charge(10)
997
- .withCurrency("EUR")
998
- .execute()];
999
- case 1:
1000
- saleResponse = _a.sent();
1001
- t.truthy(saleResponse);
1002
- t.is("00", saleResponse.responseCode);
1003
- return [4 /*yield*/, throttle()];
1004
- case 2:
1005
- _a.sent();
1006
- return [4 /*yield*/, saleResponse
1007
- .hold()
1008
- .withReasonCode(src_1.ReasonCode.Fraud)
1009
- .withDescription("JAVA-Hold")
1010
- .execute()];
1011
- case 3:
1012
- response = _a.sent();
1013
- t.truthy(response);
1014
- t.is("00", response.responseCode);
1015
- return [2 /*return*/];
1016
- }
1017
- });
1018
- }); });
1019
- ava_1.default("JAVA_Hold_009d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1020
- var config, saleResponse, error;
1021
- return __generator(this, function (_a) {
1022
- t.plan(2);
1023
- config = new src_1.ServicesConfig();
1024
- config.merchantId = "heartlandgpsandbox";
1025
- config.accountId = "api";
1026
- config.sharedSecret = "secret";
1027
- config.refundPassword = "refund";
1028
- config.rebatePassword = "rebate";
1029
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1030
- config.timeout = 5000;
1031
- config.channel = "ECOM";
1032
- src_1.ServicesContainer.configure(config);
1033
- saleResponse = src_1.Transaction.fromId(undefined);
1034
- error = t.throws(function () {
1035
- return saleResponse
1036
- .hold()
1037
- .withReasonCode(src_1.ReasonCode.Fraud)
1038
- .withDescription("SDK-JAVA-Query")
1039
- .execute();
1040
- }, src_1.BuilderError);
1041
- t.truthy(error.message);
1042
- return [2 /*return*/];
1043
- });
1044
- }); });
1045
- ava_1.default("JAVA_Hold_009e", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1046
- var config, saleResponse, error;
1047
- return __generator(this, function (_a) {
1048
- t.plan(2);
1049
- config = new src_1.ServicesConfig();
1050
- config.merchantId = "heartlandgpsandbox";
1051
- config.accountId = "api";
1052
- config.sharedSecret = "secret";
1053
- config.refundPassword = "refund";
1054
- config.rebatePassword = "rebate";
1055
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1056
- config.timeout = 5000;
1057
- config.channel = "ECOM";
1058
- src_1.ServicesContainer.configure(config);
1059
- saleResponse = src_1.Transaction.fromId(undefined);
1060
- error = t.throws(function () {
1061
- return saleResponse
1062
- .hold()
1063
- .withReasonCode(src_1.ReasonCode.Fraud)
1064
- .withDescription("SDK-JAVA-Query")
1065
- .execute();
1066
- }, src_1.BuilderError);
1067
- t.truthy(error.message);
1068
- return [2 /*return*/];
1069
- });
1070
- }); });
1071
- ava_1.default("JAVA_Hold_010a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1072
- var config, card, saleResponse, response;
1073
- return __generator(this, function (_a) {
1074
- switch (_a.label) {
1075
- case 0:
1076
- t.plan(2);
1077
- config = new src_1.ServicesConfig();
1078
- config.merchantId = "heartlandgpsandbox";
1079
- config.accountId = "api";
1080
- config.sharedSecret = "secret";
1081
- config.refundPassword = "refund";
1082
- config.rebatePassword = "rebate";
1083
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1084
- config.timeout = 5000;
1085
- config.channel = "ECOM";
1086
- src_1.ServicesContainer.configure(config);
1087
- card = new src_1.CreditCardData();
1088
- card.number = "4263970000005262";
1089
- card.expMonth = "12";
1090
- card.expYear = "2020";
1091
- card.cvn = "123";
1092
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1093
- card.cardHolderName = "James Mason";
1094
- return [4 /*yield*/, card
1095
- .charge(10)
1096
- .withCurrency("EUR")
1097
- .execute()];
1098
- case 1:
1099
- saleResponse = _a.sent();
1100
- t.truthy(saleResponse);
1101
- t.is("00", saleResponse.responseCode);
1102
- return [4 /*yield*/, throttle()];
1103
- case 2:
1104
- _a.sent();
1105
- return [4 /*yield*/, saleResponse
1106
- .hold()
1107
- .withReasonCode(src_1.ReasonCode.Fraud)
1108
- .withDescription("JAVA-Hold")
1109
- .execute()];
1110
- case 3:
1111
- response = _a.sent();
1112
- t.truthy(response);
1113
- t.is("00", response.responseCode);
1114
- return [2 /*return*/];
1115
- }
1116
- });
1117
- }); });
1118
- ava_1.default("JAVA_Hold_010b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1119
- var config, card, saleResponse, response;
1120
- return __generator(this, function (_a) {
1121
- switch (_a.label) {
1122
- case 0:
1123
- t.plan(2);
1124
- config = new src_1.ServicesConfig();
1125
- config.merchantId = "heartlandgpsandbox";
1126
- config.accountId = "api";
1127
- config.sharedSecret = "secret";
1128
- config.refundPassword = "refund";
1129
- config.rebatePassword = "rebate";
1130
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1131
- config.timeout = 5000;
1132
- config.channel = "ECOM";
1133
- src_1.ServicesContainer.configure(config);
1134
- card = new src_1.CreditCardData();
1135
- card.number = "4263970000005262";
1136
- card.expMonth = "12";
1137
- card.expYear = "2020";
1138
- card.cvn = "123";
1139
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1140
- card.cardHolderName = "James Mason";
1141
- return [4 /*yield*/, card
1142
- .charge(10)
1143
- .withCurrency("EUR")
1144
- .execute()];
1145
- case 1:
1146
- saleResponse = _a.sent();
1147
- t.truthy(saleResponse);
1148
- t.is("00", saleResponse.responseCode);
1149
- return [4 /*yield*/, throttle()];
1150
- case 2:
1151
- _a.sent();
1152
- return [4 /*yield*/, saleResponse
1153
- .hold()
1154
- .withReasonCode(src_1.ReasonCode.Fraud)
1155
- .withDescription("JAVA-Hold")
1156
- .execute()];
1157
- case 3:
1158
- response = _a.sent();
1159
- t.truthy(response);
1160
- t.is("00", response.responseCode);
1161
- return [2 /*return*/];
1162
- }
1163
- });
1164
- }); });
1165
- ava_1.default("JAVA_Hold_010c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1166
- var config, saleResponse, error;
1167
- return __generator(this, function (_a) {
1168
- t.plan(2);
1169
- config = new src_1.ServicesConfig();
1170
- config.merchantId = "heartlandgpsandbox";
1171
- config.accountId = "api";
1172
- config.sharedSecret = "secret";
1173
- config.refundPassword = "refund";
1174
- config.rebatePassword = "rebate";
1175
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1176
- config.timeout = 5000;
1177
- config.channel = "ECOM";
1178
- src_1.ServicesContainer.configure(config);
1179
- saleResponse = src_1.Transaction.fromId(undefined);
1180
- error = t.throws(function () {
1181
- return saleResponse
1182
- .hold()
1183
- .withReasonCode(src_1.ReasonCode.Fraud)
1184
- .withDescription("JAVA-Hold")
1185
- .execute();
1186
- }, src_1.BuilderError);
1187
- t.truthy(error.message);
1188
- return [2 /*return*/];
1189
- });
1190
- }); });
1191
- ava_1.default("JAVA_Hold_010d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1192
- var config, card, saleResponse, response;
1193
- return __generator(this, function (_a) {
1194
- switch (_a.label) {
1195
- case 0:
1196
- t.plan(2);
1197
- config = new src_1.ServicesConfig();
1198
- config.merchantId = "heartlandgpsandbox";
1199
- config.accountId = "api";
1200
- config.sharedSecret = "secret";
1201
- config.refundPassword = "refund";
1202
- config.rebatePassword = "rebate";
1203
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1204
- config.timeout = 5000;
1205
- config.channel = "ECOM";
1206
- src_1.ServicesContainer.configure(config);
1207
- card = new src_1.CreditCardData();
1208
- card.number = "4263970000005262";
1209
- card.expMonth = "12";
1210
- card.expYear = "2020";
1211
- card.cvn = "123";
1212
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1213
- card.cardHolderName = "James Mason";
1214
- return [4 /*yield*/, card
1215
- .charge(10)
1216
- .withCurrency("EUR")
1217
- .execute()];
1218
- case 1:
1219
- saleResponse = _a.sent();
1220
- t.truthy(saleResponse);
1221
- t.is("00", saleResponse.responseCode);
1222
- return [4 /*yield*/, throttle()];
1223
- case 2:
1224
- _a.sent();
1225
- return [4 /*yield*/, saleResponse
1226
- .hold()
1227
- .withReasonCode(src_1.ReasonCode.Fraud)
1228
- .withDescription("JAVA-Hold")
1229
- .execute()];
1230
- case 3:
1231
- response = _a.sent();
1232
- t.truthy(response);
1233
- t.is("00", response.responseCode);
1234
- return [2 /*return*/];
1235
- }
1236
- });
1237
- }); });
1238
- ava_1.default("JAVA_Hold_011a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1239
- var config, card, saleResponse, response;
1240
- return __generator(this, function (_a) {
1241
- switch (_a.label) {
1242
- case 0:
1243
- t.plan(2);
1244
- config = new src_1.ServicesConfig();
1245
- config.merchantId = "heartlandgpsandbox";
1246
- config.accountId = "api";
1247
- config.sharedSecret = "secret";
1248
- config.refundPassword = "refund";
1249
- config.rebatePassword = "rebate";
1250
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1251
- config.timeout = 5000;
1252
- config.channel = "ECOM";
1253
- src_1.ServicesContainer.configure(config);
1254
- card = new src_1.CreditCardData();
1255
- card.number = "4263970000005262";
1256
- card.expMonth = "12";
1257
- card.expYear = "2020";
1258
- card.cvn = "123";
1259
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1260
- card.cardHolderName = "James Mason";
1261
- return [4 /*yield*/, card
1262
- .charge(10)
1263
- .withCurrency("EUR")
1264
- .execute()];
1265
- case 1:
1266
- saleResponse = _a.sent();
1267
- t.truthy(saleResponse);
1268
- t.is("00", saleResponse.responseCode);
1269
- return [4 /*yield*/, throttle()];
1270
- case 2:
1271
- _a.sent();
1272
- return [4 /*yield*/, saleResponse
1273
- .hold()
1274
- .withReasonCode(src_1.ReasonCode.Fraud)
1275
- .withDescription("JAVA-Hold")
1276
- .execute()];
1277
- case 3:
1278
- response = _a.sent();
1279
- t.truthy(response);
1280
- t.is("00", response.responseCode);
1281
- return [2 /*return*/];
1282
- }
1283
- });
1284
- }); });
1285
- ava_1.default("JAVA_Hold_011b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1286
- var config, card, saleResponse, response;
1287
- return __generator(this, function (_a) {
1288
- switch (_a.label) {
1289
- case 0:
1290
- t.plan(2);
1291
- config = new src_1.ServicesConfig();
1292
- config.merchantId = "heartlandgpsandbox";
1293
- config.accountId = "api";
1294
- config.sharedSecret = "secret";
1295
- config.refundPassword = "refund";
1296
- config.rebatePassword = "rebate";
1297
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1298
- config.timeout = 5000;
1299
- config.channel = "ECOM";
1300
- src_1.ServicesContainer.configure(config);
1301
- card = new src_1.CreditCardData();
1302
- card.number = "4263970000005262";
1303
- card.expMonth = "12";
1304
- card.expYear = "2020";
1305
- card.cvn = "123";
1306
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1307
- card.cardHolderName = "James Mason";
1308
- return [4 /*yield*/, card
1309
- .charge(10)
1310
- .withCurrency("EUR")
1311
- .execute()];
1312
- case 1:
1313
- saleResponse = _a.sent();
1314
- t.truthy(saleResponse);
1315
- t.is("00", saleResponse.responseCode);
1316
- return [4 /*yield*/, throttle()];
1317
- case 2:
1318
- _a.sent();
1319
- return [4 /*yield*/, saleResponse
1320
- .hold()
1321
- .withReasonCode(undefined)
1322
- .withDescription("JAVA-Hold")
1323
- .execute()];
1324
- case 3:
1325
- response = _a.sent();
1326
- t.truthy(response);
1327
- t.is("00", response.responseCode);
1328
- return [2 /*return*/];
1329
- }
1330
- });
1331
- }); });
1332
- ava_1.default("JAVA_Hold_011c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1333
- var config, card, saleResponse, response;
1334
- return __generator(this, function (_a) {
1335
- switch (_a.label) {
1336
- case 0:
1337
- t.plan(2);
1338
- config = new src_1.ServicesConfig();
1339
- config.merchantId = "heartlandgpsandbox";
1340
- config.accountId = "api";
1341
- config.sharedSecret = "secret";
1342
- config.refundPassword = "refund";
1343
- config.rebatePassword = "rebate";
1344
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1345
- config.timeout = 5000;
1346
- config.channel = "ECOM";
1347
- src_1.ServicesContainer.configure(config);
1348
- card = new src_1.CreditCardData();
1349
- card.number = "4263970000005262";
1350
- card.expMonth = "12";
1351
- card.expYear = "2020";
1352
- card.cvn = "123";
1353
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1354
- card.cardHolderName = "James Mason";
1355
- return [4 /*yield*/, card
1356
- .charge(10)
1357
- .withCurrency("EUR")
1358
- .execute()];
1359
- case 1:
1360
- saleResponse = _a.sent();
1361
- t.truthy(saleResponse);
1362
- t.is("00", saleResponse.responseCode);
1363
- return [4 /*yield*/, throttle()];
1364
- case 2:
1365
- _a.sent();
1366
- return [4 /*yield*/, saleResponse
1367
- .hold()
1368
- .withDescription("JAVA-Hold")
1369
- .execute()];
1370
- case 3:
1371
- response = _a.sent();
1372
- t.truthy(response);
1373
- t.is("00", response.responseCode);
1374
- return [2 /*return*/];
1375
- }
1376
- });
1377
- }); });
1378
- ava_1.default("JAVA_Hold_011d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1379
- var config, card, saleResponse, response;
1380
- return __generator(this, function (_a) {
1381
- switch (_a.label) {
1382
- case 0:
1383
- t.plan(2);
1384
- config = new src_1.ServicesConfig();
1385
- config.merchantId = "heartlandgpsandbox";
1386
- config.accountId = "api";
1387
- config.sharedSecret = "secret";
1388
- config.refundPassword = "refund";
1389
- config.rebatePassword = "rebate";
1390
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1391
- config.timeout = 5000;
1392
- config.channel = "ECOM";
1393
- src_1.ServicesContainer.configure(config);
1394
- card = new src_1.CreditCardData();
1395
- card.number = "4263970000005262";
1396
- card.expMonth = "12";
1397
- card.expYear = "2020";
1398
- card.cvn = "123";
1399
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1400
- card.cardHolderName = "James Mason";
1401
- return [4 /*yield*/, card
1402
- .charge(10)
1403
- .withCurrency("EUR")
1404
- .execute()];
1405
- case 1:
1406
- saleResponse = _a.sent();
1407
- t.truthy(saleResponse);
1408
- t.is("00", saleResponse.responseCode);
1409
- return [4 /*yield*/, throttle()];
1410
- case 2:
1411
- _a.sent();
1412
- return [4 /*yield*/, saleResponse
1413
- .hold()
1414
- .withReasonCode(undefined)
1415
- .withDescription("JAVA-Hold")
1416
- .execute()];
1417
- case 3:
1418
- response = _a.sent();
1419
- t.truthy(response);
1420
- t.is("00", response.responseCode);
1421
- return [2 /*return*/];
1422
- }
1423
- });
1424
- }); });
1425
- ava_1.default("JAVA_Hold_012a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1426
- var config, card, saleResponse, response;
1427
- return __generator(this, function (_a) {
1428
- switch (_a.label) {
1429
- case 0:
1430
- t.plan(2);
1431
- config = new src_1.ServicesConfig();
1432
- config.merchantId = "heartlandgpsandbox";
1433
- config.accountId = "api";
1434
- config.sharedSecret = "secret";
1435
- config.refundPassword = "refund";
1436
- config.rebatePassword = "rebate";
1437
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1438
- config.timeout = 5000;
1439
- config.channel = "ECOM";
1440
- src_1.ServicesContainer.configure(config);
1441
- card = new src_1.CreditCardData();
1442
- card.number = "4263970000005262";
1443
- card.expMonth = "12";
1444
- card.expYear = "2020";
1445
- card.cvn = "123";
1446
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1447
- card.cardHolderName = "James Mason";
1448
- return [4 /*yield*/, card
1449
- .charge(10)
1450
- .withCurrency("EUR")
1451
- .execute()];
1452
- case 1:
1453
- saleResponse = _a.sent();
1454
- t.truthy(saleResponse);
1455
- t.is("00", saleResponse.responseCode);
1456
- return [4 /*yield*/, throttle()];
1457
- case 2:
1458
- _a.sent();
1459
- return [4 /*yield*/, saleResponse
1460
- .hold()
1461
- .withReasonCode(src_1.ReasonCode.Fraud)
1462
- .withDescription("JAVA-Hold")
1463
- .execute()];
1464
- case 3:
1465
- response = _a.sent();
1466
- t.truthy(response);
1467
- t.is("00", response.responseCode);
1468
- return [2 /*return*/];
1469
- }
1470
- });
1471
- }); });
1472
- ava_1.default("JAVA_Hold_012b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1473
- var config, card, saleResponse, error;
1474
- return __generator(this, function (_a) {
1475
- switch (_a.label) {
1476
- case 0:
1477
- t.plan(2);
1478
- config = new src_1.ServicesConfig();
1479
- config.merchantId = "heartlandgpsandbox";
1480
- config.accountId = "api";
1481
- config.sharedSecret = "secreto";
1482
- config.refundPassword = "refund";
1483
- config.rebatePassword = "rebate";
1484
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1485
- config.timeout = 5000;
1486
- config.channel = "ECOM";
1487
- src_1.ServicesContainer.configure(config);
1488
- card = new src_1.CreditCardData();
1489
- card.number = "4263970000005262";
1490
- card.expMonth = "12";
1491
- card.expYear = "2020";
1492
- card.cvn = "123";
1493
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1494
- card.cardHolderName = "James Mason";
1495
- return [4 /*yield*/, card
1496
- .charge(10)
1497
- .withCurrency("EUR")
1498
- .execute()];
1499
- case 1:
1500
- saleResponse = _a.sent();
1501
- t.truthy(saleResponse);
1502
- t.is("00", saleResponse.responseCode);
1503
- return [4 /*yield*/, throttle()];
1504
- case 2:
1505
- _a.sent();
1506
- return [4 /*yield*/, t.throws(saleResponse
1507
- .hold()
1508
- .withReasonCode(src_1.ReasonCode.Fraud)
1509
- .withDescription("SDK-JAVA-Query")
1510
- .execute(), src_1.GatewayError)];
1511
- case 3:
1512
- error = _a.sent();
1513
- t.truthy(error.message);
1514
- return [2 /*return*/];
1515
- }
1516
- });
1517
- }); });
1518
- ava_1.default("JAVA_Hold_013a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1519
- var config, card, saleResponse, response;
1520
- return __generator(this, function (_a) {
1521
- switch (_a.label) {
1522
- case 0:
1523
- t.plan(2);
1524
- config = new src_1.ServicesConfig();
1525
- config.merchantId = "heartlandgpsandbox";
1526
- config.accountId = "api";
1527
- config.sharedSecret = "secret";
1528
- config.refundPassword = "refund";
1529
- config.rebatePassword = "rebate";
1530
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1531
- config.timeout = 5000;
1532
- config.channel = "ECOM";
1533
- src_1.ServicesContainer.configure(config);
1534
- card = new src_1.CreditCardData();
1535
- card.number = "4263970000005262";
1536
- card.expMonth = "12";
1537
- card.expYear = "2020";
1538
- card.cvn = "123";
1539
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1540
- card.cardHolderName = "James Mason";
1541
- return [4 /*yield*/, card
1542
- .charge(10)
1543
- .withCurrency("EUR")
1544
- .execute()];
1545
- case 1:
1546
- saleResponse = _a.sent();
1547
- t.truthy(saleResponse);
1548
- t.is("00", saleResponse.responseCode);
1549
- return [4 /*yield*/, throttle()];
1550
- case 2:
1551
- _a.sent();
1552
- return [4 /*yield*/, saleResponse
1553
- .hold()
1554
- .withReasonCode(src_1.ReasonCode.Fraud)
1555
- .withDescription("JAVA-Hold")
1556
- .execute()];
1557
- case 3:
1558
- response = _a.sent();
1559
- t.truthy(response);
1560
- t.is("00", response.responseCode);
1561
- return [2 /*return*/];
1562
- }
1563
- });
1564
- }); });
1565
- ava_1.default("JAVA_Hold_013b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1566
- var config, card, saleResponse, error;
1567
- return __generator(this, function (_a) {
1568
- switch (_a.label) {
1569
- case 0:
1570
- t.plan(2);
1571
- config = new src_1.ServicesConfig();
1572
- config.merchantId = "heartlandgpsandbox";
1573
- config.accountId = "api";
1574
- config.sharedSecret = "secret";
1575
- config.refundPassword = "refund";
1576
- config.rebatePassword = "rebate";
1577
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1578
- config.timeout = 5000;
1579
- config.channel = "EC";
1580
- src_1.ServicesContainer.configure(config);
1581
- card = new src_1.CreditCardData();
1582
- card.number = "4263970000005262";
1583
- card.expMonth = "12";
1584
- card.expYear = "2020";
1585
- card.cvn = "123";
1586
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1587
- card.cardHolderName = "James Mason";
1588
- return [4 /*yield*/, card
1589
- .charge(10)
1590
- .withCurrency("EUR")
1591
- .execute()];
1592
- case 1:
1593
- saleResponse = _a.sent();
1594
- t.truthy(saleResponse);
1595
- t.is("00", saleResponse.responseCode);
1596
- return [4 /*yield*/, throttle()];
1597
- case 2:
1598
- _a.sent();
1599
- return [4 /*yield*/, t.throws(saleResponse
1600
- .hold()
1601
- .withReasonCode(src_1.ReasonCode.Fraud)
1602
- .withDescription("SDK-JAVA-Query")
1603
- .execute(), src_1.GatewayError)];
1604
- case 3:
1605
- error = _a.sent();
1606
- t.truthy(error.message);
1607
- return [2 /*return*/];
1608
- }
1609
- });
1610
- }); });
1611
- ava_1.default("JAVA_Hold_013c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1612
- var config, card, saleResponse, error;
1613
- return __generator(this, function (_a) {
1614
- switch (_a.label) {
1615
- case 0:
1616
- t.plan(2);
1617
- config = new src_1.ServicesConfig();
1618
- config.merchantId = "heartlandgpsandbox";
1619
- config.accountId = "api";
1620
- config.sharedSecret = "secret";
1621
- config.refundPassword = "refund";
1622
- config.rebatePassword = "rebate";
1623
- config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1624
- config.timeout = 5000;
1625
- config.channel = "ECOOOOOOOOM";
1626
- src_1.ServicesContainer.configure(config);
1627
- card = new src_1.CreditCardData();
1628
- card.number = "4263970000005262";
1629
- card.expMonth = "12";
1630
- card.expYear = "2020";
1631
- card.cvn = "123";
1632
- card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1633
- card.cardHolderName = "James Mason";
1634
- return [4 /*yield*/, card
1635
- .charge(10)
1636
- .withCurrency("EUR")
1637
- .execute()];
1638
- case 1:
1639
- saleResponse = _a.sent();
1640
- t.truthy(saleResponse);
1641
- t.is("00", saleResponse.responseCode);
1642
- return [4 /*yield*/, throttle()];
1643
- case 2:
1644
- _a.sent();
1645
- return [4 /*yield*/, t.throws(saleResponse
1646
- .hold()
1647
- .withReasonCode(src_1.ReasonCode.Fraud)
1648
- .withDescription("SDK-JAVA-Query")
1649
- .execute(), src_1.GatewayError)];
1650
- case 3:
1651
- error = _a.sent();
1652
- t.truthy(error.message);
1653
- return [2 /*return*/];
1654
- }
1655
- });
1656
- }); });
1657
- //# sourceMappingURL=HoldTest.js.map