globalpayments-api 3.5.1-fix-3 → 3.5.1-fix-4

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 (778) hide show
  1. package/lib/src/Builders/AuthorizationBuilder.d.ts +348 -0
  2. package/lib/src/Builders/AuthorizationBuilder.js +668 -0
  3. package/lib/src/Builders/AuthorizationBuilder.js.map +1 -0
  4. package/lib/src/Builders/BaseBuilder/ValidationClause.d.ts +16 -0
  5. package/lib/src/Builders/BaseBuilder/ValidationClause.js +92 -0
  6. package/lib/src/Builders/BaseBuilder/ValidationClause.js.map +1 -0
  7. package/lib/src/Builders/BaseBuilder/ValidationTarget.d.ts +16 -0
  8. package/lib/src/Builders/BaseBuilder/ValidationTarget.js +36 -0
  9. package/lib/src/Builders/BaseBuilder/ValidationTarget.js.map +1 -0
  10. package/lib/src/Builders/BaseBuilder/Validations.d.ts +11 -0
  11. package/lib/src/Builders/BaseBuilder/Validations.js +55 -0
  12. package/lib/src/Builders/BaseBuilder/Validations.js.map +1 -0
  13. package/lib/src/Builders/BaseBuilder.d.ts +11 -0
  14. package/lib/src/Builders/BaseBuilder.js +17 -0
  15. package/lib/src/Builders/BaseBuilder.js.map +1 -0
  16. package/lib/src/Builders/ManagementBuilder.d.ts +122 -0
  17. package/lib/src/Builders/ManagementBuilder.js +244 -0
  18. package/lib/src/Builders/ManagementBuilder.js.map +1 -0
  19. package/lib/src/Builders/PayFacBuilder.d.ts +97 -0
  20. package/lib/src/Builders/PayFacBuilder.js +233 -0
  21. package/lib/src/Builders/PayFacBuilder.js.map +1 -0
  22. package/lib/src/Builders/RecurringBuilder.d.ts +13 -0
  23. package/lib/src/Builders/RecurringBuilder.js +34 -0
  24. package/lib/src/Builders/RecurringBuilder.js.map +1 -0
  25. package/lib/src/Builders/ReportBuilder.d.ts +10 -0
  26. package/lib/src/Builders/ReportBuilder.js +27 -0
  27. package/lib/src/Builders/ReportBuilder.js.map +1 -0
  28. package/lib/src/Builders/RequestBuilder/GpApi/AccessTokenRequest.d.ts +11 -0
  29. package/lib/src/Builders/RequestBuilder/GpApi/AccessTokenRequest.js +23 -0
  30. package/lib/src/Builders/RequestBuilder/GpApi/AccessTokenRequest.js.map +1 -0
  31. package/lib/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.d.ts +35 -0
  32. package/lib/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.js +448 -0
  33. package/lib/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.js.map +1 -0
  34. package/lib/src/Builders/RequestBuilder/GpApi/GpApiManagementRequestBuilder.d.ts +7 -0
  35. package/lib/src/Builders/RequestBuilder/GpApi/GpApiManagementRequestBuilder.js +179 -0
  36. package/lib/src/Builders/RequestBuilder/GpApi/GpApiManagementRequestBuilder.js.map +1 -0
  37. package/lib/src/Builders/RequestBuilder/GpApi/GpApiMiCRequestBuilder.d.ts +16 -0
  38. package/lib/src/Builders/RequestBuilder/GpApi/GpApiMiCRequestBuilder.js +34 -0
  39. package/lib/src/Builders/RequestBuilder/GpApi/GpApiMiCRequestBuilder.js.map +1 -0
  40. package/lib/src/Builders/RequestBuilder/GpApi/GpApiReportRequestBuilder.d.ts +11 -0
  41. package/lib/src/Builders/RequestBuilder/GpApi/GpApiReportRequestBuilder.js +163 -0
  42. package/lib/src/Builders/RequestBuilder/GpApi/GpApiReportRequestBuilder.js.map +1 -0
  43. package/lib/src/Builders/RequestBuilder/GpApi/GpApiSessionInfo.d.ts +6 -0
  44. package/lib/src/Builders/RequestBuilder/GpApi/GpApiSessionInfo.js +49 -0
  45. package/lib/src/Builders/RequestBuilder/GpApi/GpApiSessionInfo.js.map +1 -0
  46. package/lib/src/Builders/RequestBuilder/GpApi/index.d.ts +4 -0
  47. package/lib/src/Builders/RequestBuilder/GpApi/index.js +21 -0
  48. package/lib/src/Builders/RequestBuilder/GpApi/index.js.map +1 -0
  49. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.d.ts +18 -0
  50. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.js +125 -0
  51. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.js.map +1 -0
  52. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomManagementRequestBuilder.d.ts +11 -0
  53. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomManagementRequestBuilder.js +83 -0
  54. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomManagementRequestBuilder.js.map +1 -0
  55. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.d.ts +9 -0
  56. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.js +66 -0
  57. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.js.map +1 -0
  58. package/lib/src/Builders/RequestBuilder/GpEcom/index.d.ts +3 -0
  59. package/lib/src/Builders/RequestBuilder/GpEcom/index.js +20 -0
  60. package/lib/src/Builders/RequestBuilder/GpEcom/index.js.map +1 -0
  61. package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.d.ts +8 -0
  62. package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.js +39 -0
  63. package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.js.map +1 -0
  64. package/lib/src/Builders/RequestBuilder/index.d.ts +3 -0
  65. package/lib/src/Builders/RequestBuilder/index.js +20 -0
  66. package/lib/src/Builders/RequestBuilder/index.js.map +1 -0
  67. package/lib/src/Builders/TransactionBuilder.d.ts +13 -0
  68. package/lib/src/Builders/TransactionBuilder.js +47 -0
  69. package/lib/src/Builders/TransactionBuilder.js.map +1 -0
  70. package/lib/src/Builders/TransactionReportBuilder.d.ts +19 -0
  71. package/lib/src/Builders/TransactionReportBuilder.js +92 -0
  72. package/lib/src/Builders/TransactionReportBuilder.js.map +1 -0
  73. package/lib/src/Builders/index.d.ts +8 -0
  74. package/lib/src/Builders/index.js +25 -0
  75. package/lib/src/Builders/index.js.map +1 -0
  76. package/lib/src/ConfiguredServices.d.ts +24 -0
  77. package/lib/src/ConfiguredServices.js +33 -0
  78. package/lib/src/ConfiguredServices.js.map +1 -0
  79. package/lib/src/Entities/Address.d.ts +14 -0
  80. package/lib/src/Entities/Address.js +23 -0
  81. package/lib/src/Entities/Address.js.map +1 -0
  82. package/lib/src/Entities/BatchSummary.d.ts +6 -0
  83. package/lib/src/Entities/BatchSummary.js +11 -0
  84. package/lib/src/Entities/BatchSummary.js.map +1 -0
  85. package/lib/src/Entities/Card.d.ts +36 -0
  86. package/lib/src/Entities/Card.js +41 -0
  87. package/lib/src/Entities/Card.js.map +1 -0
  88. package/lib/src/Entities/CardIssuerResponse.d.ts +22 -0
  89. package/lib/src/Entities/CardIssuerResponse.js +27 -0
  90. package/lib/src/Entities/CardIssuerResponse.js.map +1 -0
  91. package/lib/src/Entities/Customer.d.ts +74 -0
  92. package/lib/src/Entities/Customer.js +94 -0
  93. package/lib/src/Entities/Customer.js.map +1 -0
  94. package/lib/src/Entities/CustomerDocument.d.ts +8 -0
  95. package/lib/src/Entities/CustomerDocument.js +16 -0
  96. package/lib/src/Entities/CustomerDocument.js.map +1 -0
  97. package/lib/src/Entities/DocumentUploadData.d.ts +13 -0
  98. package/lib/src/Entities/DocumentUploadData.js +81 -0
  99. package/lib/src/Entities/DocumentUploadData.js.map +1 -0
  100. package/lib/src/Entities/EcommerceInfo.d.ts +12 -0
  101. package/lib/src/Entities/EcommerceInfo.js +22 -0
  102. package/lib/src/Entities/EcommerceInfo.js.map +1 -0
  103. package/lib/src/Entities/EncryptionData.d.ts +7 -0
  104. package/lib/src/Entities/EncryptionData.js +16 -0
  105. package/lib/src/Entities/EncryptionData.js.map +1 -0
  106. package/lib/src/Entities/Enums/AcquisitionType.d.ts +10 -0
  107. package/lib/src/Entities/Enums/AcquisitionType.js +15 -0
  108. package/lib/src/Entities/Enums/AcquisitionType.js.map +1 -0
  109. package/lib/src/Entities/Enums/CardTypeFilter.d.ts +7 -0
  110. package/lib/src/Entities/Enums/CardTypeFilter.js +12 -0
  111. package/lib/src/Entities/Enums/CardTypeFilter.js.map +1 -0
  112. package/lib/src/Entities/Enums.d.ts +669 -0
  113. package/lib/src/Entities/Enums.js +859 -0
  114. package/lib/src/Entities/Enums.js.map +1 -0
  115. package/lib/src/Entities/Errors.d.ts +23 -0
  116. package/lib/src/Entities/Errors.js +72 -0
  117. package/lib/src/Entities/Errors.js.map +1 -0
  118. package/lib/src/Entities/FraudRule.d.ts +8 -0
  119. package/lib/src/Entities/FraudRule.js +17 -0
  120. package/lib/src/Entities/FraudRule.js.map +1 -0
  121. package/lib/src/Entities/GpApi/AccessTokenInfo.d.ts +16 -0
  122. package/lib/src/Entities/GpApi/AccessTokenInfo.js +21 -0
  123. package/lib/src/Entities/GpApi/AccessTokenInfo.js.map +1 -0
  124. package/lib/src/Entities/GpApi/DTO/Card.d.ts +16 -0
  125. package/lib/src/Entities/GpApi/DTO/Card.js +21 -0
  126. package/lib/src/Entities/GpApi/DTO/Card.js.map +1 -0
  127. package/lib/src/Entities/GpApi/DTO/PaymentMethod.d.ts +17 -0
  128. package/lib/src/Entities/GpApi/DTO/PaymentMethod.js +21 -0
  129. package/lib/src/Entities/GpApi/DTO/PaymentMethod.js.map +1 -0
  130. package/lib/src/Entities/GpApi/DTO/index.d.ts +2 -0
  131. package/lib/src/Entities/GpApi/DTO/index.js +19 -0
  132. package/lib/src/Entities/GpApi/DTO/index.js.map +1 -0
  133. package/lib/src/Entities/GpApi/GpApiAccount.d.ts +5 -0
  134. package/lib/src/Entities/GpApi/GpApiAccount.js +13 -0
  135. package/lib/src/Entities/GpApi/GpApiAccount.js.map +1 -0
  136. package/lib/src/Entities/GpApi/GpApiRequest.d.ts +21 -0
  137. package/lib/src/Entities/GpApi/GpApiRequest.js +26 -0
  138. package/lib/src/Entities/GpApi/GpApiRequest.js.map +1 -0
  139. package/lib/src/Entities/GpApi/GpApiTokenResponse.d.ts +52 -0
  140. package/lib/src/Entities/GpApi/GpApiTokenResponse.js +115 -0
  141. package/lib/src/Entities/GpApi/GpApiTokenResponse.js.map +1 -0
  142. package/lib/src/Entities/GpApi/PageResult.d.ts +8 -0
  143. package/lib/src/Entities/GpApi/PageResult.js +13 -0
  144. package/lib/src/Entities/GpApi/PageResult.js.map +1 -0
  145. package/lib/src/Entities/GpApi/index.d.ts +5 -0
  146. package/lib/src/Entities/GpApi/index.js +22 -0
  147. package/lib/src/Entities/GpApi/index.js.map +1 -0
  148. package/lib/src/Entities/HostedPaymentData.d.ts +10 -0
  149. package/lib/src/Entities/HostedPaymentData.js +17 -0
  150. package/lib/src/Entities/HostedPaymentData.js.map +1 -0
  151. package/lib/src/Entities/IRequestBuilder.d.ts +6 -0
  152. package/lib/src/Entities/IRequestBuilder.js +3 -0
  153. package/lib/src/Entities/IRequestBuilder.js.map +1 -0
  154. package/lib/src/Entities/IRequestLogger.d.ts +8 -0
  155. package/lib/src/Entities/IRequestLogger.js +3 -0
  156. package/lib/src/Entities/IRequestLogger.js.map +1 -0
  157. package/lib/src/Entities/LodgingData.d.ts +14 -0
  158. package/lib/src/Entities/LodgingData.js +18 -0
  159. package/lib/src/Entities/LodgingData.js.map +1 -0
  160. package/lib/src/Entities/LodgingItems.d.ts +6 -0
  161. package/lib/src/Entities/LodgingItems.js +11 -0
  162. package/lib/src/Entities/LodgingItems.js.map +1 -0
  163. package/lib/src/Entities/MaskedValueCollection.d.ts +12 -0
  164. package/lib/src/Entities/MaskedValueCollection.js +53 -0
  165. package/lib/src/Entities/MaskedValueCollection.js.map +1 -0
  166. package/lib/src/Entities/PayerDetails.d.ts +8 -0
  167. package/lib/src/Entities/PayerDetails.js +12 -0
  168. package/lib/src/Entities/PayerDetails.js.map +1 -0
  169. package/lib/src/Entities/PhoneNumber.d.ts +6 -0
  170. package/lib/src/Entities/PhoneNumber.js +15 -0
  171. package/lib/src/Entities/PhoneNumber.js.map +1 -0
  172. package/lib/src/Entities/ProFac/AccountBalanceResponseData.d.ts +7 -0
  173. package/lib/src/Entities/ProFac/AccountBalanceResponseData.js +12 -0
  174. package/lib/src/Entities/ProFac/AccountBalanceResponseData.js.map +1 -0
  175. package/lib/src/Entities/ProFac/AccountPermissions.d.ts +15 -0
  176. package/lib/src/Entities/ProFac/AccountPermissions.js +19 -0
  177. package/lib/src/Entities/ProFac/AccountPermissions.js.map +1 -0
  178. package/lib/src/Entities/ProFac/BankAccountData.d.ts +10 -0
  179. package/lib/src/Entities/ProFac/BankAccountData.js +42 -0
  180. package/lib/src/Entities/ProFac/BankAccountData.js.map +1 -0
  181. package/lib/src/Entities/ProFac/BankAccountOwnershipData.d.ts +8 -0
  182. package/lib/src/Entities/ProFac/BankAccountOwnershipData.js +15 -0
  183. package/lib/src/Entities/ProFac/BankAccountOwnershipData.js.map +1 -0
  184. package/lib/src/Entities/ProFac/BeneficialOwnerData.d.ts +6 -0
  185. package/lib/src/Entities/ProFac/BeneficialOwnerData.js +12 -0
  186. package/lib/src/Entities/ProFac/BeneficialOwnerData.js.map +1 -0
  187. package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.d.ts +5 -0
  188. package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.js +10 -0
  189. package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.js.map +1 -0
  190. package/lib/src/Entities/ProFac/BusinessData.d.ts +15 -0
  191. package/lib/src/Entities/ProFac/BusinessData.js +50 -0
  192. package/lib/src/Entities/ProFac/BusinessData.js.map +1 -0
  193. package/lib/src/Entities/ProFac/DeviceAttributeInfo.d.ts +4 -0
  194. package/lib/src/Entities/ProFac/DeviceAttributeInfo.js +17 -0
  195. package/lib/src/Entities/ProFac/DeviceAttributeInfo.js.map +1 -0
  196. package/lib/src/Entities/ProFac/DeviceData.d.ts +5 -0
  197. package/lib/src/Entities/ProFac/DeviceData.js +11 -0
  198. package/lib/src/Entities/ProFac/DeviceData.js.map +1 -0
  199. package/lib/src/Entities/ProFac/DeviceInfo.d.ts +6 -0
  200. package/lib/src/Entities/ProFac/DeviceInfo.js +19 -0
  201. package/lib/src/Entities/ProFac/DeviceInfo.js.map +1 -0
  202. package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.d.ts +7 -0
  203. package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.js +15 -0
  204. package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.js.map +1 -0
  205. package/lib/src/Entities/ProFac/GrossBillingInformation.d.ts +8 -0
  206. package/lib/src/Entities/ProFac/GrossBillingInformation.js +10 -0
  207. package/lib/src/Entities/ProFac/GrossBillingInformation.js.map +1 -0
  208. package/lib/src/Entities/ProFac/OrderDevice.d.ts +18 -0
  209. package/lib/src/Entities/ProFac/OrderDevice.js +23 -0
  210. package/lib/src/Entities/ProFac/OrderDevice.js.map +1 -0
  211. package/lib/src/Entities/ProFac/OwnersData.d.ts +12 -0
  212. package/lib/src/Entities/ProFac/OwnersData.js +43 -0
  213. package/lib/src/Entities/ProFac/OwnersData.js.map +1 -0
  214. package/lib/src/Entities/ProFac/PayFacResponseData.d.ts +55 -0
  215. package/lib/src/Entities/ProFac/PayFacResponseData.js +62 -0
  216. package/lib/src/Entities/ProFac/PayFacResponseData.js.map +1 -0
  217. package/lib/src/Entities/ProFac/RenewAccountData.d.ts +10 -0
  218. package/lib/src/Entities/ProFac/RenewAccountData.js +38 -0
  219. package/lib/src/Entities/ProFac/RenewAccountData.js.map +1 -0
  220. package/lib/src/Entities/ProFac/SignificantOwnerData.d.ts +8 -0
  221. package/lib/src/Entities/ProFac/SignificantOwnerData.js +27 -0
  222. package/lib/src/Entities/ProFac/SignificantOwnerData.js.map +1 -0
  223. package/lib/src/Entities/ProFac/ThreatRiskData.d.ts +5 -0
  224. package/lib/src/Entities/ProFac/ThreatRiskData.js +19 -0
  225. package/lib/src/Entities/ProFac/ThreatRiskData.js.map +1 -0
  226. package/lib/src/Entities/ProFac/UserPersonalData.d.ts +26 -0
  227. package/lib/src/Entities/ProFac/UserPersonalData.js +82 -0
  228. package/lib/src/Entities/ProFac/UserPersonalData.js.map +1 -0
  229. package/lib/src/Entities/RecurringEntity.d.ts +14 -0
  230. package/lib/src/Entities/RecurringEntity.js +92 -0
  231. package/lib/src/Entities/RecurringEntity.js.map +1 -0
  232. package/lib/src/Entities/Reporting/BaseSummary.d.ts +8 -0
  233. package/lib/src/Entities/Reporting/BaseSummary.js +13 -0
  234. package/lib/src/Entities/Reporting/BaseSummary.js.map +1 -0
  235. package/lib/src/Entities/Reporting/SearchCriteriaBuilder.d.ts +108 -0
  236. package/lib/src/Entities/Reporting/SearchCriteriaBuilder.js +125 -0
  237. package/lib/src/Entities/Reporting/SearchCriteriaBuilder.js.map +1 -0
  238. package/lib/src/Entities/Reporting/StoredPaymentMethodSummary.d.ts +11 -0
  239. package/lib/src/Entities/Reporting/StoredPaymentMethodSummary.js +16 -0
  240. package/lib/src/Entities/Reporting/StoredPaymentMethodSummary.js.map +1 -0
  241. package/lib/src/Entities/Reporting/index.d.ts +3 -0
  242. package/lib/src/Entities/Reporting/index.js +20 -0
  243. package/lib/src/Entities/Reporting/index.js.map +1 -0
  244. package/lib/src/Entities/Request.d.ts +10 -0
  245. package/lib/src/Entities/Request.js +18 -0
  246. package/lib/src/Entities/Request.js.map +1 -0
  247. package/lib/src/Entities/SSORequestData.d.ts +5 -0
  248. package/lib/src/Entities/SSORequestData.js +19 -0
  249. package/lib/src/Entities/SSORequestData.js.map +1 -0
  250. package/lib/src/Entities/Schedule.d.ts +47 -0
  251. package/lib/src/Entities/Schedule.js +325 -0
  252. package/lib/src/Entities/Schedule.js.map +1 -0
  253. package/lib/src/Entities/ServiceEndpoints.d.ts +12 -0
  254. package/lib/src/Entities/ServiceEndpoints.js +17 -0
  255. package/lib/src/Entities/ServiceEndpoints.js.map +1 -0
  256. package/lib/src/Entities/StoredCredentials.d.ts +9 -0
  257. package/lib/src/Entities/StoredCredentials.js +13 -0
  258. package/lib/src/Entities/StoredCredentials.js.map +1 -0
  259. package/lib/src/Entities/Transaction.d.ts +96 -0
  260. package/lib/src/Entities/Transaction.js +157 -0
  261. package/lib/src/Entities/Transaction.js.map +1 -0
  262. package/lib/src/Entities/TransactionStatus.d.ts +13 -0
  263. package/lib/src/Entities/TransactionStatus.js +29 -0
  264. package/lib/src/Entities/TransactionStatus.js.map +1 -0
  265. package/lib/src/Entities/TransactionSummary.d.ts +78 -0
  266. package/lib/src/Entities/TransactionSummary.js +83 -0
  267. package/lib/src/Entities/TransactionSummary.js.map +1 -0
  268. package/lib/src/Entities/UPA/ProcessIndicator.d.ts +7 -0
  269. package/lib/src/Entities/UPA/ProcessIndicator.js +11 -0
  270. package/lib/src/Entities/UPA/ProcessIndicator.js.map +1 -0
  271. package/lib/src/Entities/UPA/UpaParam.d.ts +10 -0
  272. package/lib/src/Entities/UPA/UpaParam.js +14 -0
  273. package/lib/src/Entities/UPA/UpaParam.js.map +1 -0
  274. package/lib/src/Entities/UPA/UpaTransactionData.d.ts +8 -0
  275. package/lib/src/Entities/UPA/UpaTransactionData.js +12 -0
  276. package/lib/src/Entities/UPA/UpaTransactionData.js.map +1 -0
  277. package/lib/src/Entities/UPA/index.d.ts +3 -0
  278. package/lib/src/Entities/UPA/index.js +20 -0
  279. package/lib/src/Entities/UPA/index.js.map +1 -0
  280. package/lib/src/Entities/index.d.ts +31 -0
  281. package/lib/src/Entities/index.js +48 -0
  282. package/lib/src/Entities/index.js.map +1 -0
  283. package/lib/src/Gateways/Gateway.d.ts +16 -0
  284. package/lib/src/Gateways/Gateway.js +94 -0
  285. package/lib/src/Gateways/Gateway.js.map +1 -0
  286. package/lib/src/Gateways/GatewayResponse.d.ts +8 -0
  287. package/lib/src/Gateways/GatewayResponse.js +15 -0
  288. package/lib/src/Gateways/GatewayResponse.js.map +1 -0
  289. package/lib/src/Gateways/GpApiConnector.d.ts +42 -0
  290. package/lib/src/Gateways/GpApiConnector.js +232 -0
  291. package/lib/src/Gateways/GpApiConnector.js.map +1 -0
  292. package/lib/src/Gateways/GpEcomConnector.d.ts +36 -0
  293. package/lib/src/Gateways/GpEcomConnector.js +468 -0
  294. package/lib/src/Gateways/GpEcomConnector.js.map +1 -0
  295. package/lib/src/Gateways/IPayFacProvider.d.ts +5 -0
  296. package/lib/src/Gateways/IPayFacProvider.js +3 -0
  297. package/lib/src/Gateways/IPayFacProvider.js.map +1 -0
  298. package/lib/src/Gateways/IPaymentGateway.d.ts +8 -0
  299. package/lib/src/Gateways/IPaymentGateway.js +3 -0
  300. package/lib/src/Gateways/IPaymentGateway.js.map +1 -0
  301. package/lib/src/Gateways/IRecurringService.d.ts +6 -0
  302. package/lib/src/Gateways/IRecurringService.js +3 -0
  303. package/lib/src/Gateways/IRecurringService.js.map +1 -0
  304. package/lib/src/Gateways/PayPlanConnector.d.ts +42 -0
  305. package/lib/src/Gateways/PayPlanConnector.js +545 -0
  306. package/lib/src/Gateways/PayPlanConnector.js.map +1 -0
  307. package/lib/src/Gateways/PorticoConnector.d.ts +48 -0
  308. package/lib/src/Gateways/PorticoConnector.js +1013 -0
  309. package/lib/src/Gateways/PorticoConnector.js.map +1 -0
  310. package/lib/src/Gateways/ProPayConnector.d.ts +45 -0
  311. package/lib/src/Gateways/ProPayConnector.js +801 -0
  312. package/lib/src/Gateways/ProPayConnector.js.map +1 -0
  313. package/lib/src/Gateways/RestGateway.d.ts +9 -0
  314. package/lib/src/Gateways/RestGateway.js +77 -0
  315. package/lib/src/Gateways/RestGateway.js.map +1 -0
  316. package/lib/src/Gateways/XmlGateway.d.ts +6 -0
  317. package/lib/src/Gateways/XmlGateway.js +54 -0
  318. package/lib/src/Gateways/XmlGateway.js.map +1 -0
  319. package/lib/src/Gateways/https-wrapper.d.ts +3 -0
  320. package/lib/src/Gateways/https-wrapper.js +81 -0
  321. package/lib/src/Gateways/https-wrapper.js.map +1 -0
  322. package/lib/src/Gateways/index.d.ts +9 -0
  323. package/lib/src/Gateways/index.js +26 -0
  324. package/lib/src/Gateways/index.js.map +1 -0
  325. package/lib/src/HostedPaymentConfig.d.ts +12 -0
  326. package/lib/src/HostedPaymentConfig.js +16 -0
  327. package/lib/src/HostedPaymentConfig.js.map +1 -0
  328. package/lib/src/Mapping/EnumMapping.d.ts +8 -0
  329. package/lib/src/Mapping/EnumMapping.js +84 -0
  330. package/lib/src/Mapping/EnumMapping.js.map +1 -0
  331. package/lib/src/Mapping/GpApiMapping.d.ts +15 -0
  332. package/lib/src/Mapping/GpApiMapping.js +285 -0
  333. package/lib/src/Mapping/GpApiMapping.js.map +1 -0
  334. package/lib/src/Mapping/GpEcomMapping.d.ts +9 -0
  335. package/lib/src/Mapping/GpEcomMapping.js +85 -0
  336. package/lib/src/Mapping/GpEcomMapping.js.map +1 -0
  337. package/lib/src/Mapping/index.d.ts +3 -0
  338. package/lib/src/Mapping/index.js +20 -0
  339. package/lib/src/Mapping/index.js.map +1 -0
  340. package/lib/src/PaymentMethods/AlternativePaymentMethod.d.ts +22 -0
  341. package/lib/src/PaymentMethods/AlternativePaymentMethod.js +47 -0
  342. package/lib/src/PaymentMethods/AlternativePaymentMethod.js.map +1 -0
  343. package/lib/src/PaymentMethods/Cash.d.ts +8 -0
  344. package/lib/src/PaymentMethods/Cash.js +16 -0
  345. package/lib/src/PaymentMethods/Cash.js.map +1 -0
  346. package/lib/src/PaymentMethods/Credit.d.ts +109 -0
  347. package/lib/src/PaymentMethods/Credit.js +161 -0
  348. package/lib/src/PaymentMethods/Credit.js.map +1 -0
  349. package/lib/src/PaymentMethods/CreditCardData.d.ts +20 -0
  350. package/lib/src/PaymentMethods/CreditCardData.js +47 -0
  351. package/lib/src/PaymentMethods/CreditCardData.js.map +1 -0
  352. package/lib/src/PaymentMethods/CreditTrackData.d.ts +15 -0
  353. package/lib/src/PaymentMethods/CreditTrackData.js +36 -0
  354. package/lib/src/PaymentMethods/CreditTrackData.js.map +1 -0
  355. package/lib/src/PaymentMethods/Debit.d.ts +48 -0
  356. package/lib/src/PaymentMethods/Debit.js +64 -0
  357. package/lib/src/PaymentMethods/Debit.js.map +1 -0
  358. package/lib/src/PaymentMethods/DebitTrackData.d.ts +9 -0
  359. package/lib/src/PaymentMethods/DebitTrackData.js +24 -0
  360. package/lib/src/PaymentMethods/DebitTrackData.js.map +1 -0
  361. package/lib/src/PaymentMethods/EBT.d.ts +48 -0
  362. package/lib/src/PaymentMethods/EBT.js +68 -0
  363. package/lib/src/PaymentMethods/EBT.js.map +1 -0
  364. package/lib/src/PaymentMethods/EBTCardData.d.ts +16 -0
  365. package/lib/src/PaymentMethods/EBTCardData.js +25 -0
  366. package/lib/src/PaymentMethods/EBTCardData.js.map +1 -0
  367. package/lib/src/PaymentMethods/EBTTrackData.d.ts +8 -0
  368. package/lib/src/PaymentMethods/EBTTrackData.js +11 -0
  369. package/lib/src/PaymentMethods/EBTTrackData.js.map +1 -0
  370. package/lib/src/PaymentMethods/ECheck.d.ts +32 -0
  371. package/lib/src/PaymentMethods/ECheck.js +38 -0
  372. package/lib/src/PaymentMethods/ECheck.js.map +1 -0
  373. package/lib/src/PaymentMethods/GiftCard.d.ts +131 -0
  374. package/lib/src/PaymentMethods/GiftCard.js +189 -0
  375. package/lib/src/PaymentMethods/GiftCard.js.map +1 -0
  376. package/lib/src/PaymentMethods/Interfaces.d.ts +59 -0
  377. package/lib/src/PaymentMethods/Interfaces.js +3 -0
  378. package/lib/src/PaymentMethods/Interfaces.js.map +1 -0
  379. package/lib/src/PaymentMethods/PaymentMethod.d.ts +19 -0
  380. package/lib/src/PaymentMethods/PaymentMethod.js +57 -0
  381. package/lib/src/PaymentMethods/PaymentMethod.js.map +1 -0
  382. package/lib/src/PaymentMethods/RecurringPaymentMethod.d.ts +25 -0
  383. package/lib/src/PaymentMethods/RecurringPaymentMethod.js +69 -0
  384. package/lib/src/PaymentMethods/RecurringPaymentMethod.js.map +1 -0
  385. package/lib/src/PaymentMethods/TransactionReference.d.ts +10 -0
  386. package/lib/src/PaymentMethods/TransactionReference.js +17 -0
  387. package/lib/src/PaymentMethods/TransactionReference.js.map +1 -0
  388. package/lib/src/PaymentMethods/index.d.ts +17 -0
  389. package/lib/src/PaymentMethods/index.js +34 -0
  390. package/lib/src/PaymentMethods/index.js.map +1 -0
  391. package/lib/src/ServiceConfigs/AcceptorConfig.d.ts +29 -0
  392. package/lib/src/ServiceConfigs/AcceptorConfig.js +43 -0
  393. package/lib/src/ServiceConfigs/AcceptorConfig.js.map +1 -0
  394. package/lib/src/ServiceConfigs/Configuration.d.ts +15 -0
  395. package/lib/src/ServiceConfigs/Configuration.js +20 -0
  396. package/lib/src/ServiceConfigs/Configuration.js.map +1 -0
  397. package/lib/src/ServiceConfigs/Gateways/GatewayConfig.d.ts +14 -0
  398. package/lib/src/ServiceConfigs/Gateways/GatewayConfig.js +30 -0
  399. package/lib/src/ServiceConfigs/Gateways/GatewayConfig.js.map +1 -0
  400. package/lib/src/ServiceConfigs/Gateways/GpApiConfig.d.ts +21 -0
  401. package/lib/src/ServiceConfigs/Gateways/GpApiConfig.js +45 -0
  402. package/lib/src/ServiceConfigs/Gateways/GpApiConfig.js.map +1 -0
  403. package/lib/src/ServiceConfigs/Gateways/GpEcomConfig.d.ts +21 -0
  404. package/lib/src/ServiceConfigs/Gateways/GpEcomConfig.js +51 -0
  405. package/lib/src/ServiceConfigs/Gateways/GpEcomConfig.js.map +1 -0
  406. package/lib/src/ServiceConfigs/Gateways/PorticoConfig.d.ts +22 -0
  407. package/lib/src/ServiceConfigs/Gateways/PorticoConfig.js +117 -0
  408. package/lib/src/ServiceConfigs/Gateways/PorticoConfig.js.map +1 -0
  409. package/lib/src/ServiceConfigs/Gateways/index.d.ts +4 -0
  410. package/lib/src/ServiceConfigs/Gateways/index.js +21 -0
  411. package/lib/src/ServiceConfigs/Gateways/index.js.map +1 -0
  412. package/lib/src/ServiceConfigs/ServicesConfigs.d.ts +8 -0
  413. package/lib/src/ServiceConfigs/ServicesConfigs.js +15 -0
  414. package/lib/src/ServiceConfigs/ServicesConfigs.js.map +1 -0
  415. package/lib/src/ServiceConfigs/index.d.ts +4 -0
  416. package/lib/src/ServiceConfigs/index.js +21 -0
  417. package/lib/src/ServiceConfigs/index.js.map +1 -0
  418. package/lib/src/Services/BatchService.d.ts +4 -0
  419. package/lib/src/Services/BatchService.js +15 -0
  420. package/lib/src/Services/BatchService.js.map +1 -0
  421. package/lib/src/Services/CheckService.d.ts +7 -0
  422. package/lib/src/Services/CheckService.js +20 -0
  423. package/lib/src/Services/CheckService.js.map +1 -0
  424. package/lib/src/Services/CreditService.d.ts +13 -0
  425. package/lib/src/Services/CreditService.js +54 -0
  426. package/lib/src/Services/CreditService.js.map +1 -0
  427. package/lib/src/Services/DebitService.d.ts +8 -0
  428. package/lib/src/Services/DebitService.js +28 -0
  429. package/lib/src/Services/DebitService.js.map +1 -0
  430. package/lib/src/Services/DeviceService.d.ts +5 -0
  431. package/lib/src/Services/DeviceService.js +19 -0
  432. package/lib/src/Services/DeviceService.js.map +1 -0
  433. package/lib/src/Services/EBTService.d.ts +9 -0
  434. package/lib/src/Services/EBTService.js +31 -0
  435. package/lib/src/Services/EBTService.js.map +1 -0
  436. package/lib/src/Services/GiftService.d.ts +17 -0
  437. package/lib/src/Services/GiftService.js +54 -0
  438. package/lib/src/Services/GiftService.js.map +1 -0
  439. package/lib/src/Services/GpApiServices.d.ts +4 -0
  440. package/lib/src/Services/GpApiServices.js +44 -0
  441. package/lib/src/Services/GpApiServices.js.map +1 -0
  442. package/lib/src/Services/HostedService.d.ts +10 -0
  443. package/lib/src/Services/HostedService.js +59 -0
  444. package/lib/src/Services/HostedService.js.map +1 -0
  445. package/lib/src/Services/PayFacService.d.ts +26 -0
  446. package/lib/src/Services/PayFacService.js +76 -0
  447. package/lib/src/Services/PayFacService.js.map +1 -0
  448. package/lib/src/Services/RecurringService.d.ts +8 -0
  449. package/lib/src/Services/RecurringService.js +24 -0
  450. package/lib/src/Services/RecurringService.js.map +1 -0
  451. package/lib/src/Services/ReportingService.d.ts +10 -0
  452. package/lib/src/Services/ReportingService.js +34 -0
  453. package/lib/src/Services/ReportingService.js.map +1 -0
  454. package/lib/src/Services/index.d.ts +10 -0
  455. package/lib/src/Services/index.js +27 -0
  456. package/lib/src/Services/index.js.map +1 -0
  457. package/lib/src/ServicesContainer.d.ts +19 -0
  458. package/lib/src/ServicesContainer.js +64 -0
  459. package/lib/src/ServicesContainer.js.map +1 -0
  460. package/lib/src/Terminals/Abstractions/IDeviceCommInterface.d.ts +6 -0
  461. package/lib/src/Terminals/Abstractions/IDeviceCommInterface.js +3 -0
  462. package/lib/src/Terminals/Abstractions/IDeviceCommInterface.js.map +1 -0
  463. package/lib/src/Terminals/Abstractions/IDeviceInterface.d.ts +13 -0
  464. package/lib/src/Terminals/Abstractions/IDeviceInterface.js +3 -0
  465. package/lib/src/Terminals/Abstractions/IDeviceInterface.js.map +1 -0
  466. package/lib/src/Terminals/Abstractions/IDeviceMessage.d.ts +4 -0
  467. package/lib/src/Terminals/Abstractions/IDeviceMessage.js +3 -0
  468. package/lib/src/Terminals/Abstractions/IDeviceMessage.js.map +1 -0
  469. package/lib/src/Terminals/Abstractions/IDeviceResponse.d.ts +52 -0
  470. package/lib/src/Terminals/Abstractions/IDeviceResponse.js +3 -0
  471. package/lib/src/Terminals/Abstractions/IDeviceResponse.js.map +1 -0
  472. package/lib/src/Terminals/Abstractions/IRequestIdProvider.d.ts +3 -0
  473. package/lib/src/Terminals/Abstractions/IRequestIdProvider.js +3 -0
  474. package/lib/src/Terminals/Abstractions/IRequestIdProvider.js.map +1 -0
  475. package/lib/src/Terminals/Abstractions/IRequestSubGroup.d.ts +3 -0
  476. package/lib/src/Terminals/Abstractions/IRequestSubGroup.js +3 -0
  477. package/lib/src/Terminals/Abstractions/IRequestSubGroup.js.map +1 -0
  478. package/lib/src/Terminals/Abstractions/ITerminalConfiguration.d.ts +16 -0
  479. package/lib/src/Terminals/Abstractions/ITerminalConfiguration.js +3 -0
  480. package/lib/src/Terminals/Abstractions/ITerminalConfiguration.js.map +1 -0
  481. package/lib/src/Terminals/Abstractions/index.d.ts +7 -0
  482. package/lib/src/Terminals/Abstractions/index.js +24 -0
  483. package/lib/src/Terminals/Abstractions/index.js.map +1 -0
  484. package/lib/src/Terminals/Builders/TerminalAuthBuilder.d.ts +65 -0
  485. package/lib/src/Terminals/Builders/TerminalAuthBuilder.js +172 -0
  486. package/lib/src/Terminals/Builders/TerminalAuthBuilder.js.map +1 -0
  487. package/lib/src/Terminals/Builders/TerminalBuilder.d.ts +12 -0
  488. package/lib/src/Terminals/Builders/TerminalBuilder.js +32 -0
  489. package/lib/src/Terminals/Builders/TerminalBuilder.js.map +1 -0
  490. package/lib/src/Terminals/Builders/TerminalManageBuilder.d.ts +30 -0
  491. package/lib/src/Terminals/Builders/TerminalManageBuilder.js +95 -0
  492. package/lib/src/Terminals/Builders/TerminalManageBuilder.js.map +1 -0
  493. package/lib/src/Terminals/Builders/index.d.ts +2 -0
  494. package/lib/src/Terminals/Builders/index.js +19 -0
  495. package/lib/src/Terminals/Builders/index.js.map +1 -0
  496. package/lib/src/Terminals/ConnectionConfig.d.ts +20 -0
  497. package/lib/src/Terminals/ConnectionConfig.js +49 -0
  498. package/lib/src/Terminals/ConnectionConfig.js.map +1 -0
  499. package/lib/src/Terminals/DeviceController.d.ts +23 -0
  500. package/lib/src/Terminals/DeviceController.js +42 -0
  501. package/lib/src/Terminals/DeviceController.js.map +1 -0
  502. package/lib/src/Terminals/DeviceInterface.d.ts +21 -0
  503. package/lib/src/Terminals/DeviceInterface.js +50 -0
  504. package/lib/src/Terminals/DeviceInterface.js.map +1 -0
  505. package/lib/src/Terminals/DeviceMessage.d.ts +15 -0
  506. package/lib/src/Terminals/DeviceMessage.js +42 -0
  507. package/lib/src/Terminals/DeviceMessage.js.map +1 -0
  508. package/lib/src/Terminals/DeviceResponse.d.ts +10 -0
  509. package/lib/src/Terminals/DeviceResponse.js +16 -0
  510. package/lib/src/Terminals/DeviceResponse.js.map +1 -0
  511. package/lib/src/Terminals/Enums/ControlCodes.d.ts +5 -0
  512. package/lib/src/Terminals/Enums/ControlCodes.js +10 -0
  513. package/lib/src/Terminals/Enums/ControlCodes.js.map +1 -0
  514. package/lib/src/Terminals/Enums/index.d.ts +1 -0
  515. package/lib/src/Terminals/Enums/index.js +18 -0
  516. package/lib/src/Terminals/Enums/index.js.map +1 -0
  517. package/lib/src/Terminals/Enums.d.ts +12 -0
  518. package/lib/src/Terminals/Enums.js +18 -0
  519. package/lib/src/Terminals/Enums.js.map +1 -0
  520. package/lib/src/Terminals/SummaryResponse.d.ts +28 -0
  521. package/lib/src/Terminals/SummaryResponse.js +33 -0
  522. package/lib/src/Terminals/SummaryResponse.js.map +1 -0
  523. package/lib/src/Terminals/TerminalResponse.d.ts +42 -0
  524. package/lib/src/Terminals/TerminalResponse.js +49 -0
  525. package/lib/src/Terminals/TerminalResponse.js.map +1 -0
  526. package/lib/src/Terminals/TerminalUtils.d.ts +4 -0
  527. package/lib/src/Terminals/TerminalUtils.js +24 -0
  528. package/lib/src/Terminals/TerminalUtils.js.map +1 -0
  529. package/lib/src/Terminals/UPA/Entities/UpaMessageId.d.ts +20 -0
  530. package/lib/src/Terminals/UPA/Entities/UpaMessageId.js +25 -0
  531. package/lib/src/Terminals/UPA/Entities/UpaMessageId.js.map +1 -0
  532. package/lib/src/Terminals/UPA/Entities/index.d.ts +1 -0
  533. package/lib/src/Terminals/UPA/Entities/index.js +18 -0
  534. package/lib/src/Terminals/UPA/Entities/index.js.map +1 -0
  535. package/lib/src/Terminals/UPA/Interfaces/UpaMicInterface.d.ts +12 -0
  536. package/lib/src/Terminals/UPA/Interfaces/UpaMicInterface.js +76 -0
  537. package/lib/src/Terminals/UPA/Interfaces/UpaMicInterface.js.map +1 -0
  538. package/lib/src/Terminals/UPA/Interfaces/index.d.ts +1 -0
  539. package/lib/src/Terminals/UPA/Interfaces/index.js +18 -0
  540. package/lib/src/Terminals/UPA/Interfaces/index.js.map +1 -0
  541. package/lib/src/Terminals/UPA/Reponses/TransactionResponse.d.ts +53 -0
  542. package/lib/src/Terminals/UPA/Reponses/TransactionResponse.js +70 -0
  543. package/lib/src/Terminals/UPA/Reponses/TransactionResponse.js.map +1 -0
  544. package/lib/src/Terminals/UPA/Reponses/index.d.ts +1 -0
  545. package/lib/src/Terminals/UPA/Reponses/index.js +18 -0
  546. package/lib/src/Terminals/UPA/Reponses/index.js.map +1 -0
  547. package/lib/src/Terminals/UPA/Request/BaseRequest.d.ts +7 -0
  548. package/lib/src/Terminals/UPA/Request/BaseRequest.js +11 -0
  549. package/lib/src/Terminals/UPA/Request/BaseRequest.js.map +1 -0
  550. package/lib/src/Terminals/UPA/Request/GroupRequest.d.ts +5 -0
  551. package/lib/src/Terminals/UPA/Request/GroupRequest.js +9 -0
  552. package/lib/src/Terminals/UPA/Request/GroupRequest.js.map +1 -0
  553. package/lib/src/Terminals/UPA/Request/RequestParams.d.ts +9 -0
  554. package/lib/src/Terminals/UPA/Request/RequestParams.js +14 -0
  555. package/lib/src/Terminals/UPA/Request/RequestParams.js.map +1 -0
  556. package/lib/src/Terminals/UPA/Request/RootRequest.d.ts +5 -0
  557. package/lib/src/Terminals/UPA/Request/RootRequest.js +9 -0
  558. package/lib/src/Terminals/UPA/Request/RootRequest.js.map +1 -0
  559. package/lib/src/Terminals/UPA/Request/TransactionRequest.d.ts +10 -0
  560. package/lib/src/Terminals/UPA/Request/TransactionRequest.js +15 -0
  561. package/lib/src/Terminals/UPA/Request/TransactionRequest.js.map +1 -0
  562. package/lib/src/Terminals/UPA/Request/index.d.ts +5 -0
  563. package/lib/src/Terminals/UPA/Request/index.js +22 -0
  564. package/lib/src/Terminals/UPA/Request/index.js.map +1 -0
  565. package/lib/src/Terminals/UPA/UpaController.d.ts +16 -0
  566. package/lib/src/Terminals/UPA/UpaController.js +213 -0
  567. package/lib/src/Terminals/UPA/UpaController.js.map +1 -0
  568. package/lib/src/Terminals/UPA/UpaInterface.d.ts +10 -0
  569. package/lib/src/Terminals/UPA/UpaInterface.js +44 -0
  570. package/lib/src/Terminals/UPA/UpaInterface.js.map +1 -0
  571. package/lib/src/Terminals/UPA/UpaMessageType.d.ts +8 -0
  572. package/lib/src/Terminals/UPA/UpaMessageType.js +13 -0
  573. package/lib/src/Terminals/UPA/UpaMessageType.js.map +1 -0
  574. package/lib/src/Terminals/UPA/index.d.ts +7 -0
  575. package/lib/src/Terminals/UPA/index.js +24 -0
  576. package/lib/src/Terminals/UPA/index.js.map +1 -0
  577. package/lib/src/Terminals/index.d.ts +8 -0
  578. package/lib/src/Terminals/index.js +25 -0
  579. package/lib/src/Terminals/index.js.map +1 -0
  580. package/lib/src/Utils/CardUtils.d.ts +13 -0
  581. package/lib/src/Utils/CardUtils.js +221 -0
  582. package/lib/src/Utils/CardUtils.js.map +1 -0
  583. package/lib/src/Utils/GenerationUtils.d.ts +6 -0
  584. package/lib/src/Utils/GenerationUtils.js +79 -0
  585. package/lib/src/Utils/GenerationUtils.js.map +1 -0
  586. package/lib/src/Utils/IRawRequestBuilder.d.ts +3 -0
  587. package/lib/src/Utils/IRawRequestBuilder.js +3 -0
  588. package/lib/src/Utils/IRawRequestBuilder.js.map +1 -0
  589. package/lib/src/Utils/InputValidation.d.ts +12 -0
  590. package/lib/src/Utils/InputValidation.js +71 -0
  591. package/lib/src/Utils/InputValidation.js.map +1 -0
  592. package/lib/src/Utils/Logging/Logger.d.ts +32 -0
  593. package/lib/src/Utils/Logging/Logger.js +209 -0
  594. package/lib/src/Utils/Logging/Logger.js.map +1 -0
  595. package/lib/src/Utils/Logging/ProtectSensitiveData.d.ts +11 -0
  596. package/lib/src/Utils/Logging/ProtectSensitiveData.js +23 -0
  597. package/lib/src/Utils/Logging/ProtectSensitiveData.js.map +1 -0
  598. package/lib/src/Utils/Logging/SampleRequestLogger.d.ts +12 -0
  599. package/lib/src/Utils/Logging/SampleRequestLogger.js +38 -0
  600. package/lib/src/Utils/Logging/SampleRequestLogger.js.map +1 -0
  601. package/lib/src/Utils/Logging/index.d.ts +3 -0
  602. package/lib/src/Utils/Logging/index.js +20 -0
  603. package/lib/src/Utils/Logging/index.js.map +1 -0
  604. package/lib/src/Utils/Sha1.d.ts +6 -0
  605. package/lib/src/Utils/Sha1.js +231 -0
  606. package/lib/src/Utils/Sha1.js.map +1 -0
  607. package/lib/src/Utils/StringUtils.d.ts +15 -0
  608. package/lib/src/Utils/StringUtils.js +80 -0
  609. package/lib/src/Utils/StringUtils.js.map +1 -0
  610. package/lib/src/Utils/index.d.ts +5 -0
  611. package/lib/src/Utils/index.js +22 -0
  612. package/lib/src/Utils/index.js.map +1 -0
  613. package/lib/src/index.d.ts +13 -0
  614. package/lib/src/index.js +34 -0
  615. package/lib/src/index.js.map +1 -0
  616. package/lib/test/Data/BaseGpApiTestConfig.d.ts +14 -0
  617. package/lib/test/Data/BaseGpApiTestConfig.js +50 -0
  618. package/lib/test/Data/BaseGpApiTestConfig.js.map +1 -0
  619. package/lib/test/Data/TestCards.d.ts +24 -0
  620. package/lib/test/Data/TestCards.js +220 -0
  621. package/lib/test/Data/TestCards.js.map +1 -0
  622. package/lib/test/Data/TestChecks.d.ts +4 -0
  623. package/lib/test/Data/TestChecks.js +27 -0
  624. package/lib/test/Data/TestChecks.js.map +1 -0
  625. package/lib/test/Data/index.d.ts +2 -0
  626. package/lib/test/Data/index.js +19 -0
  627. package/lib/test/Data/index.js.map +1 -0
  628. package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.d.ts +1 -0
  629. package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.js +109 -0
  630. package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.js.map +1 -0
  631. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.d.ts +1 -0
  632. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.js +1023 -0
  633. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.js.map +1 -0
  634. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardPresentTest.d.ts +1 -0
  635. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardPresentTest.js +439 -0
  636. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardPresentTest.js.map +1 -0
  637. package/lib/test/Integration/Gateways/GpApiConnector/DebitCardTest.d.ts +1 -0
  638. package/lib/test/Integration/Gateways/GpApiConnector/DebitCardTest.js +143 -0
  639. package/lib/test/Integration/Gateways/GpApiConnector/DebitCardTest.js.map +1 -0
  640. package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactionsTest.d.ts +1 -0
  641. package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactionsTest.js +434 -0
  642. package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactionsTest.js.map +1 -0
  643. package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethodsTest.d.ts +1 -0
  644. package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethodsTest.js +217 -0
  645. package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethodsTest.js.map +1 -0
  646. package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.d.ts +1 -0
  647. package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.js +337 -0
  648. package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.js.map +1 -0
  649. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.d.ts +1 -0
  650. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.js +2446 -0
  651. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.js.map +1 -0
  652. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.d.ts +1 -0
  653. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.js +506 -0
  654. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.js.map +1 -0
  655. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.d.ts +1 -0
  656. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.js +1296 -0
  657. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.js.map +1 -0
  658. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.d.ts +1 -0
  659. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.js +847 -0
  660. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.js.map +1 -0
  661. package/lib/test/Integration/Gateways/GpEcomConnector/CreditTest.d.ts +1 -0
  662. package/lib/test/Integration/Gateways/GpEcomConnector/CreditTest.js +215 -0
  663. package/lib/test/Integration/Gateways/GpEcomConnector/CreditTest.js.map +1 -0
  664. package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.d.ts +1 -0
  665. package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.js +99 -0
  666. package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.js.map +1 -0
  667. package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.d.ts +1 -0
  668. package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.js +133 -0
  669. package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.js.map +1 -0
  670. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.d.ts +1 -0
  671. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js +59 -0
  672. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js.map +1 -0
  673. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.d.ts +1 -0
  674. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js +378 -0
  675. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js.map +1 -0
  676. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.d.ts +1 -0
  677. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js +86 -0
  678. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js.map +1 -0
  679. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.d.ts +1 -0
  680. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js +1723 -0
  681. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js.map +1 -0
  682. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.d.ts +1 -0
  683. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js +86 -0
  684. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js.map +1 -0
  685. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.d.ts +1 -0
  686. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js +1760 -0
  687. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js.map +1 -0
  688. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.d.ts +1 -0
  689. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js +420 -0
  690. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js.map +1 -0
  691. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.d.ts +1 -0
  692. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js +2221 -0
  693. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js.map +1 -0
  694. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.d.ts +1 -0
  695. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js +392 -0
  696. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js.map +1 -0
  697. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.d.ts +1 -0
  698. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js +82 -0
  699. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js.map +1 -0
  700. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.d.ts +1 -0
  701. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js +72 -0
  702. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js.map +1 -0
  703. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.d.ts +1 -0
  704. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js +111 -0
  705. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js.map +1 -0
  706. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.d.ts +1 -0
  707. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js +147 -0
  708. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js.map +1 -0
  709. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.d.ts +1 -0
  710. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js +101 -0
  711. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js.map +1 -0
  712. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.d.ts +1 -0
  713. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js +50 -0
  714. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js.map +1 -0
  715. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.d.ts +1 -0
  716. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.js +44 -0
  717. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.js.map +1 -0
  718. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.d.ts +1 -0
  719. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.js +221 -0
  720. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.js.map +1 -0
  721. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.d.ts +1 -0
  722. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.js +60 -0
  723. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.js.map +1 -0
  724. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.d.ts +1 -0
  725. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.js +80 -0
  726. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.js.map +1 -0
  727. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.d.ts +39 -0
  728. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.js +393 -0
  729. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.js.map +1 -0
  730. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.d.ts +1 -0
  731. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.js +44 -0
  732. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.js.map +1 -0
  733. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.d.ts +1 -0
  734. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.js +330 -0
  735. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.js.map +1 -0
  736. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.d.ts +1 -0
  737. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.js +60 -0
  738. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.js.map +1 -0
  739. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.d.ts +1 -0
  740. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.js +80 -0
  741. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.js.map +1 -0
  742. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.d.ts +34 -0
  743. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.js +322 -0
  744. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.js.map +1 -0
  745. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.d.ts +4 -0
  746. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.js +28 -0
  747. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.js.map +1 -0
  748. package/lib/test/Integration/Gateways/Terminals/RequestIdProvider.d.ts +4 -0
  749. package/lib/test/Integration/Gateways/Terminals/RequestIdProvider.js +10 -0
  750. package/lib/test/Integration/Gateways/Terminals/RequestIdProvider.js.map +1 -0
  751. package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.d.ts +1 -0
  752. package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.js +149 -0
  753. package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.js.map +1 -0
  754. package/lib/test/Integration/Services/CheckServiceTest.d.ts +1 -0
  755. package/lib/test/Integration/Services/CheckServiceTest.js +45 -0
  756. package/lib/test/Integration/Services/CheckServiceTest.js.map +1 -0
  757. package/lib/test/Integration/Services/CreditServiceTest.d.ts +1 -0
  758. package/lib/test/Integration/Services/CreditServiceTest.js +174 -0
  759. package/lib/test/Integration/Services/CreditServiceTest.js.map +1 -0
  760. package/lib/test/Integration/Services/DebitServiceTest.d.ts +1 -0
  761. package/lib/test/Integration/Services/DebitServiceTest.js +81 -0
  762. package/lib/test/Integration/Services/DebitServiceTest.js.map +1 -0
  763. package/lib/test/Integration/Services/EBTServiceTest.d.ts +1 -0
  764. package/lib/test/Integration/Services/EBTServiceTest.js +64 -0
  765. package/lib/test/Integration/Services/EBTServiceTest.js.map +1 -0
  766. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.d.ts +1 -0
  767. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js +111 -0
  768. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js.map +1 -0
  769. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.d.ts +1 -0
  770. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js +62 -0
  771. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js.map +1 -0
  772. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.d.ts +1 -0
  773. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js +34 -0
  774. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js.map +1 -0
  775. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.d.ts +1 -0
  776. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js +125 -0
  777. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js.map +1 -0
  778. package/package.json +1 -1
@@ -0,0 +1,2221 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const ava_1 = __importDefault(require("ava"));
7
+ const src_1 = require("../../../../../src/");
8
+ const Data_1 = require("../../../../Data/");
9
+ const config = new src_1.PorticoConfig();
10
+ config.secretApiKey = "skapi_cert_MaePAQBr-1QAqjfckFC8FTbRTT120bVQUlfVOjgCBw";
11
+ const BATCH_NOT_OPEN = "Transaction was rejected because it requires a batch to be open.";
12
+ const BATCH_EMPTY = "Batch close was rejected because no transactions are associated with the currently open batch";
13
+ const runSerially = false;
14
+ const test = runSerially ? ava_1.default.serial : ava_1.default;
15
+ const useTokens = false;
16
+ let visaToken = "";
17
+ let masterCardToken = "";
18
+ let discoverToken = "";
19
+ let amexToken = "";
20
+ ava_1.default.before(() => {
21
+ src_1.ServicesContainer.configureService(config);
22
+ });
23
+ test.before("000 - close batch", (t) => {
24
+ t.plan(1);
25
+ return new Promise((resolve, reject) => {
26
+ src_1.BatchService.closeBatch()
27
+ .then((response) => {
28
+ t.truthy(response);
29
+ resolve();
30
+ })
31
+ .catch((e) => {
32
+ if (e.message.indexOf(BATCH_NOT_OPEN) !== -1 ||
33
+ e.message.indexOf(BATCH_EMPTY) !== -1) {
34
+ t.pass();
35
+ resolve();
36
+ return;
37
+ }
38
+ reject(e);
39
+ });
40
+ });
41
+ });
42
+ /// CREDIT CARD FUNCTIONS
43
+ /// CARD VERIFY
44
+ /// ACCOUNT VERIFICATION
45
+ test("001 - card verify visa", (t) => {
46
+ t.plan(5);
47
+ const card = Data_1.TestCards.visaSwipeEncrypted();
48
+ return card
49
+ .verify()
50
+ .withAllowDuplicates(true)
51
+ .withRequestMultiUseToken(useTokens)
52
+ .execute()
53
+ .then((response) => {
54
+ t.truthy(response);
55
+ t.is(response.responseCode, "00");
56
+ return response;
57
+ })
58
+ .then((response) => {
59
+ if (!useTokens) {
60
+ t.plan(2);
61
+ return;
62
+ }
63
+ t.truthy(response.token);
64
+ const token = new src_1.CreditCardData();
65
+ token.token = response.token;
66
+ return token
67
+ .charge(15.01)
68
+ .withAllowDuplicates(true)
69
+ .execute()
70
+ .then((chargeResponse) => {
71
+ t.truthy(chargeResponse);
72
+ t.is(chargeResponse.responseCode, "00");
73
+ });
74
+ });
75
+ });
76
+ test("002 - card verify mastercard", (t) => {
77
+ t.plan(5);
78
+ const card = Data_1.TestCards.masterCardSwipeEncrypted();
79
+ return card
80
+ .verify()
81
+ .withAllowDuplicates(true)
82
+ .withRequestMultiUseToken(useTokens)
83
+ .execute()
84
+ .then((response) => {
85
+ t.truthy(response);
86
+ t.is(response.responseCode, "00");
87
+ return response;
88
+ })
89
+ .then((response) => {
90
+ if (!useTokens) {
91
+ t.plan(2);
92
+ return;
93
+ }
94
+ t.truthy(response.token);
95
+ const token = new src_1.CreditCardData();
96
+ token.token = response.token;
97
+ return token
98
+ .charge(15.02)
99
+ .withAllowDuplicates(true)
100
+ .execute()
101
+ .then((chargeResponse) => {
102
+ t.truthy(chargeResponse);
103
+ t.is(chargeResponse.responseCode, "00");
104
+ });
105
+ });
106
+ });
107
+ test("003 - card verify discover", (t) => {
108
+ t.plan(5);
109
+ const card = Data_1.TestCards.discoverSwipeEncrypted();
110
+ return card
111
+ .verify()
112
+ .withAllowDuplicates(true)
113
+ .withRequestMultiUseToken(useTokens)
114
+ .execute()
115
+ .then((response) => {
116
+ t.truthy(response);
117
+ t.is(response.responseCode, "00");
118
+ return response;
119
+ })
120
+ .then((response) => {
121
+ if (!useTokens) {
122
+ t.plan(2);
123
+ return;
124
+ }
125
+ t.truthy(response.token);
126
+ const token = new src_1.CreditCardData();
127
+ token.token = response.token;
128
+ return token
129
+ .charge(15.03)
130
+ .withAllowDuplicates(true)
131
+ .execute()
132
+ .then((chargeResponse) => {
133
+ t.truthy(chargeResponse);
134
+ t.is(chargeResponse.responseCode, "00");
135
+ });
136
+ });
137
+ });
138
+ /// Address Verification
139
+ test("004 - card verify amex", (t) => {
140
+ t.plan(5);
141
+ const address = new src_1.Address();
142
+ address.postalCode = "75024";
143
+ const card = Data_1.TestCards.amexManual(false, true);
144
+ return card
145
+ .verify()
146
+ .withAllowDuplicates(true)
147
+ .withAddress(address)
148
+ .withRequestMultiUseToken(useTokens)
149
+ .execute()
150
+ .then((response) => {
151
+ t.truthy(response);
152
+ t.is(response.responseCode, "00");
153
+ return response;
154
+ })
155
+ .then((response) => {
156
+ if (!useTokens) {
157
+ t.plan(2);
158
+ return;
159
+ }
160
+ t.truthy(response.token);
161
+ const token = new src_1.CreditCardData();
162
+ token.token = response.token;
163
+ return token
164
+ .charge(15.04)
165
+ .withAllowDuplicates(true)
166
+ .execute()
167
+ .then((chargeResponse) => {
168
+ t.truthy(chargeResponse);
169
+ t.is(chargeResponse.responseCode, "00");
170
+ });
171
+ });
172
+ });
173
+ /// Balance Inquiry (for Prepaid)
174
+ test("005 - balance inquiry visa", (t) => {
175
+ t.plan(2);
176
+ const card = Data_1.TestCards.visaSwipeEncrypted();
177
+ return card
178
+ .balanceInquiry()
179
+ .execute()
180
+ .then((response) => {
181
+ t.truthy(response);
182
+ t.is(response.responseCode, "00");
183
+ });
184
+ });
185
+ /// CREDIT SALE (for multi-use token only)
186
+ test("006 - charge visa swipe token", (t) => {
187
+ t.plan(2);
188
+ const card = Data_1.TestCards.visaSwipe();
189
+ return card
190
+ .charge(15.01)
191
+ .withCurrency("USD")
192
+ .withRequestMultiUseToken(true)
193
+ .withAllowDuplicates(true)
194
+ .execute()
195
+ .then((response) => {
196
+ t.truthy(response);
197
+ t.is(response.responseCode, "00");
198
+ visaToken = response.token;
199
+ });
200
+ });
201
+ test("007 - charge mastercard swipe token", (t) => {
202
+ t.plan(2);
203
+ const card = Data_1.TestCards.masterCardSwipe();
204
+ return card
205
+ .charge(15.02)
206
+ .withCurrency("USD")
207
+ .withRequestMultiUseToken(true)
208
+ .withAllowDuplicates(true)
209
+ .execute()
210
+ .then((response) => {
211
+ t.truthy(response);
212
+ t.is(response.responseCode, "00");
213
+ masterCardToken = response.token;
214
+ });
215
+ });
216
+ test("008 - charge discover swipe token", (t) => {
217
+ t.plan(2);
218
+ const card = Data_1.TestCards.discoverSwipe();
219
+ return card
220
+ .charge(15.03)
221
+ .withCurrency("USD")
222
+ .withRequestMultiUseToken(true)
223
+ .withAllowDuplicates(true)
224
+ .execute()
225
+ .then((response) => {
226
+ t.truthy(response);
227
+ t.is(response.responseCode, "00");
228
+ discoverToken = response.token;
229
+ });
230
+ });
231
+ test("009 - charge amex swipe token", (t) => {
232
+ t.plan(2);
233
+ const card = Data_1.TestCards.amexSwipe();
234
+ return card
235
+ .charge(15.04)
236
+ .withCurrency("USD")
237
+ .withRequestMultiUseToken(true)
238
+ .withAllowDuplicates(true)
239
+ .execute()
240
+ .then((response) => {
241
+ t.truthy(response);
242
+ t.is(response.responseCode, "00");
243
+ amexToken = response.token;
244
+ });
245
+ });
246
+ /// CREDIT SALE
247
+ /// SWIPED
248
+ test("010 - charge visa swipe", (t) => {
249
+ t.plan(4);
250
+ const card = Data_1.TestCards.visaSwipe();
251
+ return card
252
+ .charge(15.01)
253
+ .withCurrency("USD")
254
+ .withAllowDuplicates(true)
255
+ .execute()
256
+ .then((response) => {
257
+ t.truthy(response);
258
+ t.is(response.responseCode, "00");
259
+ return response;
260
+ })
261
+ .then((response) => {
262
+ // test 059
263
+ return (response
264
+ .reverse(15.01)
265
+ // .withAllowDuplicates(true)
266
+ .execute()
267
+ .then((reverseResponse) => {
268
+ t.truthy(reverseResponse);
269
+ t.is(reverseResponse.responseCode, "00");
270
+ }));
271
+ });
272
+ });
273
+ test("011 - charge mastercard swipe", (t) => {
274
+ t.plan(2);
275
+ const card = Data_1.TestCards.masterCardSwipe();
276
+ return card
277
+ .charge(15.02)
278
+ .withCurrency("USD")
279
+ .withAllowDuplicates(true)
280
+ .execute()
281
+ .then((response) => {
282
+ t.truthy(response);
283
+ t.is(response.responseCode, "00");
284
+ });
285
+ });
286
+ test("012 - charge discover swipe", (t) => {
287
+ t.plan(2);
288
+ const card = Data_1.TestCards.discoverSwipe();
289
+ return card
290
+ .charge(15.02)
291
+ .withCurrency("USD")
292
+ .withAllowDuplicates(true)
293
+ .execute()
294
+ .then((response) => {
295
+ t.truthy(response);
296
+ t.is(response.responseCode, "00");
297
+ });
298
+ });
299
+ test("013 - charge amex swipe", (t) => {
300
+ t.plan(2);
301
+ const card = Data_1.TestCards.amexSwipe();
302
+ return card
303
+ .charge(15.02)
304
+ .withCurrency("USD")
305
+ .withAllowDuplicates(true)
306
+ .execute()
307
+ .then((response) => {
308
+ t.truthy(response);
309
+ t.is(response.responseCode, "00");
310
+ });
311
+ });
312
+ test("014 - charge jcb swipe", (t) => {
313
+ t.plan(4);
314
+ const card = Data_1.TestCards.visaSwipe();
315
+ return card
316
+ .charge(15.05)
317
+ .withCurrency("USD")
318
+ .withAllowDuplicates(true)
319
+ .execute()
320
+ .then((response) => {
321
+ t.truthy(response);
322
+ t.is(response.responseCode, "00");
323
+ return response;
324
+ })
325
+ .then((response) => {
326
+ // test 058
327
+ return (response
328
+ .refund(15.05)
329
+ // .withAllowDuplicates(true)
330
+ .withCurrency("USD")
331
+ .execute()
332
+ .then((refundResponse) => {
333
+ t.truthy(refundResponse);
334
+ t.is(refundResponse.responseCode, "00");
335
+ }));
336
+ });
337
+ });
338
+ test("014a - charge mastercard 24 swipe", (t) => {
339
+ t.plan(2);
340
+ const card = Data_1.TestCards.masterCard24Swipe();
341
+ return card
342
+ .charge(15.34)
343
+ .withCurrency("USD")
344
+ .withAllowDuplicates(true)
345
+ .execute()
346
+ .then((response) => {
347
+ t.truthy(response);
348
+ t.is(response.responseCode, "00");
349
+ });
350
+ });
351
+ test("014b - charge mastercard 25 swipe", (t) => {
352
+ t.plan(2);
353
+ const card = Data_1.TestCards.masterCard25Swipe();
354
+ return card
355
+ .charge(15.34)
356
+ .withCurrency("USD")
357
+ .withAllowDuplicates(true)
358
+ .execute()
359
+ .then((response) => {
360
+ t.truthy(response);
361
+ t.is(response.responseCode, "00");
362
+ });
363
+ });
364
+ test("015 - charge visa swipe", (t) => {
365
+ t.plan(4);
366
+ const card = Data_1.TestCards.visaSwipe();
367
+ return card
368
+ .charge(15.06)
369
+ .withCurrency("USD")
370
+ .withAllowDuplicates(true)
371
+ .execute()
372
+ .then((response) => {
373
+ t.truthy(response);
374
+ t.is(response.responseCode, "00");
375
+ return response;
376
+ })
377
+ .then((response) => {
378
+ // test 063
379
+ return (response
380
+ .reverse(15.06)
381
+ // .withAllowDuplicates(true)
382
+ .withAuthAmount(5.06)
383
+ .execute()
384
+ .then((reverseResponse) => {
385
+ t.truthy(reverseResponse);
386
+ t.is(reverseResponse.responseCode, "00");
387
+ }));
388
+ });
389
+ });
390
+ /// Manually Entered - Card Present
391
+ test("016 - charge visa manual card present", (t) => {
392
+ t.plan(2);
393
+ const address = new src_1.Address();
394
+ address.postalCode = "750241234";
395
+ address.streetAddress1 = "6860 Dallas Pkwy";
396
+ const card = Data_1.TestCards.visaManual(true, true);
397
+ return card
398
+ .charge(16.01)
399
+ .withAllowDuplicates(true)
400
+ .withCurrency("USD")
401
+ .withAddress(address)
402
+ .execute()
403
+ .then((response) => {
404
+ t.truthy(response);
405
+ t.is(response.responseCode, "00");
406
+ });
407
+ });
408
+ test("017 - charge mastercard manual card present", (t) => {
409
+ t.plan(4);
410
+ const address = new src_1.Address();
411
+ address.postalCode = "75024";
412
+ address.streetAddress1 = "6860 Dallas Pkwy";
413
+ const card = Data_1.TestCards.masterCardManual(true, true);
414
+ return card
415
+ .charge(16.02)
416
+ .withAllowDuplicates(true)
417
+ .withCurrency("USD")
418
+ .withAddress(address)
419
+ .execute()
420
+ .then((response) => {
421
+ t.truthy(response);
422
+ t.is(response.responseCode, "00");
423
+ return response;
424
+ })
425
+ .then((response) => {
426
+ // test case 60
427
+ return (response
428
+ .reverse(16.02)
429
+ // .withAllowDuplicates(true)
430
+ .execute()
431
+ .then((reverseResponse) => {
432
+ t.truthy(reverseResponse);
433
+ t.is(reverseResponse.responseCode, "00");
434
+ }));
435
+ });
436
+ });
437
+ test("018 - charge discover manual card present", (t) => {
438
+ t.plan(2);
439
+ const address = new src_1.Address();
440
+ address.postalCode = "750241234";
441
+ const card = Data_1.TestCards.discoverManual(true, true);
442
+ return card
443
+ .charge(16.03)
444
+ .withAllowDuplicates(true)
445
+ .withCurrency("USD")
446
+ .withAddress(address)
447
+ .execute()
448
+ .then((response) => {
449
+ t.truthy(response);
450
+ t.is(response.responseCode, "00");
451
+ });
452
+ });
453
+ test("019 - charge amex manual card present", (t) => {
454
+ t.plan(2);
455
+ const address = new src_1.Address();
456
+ address.postalCode = "75024";
457
+ address.streetAddress1 = "6860";
458
+ const card = Data_1.TestCards.amexManual(true, true);
459
+ return card
460
+ .charge(16.04)
461
+ .withAllowDuplicates(true)
462
+ .withCurrency("USD")
463
+ .withAddress(address)
464
+ .execute()
465
+ .then((response) => {
466
+ t.truthy(response);
467
+ t.is(response.responseCode, "00");
468
+ });
469
+ });
470
+ test("020 - charge jcb manual card present", (t) => {
471
+ t.plan(2);
472
+ const address = new src_1.Address();
473
+ address.postalCode = "75024";
474
+ const card = Data_1.TestCards.jcbManual(true, true);
475
+ return card
476
+ .charge(16.05)
477
+ .withAllowDuplicates(true)
478
+ .withCurrency("USD")
479
+ .withAddress(address)
480
+ .execute()
481
+ .then((response) => {
482
+ t.truthy(response);
483
+ t.is(response.responseCode, "00");
484
+ });
485
+ });
486
+ test("021 - charge discover manual card present", (t) => {
487
+ t.plan(4);
488
+ const address = new src_1.Address();
489
+ address.postalCode = "750241234";
490
+ address.streetAddress1 = "6860 Dallas Pkwy";
491
+ const card = Data_1.TestCards.discoverManual(true, true);
492
+ return card
493
+ .charge(16.07)
494
+ .withAllowDuplicates(true)
495
+ .withCurrency("USD")
496
+ .withAddress(address)
497
+ .execute()
498
+ .then((response) => {
499
+ t.truthy(response);
500
+ t.is(response.responseCode, "00");
501
+ return response;
502
+ })
503
+ .then((response) => {
504
+ // test case 64
505
+ return (response
506
+ .reverse(16.07)
507
+ // .withAllowDuplicates(true)
508
+ .withAuthAmount(6.07)
509
+ .execute()
510
+ .then((reverseResponse) => {
511
+ t.truthy(reverseResponse);
512
+ t.is(reverseResponse.responseCode, "00");
513
+ }));
514
+ });
515
+ });
516
+ /// Manually Entered - Card Not Present
517
+ test("022 - charge visa manual card not present", (t) => {
518
+ t.plan(2);
519
+ const address = new src_1.Address();
520
+ address.postalCode = "750241234";
521
+ address.streetAddress1 = "6860 Dallas Pkwy";
522
+ let card;
523
+ if (useTokens) {
524
+ card = new src_1.CreditCardData();
525
+ card.token = visaToken;
526
+ }
527
+ else {
528
+ card = Data_1.TestCards.visaManual(false, true);
529
+ }
530
+ return card
531
+ .charge(17.01)
532
+ .withAllowDuplicates(true)
533
+ .withCurrency("USD")
534
+ .withAddress(address)
535
+ .execute()
536
+ .then((response) => {
537
+ t.truthy(response);
538
+ t.is(response.responseCode, "00");
539
+ });
540
+ });
541
+ test("023 - charge mastercard manual card not present", (t) => {
542
+ t.plan(4);
543
+ const address = new src_1.Address();
544
+ address.postalCode = "75024";
545
+ address.streetAddress1 = "6860 Dallas Pkwy";
546
+ let card;
547
+ if (useTokens) {
548
+ card = new src_1.CreditCardData();
549
+ card.token = masterCardToken;
550
+ }
551
+ else {
552
+ card = Data_1.TestCards.masterCardManual(false, true);
553
+ }
554
+ return card
555
+ .charge(17.02)
556
+ .withAllowDuplicates(true)
557
+ .withCurrency("USD")
558
+ .withAddress(address)
559
+ .execute()
560
+ .then((response) => {
561
+ t.truthy(response);
562
+ t.is(response.responseCode, "00");
563
+ return response;
564
+ })
565
+ .then((response) => {
566
+ // test case 61
567
+ return (response
568
+ .reverse(17.02)
569
+ // .withAllowDuplicates(true)
570
+ .execute()
571
+ .then((reverseResponse) => {
572
+ t.truthy(reverseResponse);
573
+ t.is(reverseResponse.responseCode, "00");
574
+ }));
575
+ });
576
+ });
577
+ test("024 - charge discover manual card not present", (t) => {
578
+ t.plan(2);
579
+ const address = new src_1.Address();
580
+ address.postalCode = "750241234";
581
+ let card;
582
+ if (useTokens) {
583
+ card = new src_1.CreditCardData();
584
+ card.token = discoverToken;
585
+ }
586
+ else {
587
+ card = Data_1.TestCards.discoverManual(false, true);
588
+ }
589
+ return card
590
+ .charge(17.03)
591
+ .withAllowDuplicates(true)
592
+ .withCurrency("USD")
593
+ .withAddress(address)
594
+ .execute()
595
+ .then((response) => {
596
+ t.truthy(response);
597
+ t.is(response.responseCode, "00");
598
+ });
599
+ });
600
+ test("025 - charge amex manual card not present", (t) => {
601
+ t.plan(2);
602
+ const address = new src_1.Address();
603
+ address.postalCode = "75024";
604
+ address.streetAddress1 = "6860";
605
+ let card;
606
+ if (useTokens) {
607
+ card = new src_1.CreditCardData();
608
+ card.token = amexToken;
609
+ }
610
+ else {
611
+ card = Data_1.TestCards.amexManual(false, true);
612
+ }
613
+ return card
614
+ .charge(17.04)
615
+ .withAllowDuplicates(true)
616
+ .withCurrency("USD")
617
+ .withAddress(address)
618
+ .execute()
619
+ .then((response) => {
620
+ t.truthy(response);
621
+ t.is(response.responseCode, "00");
622
+ });
623
+ });
624
+ test("026 - charge jcb manual card not present", (t) => {
625
+ t.plan(2);
626
+ const address = new src_1.Address();
627
+ address.postalCode = "75024";
628
+ const card = Data_1.TestCards.jcbManual(false, true);
629
+ return card
630
+ .charge(17.05)
631
+ .withAllowDuplicates(true)
632
+ .withCurrency("USD")
633
+ .withAddress(address)
634
+ .execute()
635
+ .then((response) => {
636
+ t.truthy(response);
637
+ t.is(response.responseCode, "00");
638
+ });
639
+ });
640
+ /// Contactless
641
+ test("027 - charge visa contactless", (t) => {
642
+ t.plan(2);
643
+ const card = Data_1.TestCards.visaSwipe(src_1.EntryMethod.Proximity);
644
+ return card
645
+ .charge(18.01)
646
+ .withAllowDuplicates(true)
647
+ .withCurrency("USD")
648
+ .execute()
649
+ .then((response) => {
650
+ t.truthy(response);
651
+ t.is(response.responseCode, "00");
652
+ });
653
+ });
654
+ test("028 - charge mastercard contactless", (t) => {
655
+ t.plan(2);
656
+ const card = Data_1.TestCards.masterCardSwipe(src_1.EntryMethod.Proximity);
657
+ return card
658
+ .charge(18.02)
659
+ .withAllowDuplicates(true)
660
+ .withCurrency("USD")
661
+ .execute()
662
+ .then((response) => {
663
+ t.truthy(response);
664
+ t.is(response.responseCode, "00");
665
+ });
666
+ });
667
+ test("029 - charge discover contactless", (t) => {
668
+ t.plan(2);
669
+ const card = Data_1.TestCards.discoverSwipe(src_1.EntryMethod.Proximity);
670
+ return card
671
+ .charge(18.03)
672
+ .withAllowDuplicates(true)
673
+ .withCurrency("USD")
674
+ .execute()
675
+ .then((response) => {
676
+ t.truthy(response);
677
+ t.is(response.responseCode, "00");
678
+ });
679
+ });
680
+ test("030 - charge amex contactless", (t) => {
681
+ t.plan(2);
682
+ const card = Data_1.TestCards.amexSwipe(src_1.EntryMethod.Proximity);
683
+ return card
684
+ .charge(18.04)
685
+ .withAllowDuplicates(true)
686
+ .withCurrency("USD")
687
+ .execute()
688
+ .then((response) => {
689
+ t.truthy(response);
690
+ t.is(response.responseCode, "00");
691
+ });
692
+ });
693
+ /// AUTHORIZATION
694
+ test("031 - authorize visa swipe", (t) => {
695
+ t.plan(4);
696
+ const card = Data_1.TestCards.visaSwipe();
697
+ // 031a authorize
698
+ return (card
699
+ .authorize(15.08)
700
+ .withAllowDuplicates(true)
701
+ .withCurrency("USD")
702
+ .execute()
703
+ .then((response) => {
704
+ t.truthy(response);
705
+ t.is(response.responseCode, "00");
706
+ return response;
707
+ })
708
+ // 031b capture
709
+ .then((response) => {
710
+ return response
711
+ .capture()
712
+ .execute()
713
+ .then((captureResponse) => {
714
+ t.truthy(captureResponse);
715
+ t.is(captureResponse.responseCode, "00");
716
+ });
717
+ }));
718
+ });
719
+ test("032 - authorize visa swipe additional auth", (t) => {
720
+ t.plan(4);
721
+ const card = Data_1.TestCards.visaSwipe();
722
+ // 032a authorize
723
+ return (card
724
+ .authorize(15.09)
725
+ .withAllowDuplicates(true)
726
+ .withCurrency("USD")
727
+ .execute()
728
+ .then((response) => {
729
+ t.truthy(response);
730
+ t.is(response.responseCode, "00");
731
+ return response;
732
+ })
733
+ // 032b Additional Auth (restaurant only)
734
+ // 032c Add to batch
735
+ .then((response) => {
736
+ return response
737
+ .capture()
738
+ .execute()
739
+ .then((captureResponse) => {
740
+ t.truthy(captureResponse);
741
+ t.is(captureResponse.responseCode, "00");
742
+ });
743
+ }));
744
+ });
745
+ test("033 - authorize mastercard swipe", (t) => {
746
+ t.plan(4);
747
+ const card = Data_1.TestCards.masterCardSwipe();
748
+ // 033a authorize
749
+ return (card
750
+ .authorize(15.1)
751
+ .withAllowDuplicates(true)
752
+ .withCurrency("USD")
753
+ .execute()
754
+ .then((response) => {
755
+ t.truthy(response);
756
+ t.is(response.responseCode, "00");
757
+ return response;
758
+ })
759
+ // 033b capture
760
+ .then((response) => {
761
+ return response
762
+ .capture()
763
+ .execute()
764
+ .then((captureResponse) => {
765
+ t.truthy(captureResponse);
766
+ t.is(captureResponse.responseCode, "00");
767
+ });
768
+ }));
769
+ });
770
+ test("033a - authorize discover swipe", (t) => {
771
+ t.plan(2);
772
+ const card = Data_1.TestCards.discoverSwipe();
773
+ return card
774
+ .authorize(15.1)
775
+ .withCurrency("USD")
776
+ .withAllowDuplicates(true)
777
+ .execute()
778
+ .then((response) => {
779
+ t.truthy(response);
780
+ t.is(response.responseCode, "00");
781
+ });
782
+ });
783
+ /// AUTHORIZATION - Manually Entered, Card Present
784
+ test("034 - authorize visa manual card present", (t) => {
785
+ t.plan(4);
786
+ const address = new src_1.Address();
787
+ address.postalCode = "75024";
788
+ address.streetAddress1 = "6860 Dallas Pkwy";
789
+ const card = Data_1.TestCards.visaManual(true, true);
790
+ // 034a authorize
791
+ return (card
792
+ .authorize(16.08)
793
+ .withAllowDuplicates(true)
794
+ .withCurrency("USD")
795
+ .withAddress(address)
796
+ .execute()
797
+ .then((response) => {
798
+ t.truthy(response);
799
+ t.is(response.responseCode, "00");
800
+ return response;
801
+ })
802
+ // 034b capture
803
+ .then((response) => {
804
+ return response
805
+ .capture()
806
+ .execute()
807
+ .then((captureResponse) => {
808
+ t.truthy(captureResponse);
809
+ t.is(captureResponse.responseCode, "00");
810
+ });
811
+ }));
812
+ });
813
+ test("035 - authorize visa manual card present additional auth", (t) => {
814
+ t.plan(4);
815
+ const address = new src_1.Address();
816
+ address.postalCode = "75024";
817
+ address.streetAddress1 = "6860 Dallas Pkwy";
818
+ const card = Data_1.TestCards.visaManual(true, true);
819
+ // 035a authorize
820
+ return (card
821
+ .authorize(16.09)
822
+ .withAllowDuplicates(true)
823
+ .withCurrency("USD")
824
+ .withAddress(address)
825
+ .execute()
826
+ .then((response) => {
827
+ t.truthy(response);
828
+ t.is(response.responseCode, "00");
829
+ return response;
830
+ })
831
+ // 035b Additional Auth (restaurant only)
832
+ // 035c Add to batch
833
+ .then((response) => {
834
+ return response
835
+ .capture()
836
+ .execute()
837
+ .then((captureResponse) => {
838
+ t.truthy(captureResponse);
839
+ t.is(captureResponse.responseCode, "00");
840
+ });
841
+ }));
842
+ });
843
+ test("036 - authorize mastercard manual card present", (t) => {
844
+ t.plan(4);
845
+ const address = new src_1.Address();
846
+ address.postalCode = "75024";
847
+ address.streetAddress1 = "6860 Dallas Pkwy";
848
+ const card = Data_1.TestCards.masterCardManual(true, true);
849
+ // 036a authorize
850
+ return (card
851
+ .authorize(16.1)
852
+ .withAllowDuplicates(true)
853
+ .withCurrency("USD")
854
+ .withAddress(address)
855
+ .execute()
856
+ .then((response) => {
857
+ t.truthy(response);
858
+ t.is(response.responseCode, "00");
859
+ return response;
860
+ })
861
+ // 036b capture
862
+ .then((response) => {
863
+ return response
864
+ .capture()
865
+ .execute()
866
+ .then((captureResponse) => {
867
+ t.truthy(captureResponse);
868
+ t.is(captureResponse.responseCode, "00");
869
+ });
870
+ }));
871
+ });
872
+ test("036a - authorize discover manual card present", (t) => {
873
+ t.plan(2);
874
+ const address = new src_1.Address();
875
+ address.postalCode = "750241234";
876
+ const card = Data_1.TestCards.discoverManual(true, true);
877
+ return card
878
+ .authorize(16.1)
879
+ .withAllowDuplicates(true)
880
+ .withCurrency("USD")
881
+ .withAddress(address)
882
+ .execute()
883
+ .then((response) => {
884
+ t.truthy(response);
885
+ t.is(response.responseCode, "00");
886
+ });
887
+ });
888
+ /// AUTHORIZATION - Manually Entered, Card Not Present
889
+ test("037 - authorize visa manual", (t) => {
890
+ t.plan(4);
891
+ const address = new src_1.Address();
892
+ address.postalCode = "750241234";
893
+ address.streetAddress1 = "6860 Dallas Pkwy";
894
+ const card = Data_1.TestCards.visaManual(false, true);
895
+ // 034a authorize
896
+ return (card
897
+ .authorize(17.08)
898
+ .withAllowDuplicates(true)
899
+ .withCurrency("USD")
900
+ .withAddress(address)
901
+ .execute()
902
+ .then((response) => {
903
+ t.truthy(response);
904
+ t.is(response.responseCode, "00");
905
+ return response;
906
+ })
907
+ // 034b capture
908
+ .then((response) => {
909
+ return response
910
+ .capture()
911
+ .execute()
912
+ .then((captureResponse) => {
913
+ t.truthy(captureResponse);
914
+ t.is(captureResponse.responseCode, "00");
915
+ });
916
+ }));
917
+ });
918
+ test("038 - authorize mastercard manual", (t) => {
919
+ t.plan(4);
920
+ const address = new src_1.Address();
921
+ address.postalCode = "750241234";
922
+ address.streetAddress1 = "6860";
923
+ const card = Data_1.TestCards.masterCardManual(false, true);
924
+ // 036a authorize
925
+ return (card
926
+ .authorize(17.09)
927
+ .withAllowDuplicates(true)
928
+ .withCurrency("USD")
929
+ .withAddress(address)
930
+ .execute()
931
+ .then((response) => {
932
+ t.truthy(response);
933
+ t.is(response.responseCode, "00");
934
+ return response;
935
+ })
936
+ // 036b capture
937
+ .then((response) => {
938
+ return response
939
+ .capture()
940
+ .execute()
941
+ .then((captureResponse) => {
942
+ t.truthy(captureResponse);
943
+ t.is(captureResponse.responseCode, "00");
944
+ });
945
+ }));
946
+ });
947
+ test("038a - authorize discover manual", (t) => {
948
+ t.plan(2);
949
+ const address = new src_1.Address();
950
+ address.postalCode = "750241234";
951
+ const card = Data_1.TestCards.discoverManual(false, true);
952
+ return card
953
+ .authorize(17.1)
954
+ .withAllowDuplicates(true)
955
+ .withCurrency("USD")
956
+ .withAddress(address)
957
+ .execute()
958
+ .then((response) => {
959
+ t.truthy(response);
960
+ t.is(response.responseCode, "00");
961
+ });
962
+ });
963
+ /// PARTIALLY APPROVED SALE (Required)
964
+ test("039 - charge discover swipe partial approval", (t) => {
965
+ t.plan(3);
966
+ const card = Data_1.TestCards.discoverSwipe();
967
+ return card
968
+ .charge(40.0)
969
+ .withAllowDuplicates(true)
970
+ .withCurrency("USD")
971
+ .withAllowPartialAuth(true)
972
+ .execute()
973
+ .then((response) => {
974
+ t.truthy(response);
975
+ t.is(response.responseCode, "10");
976
+ t.is(response.authorizedAmount, "40.00");
977
+ });
978
+ });
979
+ test("040 - charge visa swipe partial approval", (t) => {
980
+ t.plan(3);
981
+ const card = Data_1.TestCards.visaSwipe();
982
+ return card
983
+ .charge(130.0)
984
+ .withAllowDuplicates(true)
985
+ .withCurrency("USD")
986
+ .withAllowPartialAuth(true)
987
+ .execute()
988
+ .then((response) => {
989
+ t.truthy(response);
990
+ t.is(response.responseCode, "10");
991
+ t.is(response.authorizedAmount, "110.00");
992
+ });
993
+ });
994
+ test("041 - charge discover manual partial approval", (t) => {
995
+ t.plan(3);
996
+ const address = new src_1.Address();
997
+ address.postalCode = "75024";
998
+ const card = Data_1.TestCards.discoverManual(true, true);
999
+ return card
1000
+ .charge(145.0)
1001
+ .withAllowDuplicates(true)
1002
+ .withCurrency("USD")
1003
+ .withAllowPartialAuth(true)
1004
+ .withAddress(address)
1005
+ .execute()
1006
+ .then((response) => {
1007
+ t.truthy(response);
1008
+ t.is(response.responseCode, "10");
1009
+ t.is(response.authorizedAmount, "65.00");
1010
+ });
1011
+ });
1012
+ test("042 - charge mastercard swipe partial approval", (t) => {
1013
+ t.plan(5);
1014
+ const card = Data_1.TestCards.masterCardSwipe();
1015
+ return (card
1016
+ .charge(155.0)
1017
+ .withAllowDuplicates(true)
1018
+ .withCurrency("USD")
1019
+ .withAllowPartialAuth(true)
1020
+ .execute()
1021
+ .then((response) => {
1022
+ t.truthy(response);
1023
+ t.is(response.responseCode, "10");
1024
+ t.is(response.authorizedAmount, "100.00");
1025
+ return response;
1026
+ })
1027
+ // test case 62
1028
+ .then((response) => {
1029
+ return (response
1030
+ .reverse(100.0)
1031
+ // .withAllowDuplicates(true)
1032
+ .execute()
1033
+ .then((reverseResponse) => {
1034
+ t.truthy(reverseResponse);
1035
+ t.is(reverseResponse.responseCode, "00");
1036
+ }));
1037
+ }));
1038
+ });
1039
+ /// SALE WITH GRATUITY
1040
+ /// Tip Edit (Tip at Settlement)
1041
+ test("043 - charge visa swipe edit gratuity", (t) => {
1042
+ const card = Data_1.TestCards.visaSwipe();
1043
+ return card
1044
+ .charge(15.12)
1045
+ .withAllowDuplicates(true)
1046
+ .withCurrency("USD")
1047
+ .execute()
1048
+ .then((response) => {
1049
+ t.truthy(response);
1050
+ t.is(response.responseCode, "00");
1051
+ return response;
1052
+ })
1053
+ .then((response) => {
1054
+ return (response
1055
+ .edit()
1056
+ // .withAllowDuplicates(true)
1057
+ .withAmount(18.12)
1058
+ .withGratuity(3.0)
1059
+ .execute()
1060
+ .then((editResponse) => {
1061
+ t.truthy(editResponse);
1062
+ t.is(editResponse.responseCode, "00");
1063
+ }));
1064
+ });
1065
+ });
1066
+ test("044 - charge mastercard manual edit gratuity", (t) => {
1067
+ t.plan(4);
1068
+ const address = new src_1.Address();
1069
+ address.postalCode = "75024";
1070
+ const card = Data_1.TestCards.masterCardManual(true, true);
1071
+ return card
1072
+ .charge(15.13)
1073
+ .withAllowDuplicates(true)
1074
+ .withCurrency("USD")
1075
+ .withAddress(address)
1076
+ .execute()
1077
+ .then((response) => {
1078
+ t.truthy(response);
1079
+ t.is(response.responseCode, "00");
1080
+ return response;
1081
+ })
1082
+ .then((response) => {
1083
+ return (response
1084
+ .edit()
1085
+ // .withAllowDuplicates(true)
1086
+ .withAmount(18.13)
1087
+ .withGratuity(3.0)
1088
+ .execute()
1089
+ .then((editResponse) => {
1090
+ t.truthy(editResponse);
1091
+ t.is(editResponse.responseCode, "00");
1092
+ }));
1093
+ });
1094
+ });
1095
+ /// Tip on Purchase
1096
+ test("045 - charge visa manual gratuity", (t) => {
1097
+ t.plan(2);
1098
+ const address = new src_1.Address();
1099
+ address.postalCode = "75024";
1100
+ const card = Data_1.TestCards.visaManual(true, true);
1101
+ return card
1102
+ .charge(18.61)
1103
+ .withAllowDuplicates(true)
1104
+ .withCurrency("USD")
1105
+ .withAddress(address)
1106
+ .withGratuity(3.5)
1107
+ .execute()
1108
+ .then((response) => {
1109
+ t.truthy(response);
1110
+ t.is(response.responseCode, "00");
1111
+ });
1112
+ });
1113
+ test("046 - charge mastercard swipe gratuity", (t) => {
1114
+ t.plan(4);
1115
+ const card = Data_1.TestCards.masterCardSwipe();
1116
+ return card
1117
+ .charge(18.62)
1118
+ .withAllowDuplicates(true)
1119
+ .withCurrency("USD")
1120
+ .withGratuity(3.5)
1121
+ .execute()
1122
+ .then((response) => {
1123
+ t.truthy(response);
1124
+ t.is(response.responseCode, "00");
1125
+ return response;
1126
+ })
1127
+ .then((response) => {
1128
+ return (response
1129
+ .edit()
1130
+ // .withAllowDuplicates(true)
1131
+ .withAmount(18.12)
1132
+ .withGratuity(3.0)
1133
+ .execute()
1134
+ .then((editResponse) => {
1135
+ t.truthy(editResponse);
1136
+ t.is(editResponse.responseCode, "00");
1137
+ }));
1138
+ });
1139
+ });
1140
+ /// LEVEL II CORPORATE PURCHASE CARD
1141
+ test("047 - level ii visa swipe response b", (t) => {
1142
+ t.plan(5);
1143
+ const card = Data_1.TestCards.visaSwipe();
1144
+ return card
1145
+ .charge(112.34)
1146
+ .withAllowDuplicates(true)
1147
+ .withCurrency("USD")
1148
+ .withCommercialRequest(true)
1149
+ .execute()
1150
+ .then((response) => {
1151
+ t.truthy(response);
1152
+ t.is(response.responseCode, "00");
1153
+ t.is(response.commercialIndicator, "B");
1154
+ return response;
1155
+ })
1156
+ .then((response) => {
1157
+ return (response
1158
+ .edit()
1159
+ // .withAllowDuplicates(true)
1160
+ .withTaxType(src_1.TaxType.SalesTax)
1161
+ .withTaxAmount(1)
1162
+ .execute()
1163
+ .then((cpcResponse) => {
1164
+ t.truthy(cpcResponse);
1165
+ t.is(cpcResponse.responseCode, "00");
1166
+ }));
1167
+ });
1168
+ });
1169
+ test("047a - level ii visa swipe response b", (t) => {
1170
+ t.plan(5);
1171
+ const card = Data_1.TestCards.visaSwipe();
1172
+ return card
1173
+ .charge(112.34)
1174
+ .withAllowDuplicates(true)
1175
+ .withCurrency("USD")
1176
+ .withCommercialRequest(true)
1177
+ .execute()
1178
+ .then((response) => {
1179
+ t.truthy(response);
1180
+ t.is(response.responseCode, "00");
1181
+ t.is(response.commercialIndicator, "B");
1182
+ return response;
1183
+ })
1184
+ .then((response) => {
1185
+ return (response
1186
+ .edit()
1187
+ // .withAllowDuplicates(true)
1188
+ .withTaxType(src_1.TaxType.NotUsed)
1189
+ .execute()
1190
+ .then((cpcResponse) => {
1191
+ t.truthy(cpcResponse);
1192
+ t.is(cpcResponse.responseCode, "00");
1193
+ }));
1194
+ });
1195
+ });
1196
+ test("048 - level ii visa swipe response r", (t) => {
1197
+ t.plan(5);
1198
+ const card = Data_1.TestCards.visaSwipe();
1199
+ return card
1200
+ .charge(123.45)
1201
+ .withAllowDuplicates(true)
1202
+ .withCurrency("USD")
1203
+ .withCommercialRequest(true)
1204
+ .execute()
1205
+ .then((response) => {
1206
+ t.truthy(response);
1207
+ t.is(response.responseCode, "00");
1208
+ t.is(response.commercialIndicator, "R");
1209
+ return response;
1210
+ })
1211
+ .then((response) => {
1212
+ return (response
1213
+ .edit()
1214
+ // .withAllowDuplicates(true)
1215
+ .withTaxType(src_1.TaxType.TaxExempt)
1216
+ .execute()
1217
+ .then((cpcResponse) => {
1218
+ t.truthy(cpcResponse);
1219
+ t.is(cpcResponse.responseCode, "00");
1220
+ }));
1221
+ });
1222
+ });
1223
+ test("049 - level ii visa manual response s", (t) => {
1224
+ t.plan(5);
1225
+ const address = new src_1.Address();
1226
+ address.postalCode = "75024";
1227
+ const card = Data_1.TestCards.visaManual(true, true);
1228
+ return card
1229
+ .charge(134.56)
1230
+ .withAllowDuplicates(true)
1231
+ .withCurrency("USD")
1232
+ .withAddress(address)
1233
+ .withCommercialRequest(true)
1234
+ .execute()
1235
+ .then((response) => {
1236
+ t.truthy(response);
1237
+ t.is(response.responseCode, "00");
1238
+ t.is(response.commercialIndicator, "S");
1239
+ return response;
1240
+ })
1241
+ .then((response) => {
1242
+ return (response
1243
+ .edit()
1244
+ // .withAllowDuplicates(true)
1245
+ .withPoNumber("9876543210")
1246
+ .withTaxType(src_1.TaxType.SalesTax)
1247
+ .withTaxAmount(1)
1248
+ .execute()
1249
+ .then((cpcResponse) => {
1250
+ t.truthy(cpcResponse);
1251
+ t.is(cpcResponse.responseCode, "00");
1252
+ }));
1253
+ });
1254
+ });
1255
+ test("050 - level ii mastercard swipe response s", (t) => {
1256
+ t.plan(5);
1257
+ const card = Data_1.TestCards.masterCardSwipe();
1258
+ return card
1259
+ .charge(111.06)
1260
+ .withAllowDuplicates(true)
1261
+ .withCurrency("USD")
1262
+ .withCommercialRequest(true)
1263
+ .execute()
1264
+ .then((response) => {
1265
+ t.truthy(response);
1266
+ t.is(response.responseCode, "00");
1267
+ t.is(response.commercialIndicator, "S");
1268
+ return response;
1269
+ })
1270
+ .then((response) => {
1271
+ return (response
1272
+ .edit()
1273
+ // .withAllowDuplicates(true)
1274
+ .withPoNumber("9876543210")
1275
+ .withTaxType(src_1.TaxType.NotUsed)
1276
+ .execute()
1277
+ .then((cpcResponse) => {
1278
+ t.truthy(cpcResponse);
1279
+ t.is(cpcResponse.responseCode, "00");
1280
+ }));
1281
+ });
1282
+ });
1283
+ test("051 - level ii mastercard manual response s", (t) => {
1284
+ t.plan(5);
1285
+ const address = new src_1.Address();
1286
+ address.postalCode = "75024";
1287
+ const card = Data_1.TestCards.masterCardManual(true, true);
1288
+ return card
1289
+ .charge(111.07)
1290
+ .withAllowDuplicates(true)
1291
+ .withCurrency("USD")
1292
+ .withAddress(address)
1293
+ .withCommercialRequest(true)
1294
+ .execute()
1295
+ .then((response) => {
1296
+ t.truthy(response);
1297
+ t.is(response.responseCode, "00");
1298
+ t.is(response.commercialIndicator, "S");
1299
+ return response;
1300
+ })
1301
+ .then((response) => {
1302
+ return (response
1303
+ .edit()
1304
+ // .withAllowDuplicates(true)
1305
+ .withPoNumber("9876543210")
1306
+ .withTaxType(src_1.TaxType.SalesTax)
1307
+ .withTaxAmount(1)
1308
+ .execute()
1309
+ .then((cpcResponse) => {
1310
+ t.truthy(cpcResponse);
1311
+ t.is(cpcResponse.responseCode, "00");
1312
+ }));
1313
+ });
1314
+ });
1315
+ test("051a - level ii mastercard manual response s", (t) => {
1316
+ t.plan(5);
1317
+ const address = new src_1.Address();
1318
+ address.postalCode = "75024";
1319
+ const card = Data_1.TestCards.masterCardManual(true, true);
1320
+ return card
1321
+ .charge(111.08)
1322
+ .withAllowDuplicates(true)
1323
+ .withCurrency("USD")
1324
+ .withAddress(address)
1325
+ .withCommercialRequest(true)
1326
+ .execute()
1327
+ .then((response) => {
1328
+ t.truthy(response);
1329
+ t.is(response.responseCode, "00");
1330
+ t.is(response.commercialIndicator, "S");
1331
+ return response;
1332
+ })
1333
+ .then((response) => {
1334
+ return (response
1335
+ .edit()
1336
+ // .withAllowDuplicates(true)
1337
+ .withPoNumber("9876543210")
1338
+ .withTaxType(src_1.TaxType.SalesTax)
1339
+ .withTaxAmount(1)
1340
+ .execute()
1341
+ .then((cpcResponse) => {
1342
+ t.truthy(cpcResponse);
1343
+ t.is(cpcResponse.responseCode, "00");
1344
+ }));
1345
+ });
1346
+ });
1347
+ test("052 - level ii mastercard manual response s", (t) => {
1348
+ t.plan(5);
1349
+ const address = new src_1.Address();
1350
+ address.postalCode = "75024";
1351
+ const card = Data_1.TestCards.masterCardManual(true, true);
1352
+ return card
1353
+ .charge(111.09)
1354
+ .withAllowDuplicates(true)
1355
+ .withCurrency("USD")
1356
+ .withAddress(address)
1357
+ .withCommercialRequest(true)
1358
+ .execute()
1359
+ .then((response) => {
1360
+ t.truthy(response);
1361
+ t.is(response.responseCode, "00");
1362
+ t.is(response.commercialIndicator, "S");
1363
+ return response;
1364
+ })
1365
+ .then((response) => {
1366
+ return (response
1367
+ .edit()
1368
+ // .withAllowDuplicates(true)
1369
+ .withPoNumber("9876543210")
1370
+ .withTaxType(src_1.TaxType.TaxExempt)
1371
+ .execute()
1372
+ .then((cpcResponse) => {
1373
+ t.truthy(cpcResponse);
1374
+ t.is(cpcResponse.responseCode, "00");
1375
+ }));
1376
+ });
1377
+ });
1378
+ test("053 - level ii amex swipe no response", (t) => {
1379
+ t.plan(5);
1380
+ const card = Data_1.TestCards.amexSwipe();
1381
+ return card
1382
+ .charge(111.1)
1383
+ .withAllowDuplicates(true)
1384
+ .withCurrency("USD")
1385
+ .withCommercialRequest(true)
1386
+ .execute()
1387
+ .then((response) => {
1388
+ t.truthy(response);
1389
+ t.is(response.responseCode, "00");
1390
+ t.is(response.commercialIndicator, "0");
1391
+ return response;
1392
+ })
1393
+ .then((response) => {
1394
+ return (response
1395
+ .edit()
1396
+ // .withAllowDuplicates(true)
1397
+ .withTaxType(src_1.TaxType.SalesTax)
1398
+ .withTaxAmount(1)
1399
+ .execute()
1400
+ .then((cpcResponse) => {
1401
+ t.truthy(cpcResponse);
1402
+ t.is(cpcResponse.responseCode, "00");
1403
+ }));
1404
+ });
1405
+ });
1406
+ test("054 - level ii amex manual no response", (t) => {
1407
+ t.plan(5);
1408
+ const address = new src_1.Address();
1409
+ address.postalCode = "75024";
1410
+ const card = Data_1.TestCards.amexManual(true, true);
1411
+ return card
1412
+ .charge(111.11)
1413
+ .withAllowDuplicates(true)
1414
+ .withCurrency("USD")
1415
+ .withAddress(address)
1416
+ .withCommercialRequest(true)
1417
+ .execute()
1418
+ .then((response) => {
1419
+ t.truthy(response);
1420
+ t.is(response.responseCode, "00");
1421
+ t.is(response.commercialIndicator, "0");
1422
+ return response;
1423
+ })
1424
+ .then((response) => {
1425
+ return (response
1426
+ .edit()
1427
+ // .withAllowDuplicates(true)
1428
+ .withPoNumber("9876543210")
1429
+ .withTaxType(src_1.TaxType.NotUsed)
1430
+ .execute()
1431
+ .then((cpcResponse) => {
1432
+ t.truthy(cpcResponse);
1433
+ t.is(cpcResponse.responseCode, "00");
1434
+ }));
1435
+ });
1436
+ });
1437
+ test("055 - level ii amex manual no response", (t) => {
1438
+ t.plan(5);
1439
+ const address = new src_1.Address();
1440
+ address.postalCode = "75024";
1441
+ const card = Data_1.TestCards.amexManual(true, true);
1442
+ return card
1443
+ .charge(111.12)
1444
+ .withAllowDuplicates(true)
1445
+ .withCurrency("USD")
1446
+ .withAddress(address)
1447
+ .withCommercialRequest(true)
1448
+ .execute()
1449
+ .then((response) => {
1450
+ t.truthy(response);
1451
+ t.is(response.responseCode, "00");
1452
+ t.is(response.commercialIndicator, "0");
1453
+ return response;
1454
+ })
1455
+ .then((response) => {
1456
+ return (response
1457
+ .edit()
1458
+ // .withAllowDuplicates(true)
1459
+ .withPoNumber("9876543210")
1460
+ .withTaxType(src_1.TaxType.NotUsed)
1461
+ .execute()
1462
+ .then((cpcResponse) => {
1463
+ t.truthy(cpcResponse);
1464
+ t.is(cpcResponse.responseCode, "00");
1465
+ }));
1466
+ });
1467
+ });
1468
+ test("055a - level ii amex manual no response", (t) => {
1469
+ t.plan(5);
1470
+ const address = new src_1.Address();
1471
+ address.postalCode = "75024";
1472
+ const card = Data_1.TestCards.amexManual(true, true);
1473
+ return card
1474
+ .charge(111.13)
1475
+ .withAllowDuplicates(true)
1476
+ .withCurrency("USD")
1477
+ .withAddress(address)
1478
+ .withCommercialRequest(true)
1479
+ .execute()
1480
+ .then((response) => {
1481
+ t.truthy(response);
1482
+ t.is(response.responseCode, "00");
1483
+ t.is(response.commercialIndicator, "0");
1484
+ return response;
1485
+ })
1486
+ .then((response) => {
1487
+ return (response
1488
+ .edit()
1489
+ // .withAllowDuplicates(true)
1490
+ .withPoNumber("9876543210")
1491
+ .withTaxType(src_1.TaxType.TaxExempt)
1492
+ .execute()
1493
+ .then((cpcResponse) => {
1494
+ t.truthy(cpcResponse);
1495
+ t.is(cpcResponse.responseCode, "00");
1496
+ }));
1497
+ });
1498
+ });
1499
+ /// OFFLINE SALE / AUTHORIZATION
1500
+ test("056 - offline charge visa manual", (t) => {
1501
+ t.plan(2);
1502
+ const card = Data_1.TestCards.visaManual(false, true);
1503
+ return card
1504
+ .charge(15.12)
1505
+ .withAllowDuplicates(true)
1506
+ .withCurrency("USD")
1507
+ .withOfflineAuthCode("654321")
1508
+ .execute()
1509
+ .then((response) => {
1510
+ t.truthy(response);
1511
+ t.is(response.responseCode, "00");
1512
+ });
1513
+ });
1514
+ test("056 - offline auth visa manual", (t) => {
1515
+ t.plan(2);
1516
+ const card = Data_1.TestCards.visaManual(false, true);
1517
+ return card
1518
+ .authorize(15.11)
1519
+ .withAllowDuplicates(true)
1520
+ .withCurrency("USD")
1521
+ .withOfflineAuthCode("654321")
1522
+ .execute()
1523
+ .then((response) => {
1524
+ t.truthy(response);
1525
+ t.is(response.responseCode, "00");
1526
+ });
1527
+ });
1528
+ /// RETURN
1529
+ test("057 - return mastercard", (t) => {
1530
+ t.plan(2);
1531
+ const card = Data_1.TestCards.masterCardManual(false, true);
1532
+ return card
1533
+ .refund(15.11)
1534
+ .withAllowDuplicates(true)
1535
+ .withCurrency("USD")
1536
+ .execute()
1537
+ .then((response) => {
1538
+ t.truthy(response);
1539
+ t.is(response.responseCode, "00");
1540
+ });
1541
+ });
1542
+ test("057a - return mastercard swipe", (t) => {
1543
+ t.plan(2);
1544
+ const card = Data_1.TestCards.masterCardSwipe();
1545
+ return card
1546
+ .refund(15.15)
1547
+ .withAllowDuplicates(true)
1548
+ .withCurrency("USD")
1549
+ .execute()
1550
+ .then((response) => {
1551
+ t.truthy(response);
1552
+ t.is(response.responseCode, "00");
1553
+ });
1554
+ });
1555
+ test("058 - return jcb transaction id", () => {
1556
+ // see test 14
1557
+ });
1558
+ /// ONLINE VOID / REVERSAL (Required)
1559
+ test("059 - reversal visa", () => {
1560
+ // see test 10
1561
+ });
1562
+ test("060 - reversal mastercard", () => {
1563
+ // see test case 17
1564
+ });
1565
+ test("061 - reversal mastercard", () => {
1566
+ // see test case 23
1567
+ });
1568
+ test("062 - reversal mastercard", () => {
1569
+ // see test case 42
1570
+ });
1571
+ test("063 - reversal visa partial", () => {
1572
+ // see test case 15
1573
+ });
1574
+ test("064 - reversal discover partial", () => {
1575
+ // see test 21
1576
+ });
1577
+ /// PIN DEBIT CARD FUNCTIONS
1578
+ test("065 - debit sale visa swipe", (t) => {
1579
+ t.plan(2);
1580
+ const card = Data_1.TestCards.asDebit(Data_1.TestCards.visaSwipe(), "32539F50C245A6A93D123412324000AA");
1581
+ return card
1582
+ .charge(14.01)
1583
+ .withAllowDuplicates(true)
1584
+ .withCurrency("USD")
1585
+ .execute()
1586
+ .then((response) => {
1587
+ t.truthy(response);
1588
+ t.is(response.responseCode, "00");
1589
+ });
1590
+ });
1591
+ test("066 - debit sale mastercard swipe", (t) => {
1592
+ t.plan(4);
1593
+ const card = Data_1.TestCards.asDebit(Data_1.TestCards.masterCardSwipe(), "F505AD81659AA42A3D123412324000AB");
1594
+ return card
1595
+ .charge(14.02)
1596
+ .withAllowDuplicates(true)
1597
+ .withCurrency("USD")
1598
+ .execute()
1599
+ .then((response) => {
1600
+ t.truthy(response);
1601
+ t.is(response.responseCode, "00");
1602
+ return response;
1603
+ })
1604
+ .then(() => {
1605
+ // test case 71
1606
+ return (card
1607
+ .reverse(14.02)
1608
+ // .withAllowDuplicates(true)
1609
+ .execute()
1610
+ .then((reverseResponse) => {
1611
+ t.truthy(reverseResponse);
1612
+ t.is(reverseResponse.responseCode, "00");
1613
+ }));
1614
+ });
1615
+ });
1616
+ test("067 - debit sale visa swipe cashback", (t) => {
1617
+ t.plan(2);
1618
+ const card = Data_1.TestCards.asDebit(Data_1.TestCards.visaSwipe(), "32539F50C245A6A93D123412324000AA");
1619
+ return card
1620
+ .charge(14.03)
1621
+ .withAllowDuplicates(true)
1622
+ .withCurrency("USD")
1623
+ .withCashBack(5.0)
1624
+ .execute()
1625
+ .then((response) => {
1626
+ t.truthy(response);
1627
+ t.is(response.responseCode, "00");
1628
+ });
1629
+ });
1630
+ test("067a - debit sale mastercard", (t) => {
1631
+ t.plan(2);
1632
+ const card = Data_1.TestCards.asDebit(Data_1.TestCards.masterCardSwipe(), "F505AD81659AA42A3D123412324000AB");
1633
+ return card
1634
+ .charge(14.04)
1635
+ .withAllowDuplicates(true)
1636
+ .withCurrency("USD")
1637
+ .execute()
1638
+ .then((response) => {
1639
+ t.truthy(response);
1640
+ t.is(response.responseCode, "00");
1641
+ });
1642
+ });
1643
+ /// PARTIALLY APPROVED PURCHASE
1644
+ test("068 - debit sale mastercard partial approval", (t) => {
1645
+ t.plan(3);
1646
+ const card = Data_1.TestCards.asDebit(Data_1.TestCards.masterCardSwipe(), "F505AD81659AA42A3D123412324000AB");
1647
+ return card
1648
+ .charge(33.0)
1649
+ .withAllowDuplicates(true)
1650
+ .withCurrency("USD")
1651
+ .withAllowPartialAuth(true)
1652
+ .execute()
1653
+ .then((response) => {
1654
+ t.truthy(response);
1655
+ t.is(response.responseCode, "10");
1656
+ t.is(response.authorizedAmount, "22.00");
1657
+ });
1658
+ });
1659
+ test("069 - debit sale visa partial approval", (t) => {
1660
+ t.plan(5);
1661
+ const card = Data_1.TestCards.asDebit(Data_1.TestCards.visaSwipe(), "32539F50C245A6A93D123412324000AA");
1662
+ return card
1663
+ .charge(44.0)
1664
+ .withAllowDuplicates(true)
1665
+ .withCurrency("USD")
1666
+ .withAllowPartialAuth(true)
1667
+ .execute()
1668
+ .then((response) => {
1669
+ t.truthy(response);
1670
+ t.is(response.responseCode, "10");
1671
+ t.is(response.authorizedAmount, "33.00");
1672
+ return response;
1673
+ })
1674
+ .then(() => {
1675
+ // test case 72
1676
+ return (card
1677
+ .reverse(33.0)
1678
+ // .withAllowDuplicates(true)
1679
+ .execute()
1680
+ .then((reverseResponse) => {
1681
+ t.truthy(reverseResponse);
1682
+ t.is(reverseResponse.responseCode, "00");
1683
+ }));
1684
+ });
1685
+ });
1686
+ /// RETURN
1687
+ test("070 - debit return visa swipe", (t) => {
1688
+ t.plan(2);
1689
+ const card = Data_1.TestCards.asDebit(Data_1.TestCards.visaSwipe(), "32539F50C245A6A93D123412324000AA");
1690
+ return card
1691
+ .refund(14.07)
1692
+ .withAllowDuplicates(true)
1693
+ .withCurrency("USD")
1694
+ .execute()
1695
+ .then((response) => {
1696
+ t.truthy(response);
1697
+ t.is(response.responseCode, "00");
1698
+ });
1699
+ });
1700
+ test("070a - debit return visa swipe", (t) => {
1701
+ t.plan(4);
1702
+ const card = Data_1.TestCards.asDebit(Data_1.TestCards.visaSwipe(), "32539F50C245A6A93D123412324000AA");
1703
+ return card
1704
+ .refund(14.08)
1705
+ .withAllowDuplicates(true)
1706
+ .withCurrency("USD")
1707
+ .execute()
1708
+ .then((response) => {
1709
+ t.truthy(response);
1710
+ t.is(response.responseCode, "00");
1711
+ return response;
1712
+ })
1713
+ .then(() => {
1714
+ return (card
1715
+ .reverse(14.08)
1716
+ // .withAllowDuplicates(true)
1717
+ .execute()
1718
+ .then((reverseResponse) => {
1719
+ t.truthy(reverseResponse);
1720
+ t.is(reverseResponse.responseCode, "00");
1721
+ }));
1722
+ });
1723
+ });
1724
+ /// REVERSAL
1725
+ test("071 - debit reversal mastercard", () => {
1726
+ // see test case 66
1727
+ });
1728
+ test("072 - debit reversal visa", () => {
1729
+ // see test case 96
1730
+ });
1731
+ /// EBT FUNCTIONS
1732
+ /// Food Stamp Purchase
1733
+ test("080 - ebt fs purchase visa swipe", (t) => {
1734
+ t.plan(2);
1735
+ const card = Data_1.TestCards.asEBTTrack(Data_1.TestCards.visaSwipe(), "32539F50C245A6A93D123412324000AA");
1736
+ return card
1737
+ .charge(101.01)
1738
+ .withAllowDuplicates(true)
1739
+ .withCurrency("USD")
1740
+ .execute()
1741
+ .then((response) => {
1742
+ t.truthy(response);
1743
+ t.is(response.responseCode, "00");
1744
+ });
1745
+ });
1746
+ test("081 - ebt fs purchase visa manual", (t) => {
1747
+ t.plan(2);
1748
+ const card = Data_1.TestCards.asEBTManual(Data_1.TestCards.visaManual(false, true), "32539F50C245A6A93D123412324000AA");
1749
+ return card
1750
+ .charge(102.01)
1751
+ .withAllowDuplicates(true)
1752
+ .withCurrency("USD")
1753
+ .execute()
1754
+ .then((response) => {
1755
+ t.truthy(response);
1756
+ t.is(response.responseCode, "00");
1757
+ });
1758
+ });
1759
+ /// Food Stamp Electronic Voucher (Manual Entry Only)
1760
+ test("082 - ebt voucher purchase visa", (t) => {
1761
+ t.plan(2);
1762
+ const card = Data_1.TestCards.asEBTManual(Data_1.TestCards.visaManual(false, true), "32539F50C245A6A93D123412324000AA");
1763
+ card.serialNumber = "123456789012345";
1764
+ card.approvalCode = "123456";
1765
+ return card
1766
+ .charge(103.01)
1767
+ .withAllowDuplicates(true)
1768
+ .withCurrency("USD")
1769
+ .execute()
1770
+ .then((response) => {
1771
+ t.truthy(response);
1772
+ t.is(response.responseCode, "00");
1773
+ });
1774
+ });
1775
+ /// Food Stamp Balance Inquiry
1776
+ test("083 - ebt fs return visa swipe", (t) => {
1777
+ t.plan(2);
1778
+ const card = Data_1.TestCards.asEBTTrack(Data_1.TestCards.visaSwipeEncrypted(), "32539F50C245A6A93D123412324000AA");
1779
+ return card
1780
+ .refund(104.01)
1781
+ .withAllowDuplicates(true)
1782
+ .withCurrency("USD")
1783
+ .execute()
1784
+ .then((response) => {
1785
+ t.truthy(response);
1786
+ t.is(response.responseCode, "00");
1787
+ });
1788
+ });
1789
+ test("084 - ebt fs return visa manual", (t) => {
1790
+ t.plan(2);
1791
+ const card = Data_1.TestCards.asEBTManual(Data_1.TestCards.visaManual(false, true), "32539F50C245A6A93D123412324000AA");
1792
+ return card
1793
+ .refund(105.01)
1794
+ .withAllowDuplicates(true)
1795
+ .withCurrency("USD")
1796
+ .execute()
1797
+ .then((response) => {
1798
+ t.truthy(response);
1799
+ t.is(response.responseCode, "00");
1800
+ });
1801
+ });
1802
+ /// Food Stamp Balance Inquiry
1803
+ test("085 - ebt balance inquiry visa swipe", (t) => {
1804
+ t.plan(2);
1805
+ const card = Data_1.TestCards.asEBTTrack(Data_1.TestCards.visaSwipeEncrypted(), "32539F50C245A6A93D123412324000AA");
1806
+ return card
1807
+ .balanceInquiry()
1808
+ .execute()
1809
+ .then((response) => {
1810
+ t.truthy(response);
1811
+ t.is(response.responseCode, "00");
1812
+ });
1813
+ });
1814
+ test("086 - ebt balance inquiry visa manual", (t) => {
1815
+ t.plan(2);
1816
+ const card = Data_1.TestCards.asEBTManual(Data_1.TestCards.visaManual(true, true), "32539F50C245A6A93D123412324000AA");
1817
+ return card
1818
+ .balanceInquiry()
1819
+ .execute()
1820
+ .then((response) => {
1821
+ t.truthy(response);
1822
+ t.is(response.responseCode, "00");
1823
+ });
1824
+ });
1825
+ /// EBT CASH BENEFITS
1826
+ /// Cash Back Purchase
1827
+ test("087 - ebt cash back purchase visa swipe", (t) => {
1828
+ t.plan(2);
1829
+ const card = Data_1.TestCards.asEBTTrack(Data_1.TestCards.visaSwipeEncrypted(), "32539F50C245A6A93D123412324000AA");
1830
+ return card
1831
+ .charge(106.01)
1832
+ .withAllowDuplicates(true)
1833
+ .withCurrency("USD")
1834
+ .withCashBack(5.0)
1835
+ .execute()
1836
+ .then((response) => {
1837
+ t.truthy(response);
1838
+ t.is(response.responseCode, "00");
1839
+ });
1840
+ });
1841
+ test("088 - ebt cash back purchase visa manual", (t) => {
1842
+ t.plan(2);
1843
+ const card = Data_1.TestCards.asEBTManual(Data_1.TestCards.visaManual(false, true), "32539F50C245A6A93D123412324000AA");
1844
+ return card
1845
+ .charge(107.01)
1846
+ .withAllowDuplicates(true)
1847
+ .withCurrency("USD")
1848
+ .withCashBack(5.0)
1849
+ .execute()
1850
+ .then((response) => {
1851
+ t.truthy(response);
1852
+ t.is(response.responseCode, "00");
1853
+ });
1854
+ });
1855
+ /// No Cash Back Purchase
1856
+ test("089 - ebt cash back purchase visa swipe no cash back", (t) => {
1857
+ t.plan(2);
1858
+ const card = Data_1.TestCards.asEBTTrack(Data_1.TestCards.visaSwipeEncrypted(), "32539F50C245A6A93D123412324000AA");
1859
+ return card
1860
+ .charge(108.01)
1861
+ .withAllowDuplicates(true)
1862
+ .withCurrency("USD")
1863
+ .withCashBack(0)
1864
+ .execute()
1865
+ .then((response) => {
1866
+ t.truthy(response);
1867
+ t.is(response.responseCode, "00");
1868
+ });
1869
+ });
1870
+ test("090 - ebt cash back purchase visa manual no cash back", (t) => {
1871
+ t.plan(2);
1872
+ const card = Data_1.TestCards.asEBTManual(Data_1.TestCards.visaManual(false, true), "32539F50C245A6A93D123412324000AA");
1873
+ return card
1874
+ .charge(109.01)
1875
+ .withAllowDuplicates(true)
1876
+ .withCurrency("USD")
1877
+ .withCashBack(0)
1878
+ .execute()
1879
+ .then((response) => {
1880
+ t.truthy(response);
1881
+ t.is(response.responseCode, "00");
1882
+ });
1883
+ });
1884
+ /// Cash Back Balance Inquiry
1885
+ test("091 - ebt balance inquiry visa swipe cash", (t) => {
1886
+ t.plan(2);
1887
+ const card = Data_1.TestCards.asEBTTrack(Data_1.TestCards.visaSwipeEncrypted(), "32539F50C245A6A93D123412324000AA");
1888
+ return card
1889
+ .balanceInquiry(src_1.InquiryType.Cash)
1890
+ .execute()
1891
+ .then((response) => {
1892
+ t.truthy(response);
1893
+ t.is(response.responseCode, "00");
1894
+ });
1895
+ });
1896
+ test("092 - ebt balance inquiry visa manual cash", (t) => {
1897
+ t.plan(2);
1898
+ const card = Data_1.TestCards.asEBTManual(Data_1.TestCards.visaManual(true, true), "32539F50C245A6A93D123412324000AA");
1899
+ return card
1900
+ .balanceInquiry(src_1.InquiryType.Cash)
1901
+ .execute()
1902
+ .then((response) => {
1903
+ t.truthy(response);
1904
+ t.is(response.responseCode, "00");
1905
+ });
1906
+ });
1907
+ /// Cash Benefits Withdrawal
1908
+ test("093 - ebt benefit withdrawal visa swipe", (t) => {
1909
+ t.plan(2);
1910
+ const card = Data_1.TestCards.asEBTTrack(Data_1.TestCards.visaSwipeEncrypted(), "32539F50C245A6A93D123412324000AA");
1911
+ return card
1912
+ .charge(110.01)
1913
+ .withAllowDuplicates(true)
1914
+ .withCurrency("USD")
1915
+ .execute()
1916
+ .then((response) => {
1917
+ t.truthy(response);
1918
+ t.is(response.responseCode, "00");
1919
+ });
1920
+ });
1921
+ test("094 - ebt benefit withdrawal visa manual", (t) => {
1922
+ t.plan(2);
1923
+ const card = Data_1.TestCards.asEBTManual(Data_1.TestCards.visaManual(false, true), "32539F50C245A6A93D123412324000AA");
1924
+ return card
1925
+ .charge(111.01)
1926
+ .withAllowDuplicates(true)
1927
+ .withCurrency("USD")
1928
+ .withCashBack(0)
1929
+ .execute()
1930
+ .then((response) => {
1931
+ t.truthy(response);
1932
+ t.is(response.responseCode, "00");
1933
+ });
1934
+ });
1935
+ /// HMS GIFT - REWARDS
1936
+ /// GIFT
1937
+ /// ACTIVATE
1938
+ test("095 - activate gift 1 swipe", (t) => {
1939
+ t.plan(2);
1940
+ const card = Data_1.TestCards.giftCard1Swipe();
1941
+ return card
1942
+ .activate(6.0)
1943
+ .execute()
1944
+ .then((response) => {
1945
+ t.truthy(response);
1946
+ t.is(response.responseCode, "00");
1947
+ });
1948
+ });
1949
+ test("096 - activate gift 2 manual", (t) => {
1950
+ t.plan(2);
1951
+ const card = Data_1.TestCards.giftCard2Manual();
1952
+ return card
1953
+ .activate(7.0)
1954
+ .execute()
1955
+ .then((response) => {
1956
+ t.truthy(response);
1957
+ t.is(response.responseCode, "00");
1958
+ });
1959
+ });
1960
+ /// ADD VALUE
1961
+ test("097 - add value gift 1 swipe", (t) => {
1962
+ t.plan(2);
1963
+ const card = Data_1.TestCards.giftCard1Swipe();
1964
+ return card
1965
+ .addValue(8.0)
1966
+ .withCurrency("USD")
1967
+ .execute()
1968
+ .then((response) => {
1969
+ t.truthy(response);
1970
+ t.is(response.responseCode, "00");
1971
+ });
1972
+ });
1973
+ test("098 - add value gift 2 manual", (t) => {
1974
+ t.plan(2);
1975
+ const card = Data_1.TestCards.giftCard2Manual();
1976
+ return card
1977
+ .addValue(9.0)
1978
+ .withCurrency("USD")
1979
+ .execute()
1980
+ .then((response) => {
1981
+ t.truthy(response);
1982
+ t.is(response.responseCode, "00");
1983
+ });
1984
+ });
1985
+ /// BALANCE INQUIRY
1986
+ test("099 - balance inquiry gift 1 swipe", (t) => {
1987
+ t.plan(3);
1988
+ const card = Data_1.TestCards.giftCard1Swipe();
1989
+ return card
1990
+ .balanceInquiry()
1991
+ .execute()
1992
+ .then((response) => {
1993
+ t.truthy(response);
1994
+ t.is(response.responseCode, "00");
1995
+ t.is(response.balanceAmount, "10.00");
1996
+ });
1997
+ });
1998
+ test("100 - balance inquiry gift 2 manual", (t) => {
1999
+ t.plan(3);
2000
+ const card = Data_1.TestCards.giftCard2Manual();
2001
+ return card
2002
+ .balanceInquiry()
2003
+ .execute()
2004
+ .then((response) => {
2005
+ t.truthy(response);
2006
+ t.is(response.responseCode, "00");
2007
+ t.is(response.balanceAmount, "10.00");
2008
+ });
2009
+ });
2010
+ /// REPLACE / TRANSFER
2011
+ test("101 - replace gift 1 swipe", (t) => {
2012
+ t.plan(2);
2013
+ const oldCard = Data_1.TestCards.giftCard1Swipe();
2014
+ const newCard = Data_1.TestCards.giftCard2Manual();
2015
+ return oldCard
2016
+ .replaceWith(newCard)
2017
+ .execute()
2018
+ .then((response) => {
2019
+ t.truthy(response);
2020
+ t.is(response.responseCode, "00");
2021
+ });
2022
+ });
2023
+ test("102 - replace gift 2 manual", (t) => {
2024
+ t.plan(2);
2025
+ const newCard = Data_1.TestCards.giftCard1Swipe();
2026
+ const oldCard = Data_1.TestCards.giftCard2Manual();
2027
+ return oldCard
2028
+ .replaceWith(newCard)
2029
+ .execute()
2030
+ .then((response) => {
2031
+ t.truthy(response);
2032
+ t.is(response.responseCode, "00");
2033
+ });
2034
+ });
2035
+ /// SALE / REDEEM
2036
+ test("103 - sale gift 1 swipe", (t) => {
2037
+ t.plan(2);
2038
+ const card = Data_1.TestCards.giftCard1Swipe();
2039
+ return card
2040
+ .charge(1.0)
2041
+ .withCurrency("USD")
2042
+ .execute()
2043
+ .then((response) => {
2044
+ t.truthy(response);
2045
+ t.is(response.responseCode, "00");
2046
+ });
2047
+ });
2048
+ test("104 - sale gift 2 manual", (t) => {
2049
+ t.plan(2);
2050
+ const card = Data_1.TestCards.giftCard2Manual();
2051
+ return card
2052
+ .charge(2.0)
2053
+ .withCurrency("USD")
2054
+ .execute()
2055
+ .then((response) => {
2056
+ t.truthy(response);
2057
+ t.is(response.responseCode, "00");
2058
+ });
2059
+ });
2060
+ test("105 - sale gift 1 void swipe", (t) => {
2061
+ t.plan(4);
2062
+ const card = Data_1.TestCards.giftCard1Swipe();
2063
+ return card
2064
+ .charge(3.0)
2065
+ .withCurrency("USD")
2066
+ .execute()
2067
+ .then((response) => {
2068
+ t.truthy(response);
2069
+ t.is(response.responseCode, "00");
2070
+ return response;
2071
+ })
2072
+ .then((response) => {
2073
+ // test case 107
2074
+ return response
2075
+ .void()
2076
+ .execute()
2077
+ .then((voidResponse) => {
2078
+ t.truthy(voidResponse);
2079
+ t.is(voidResponse.responseCode, "00");
2080
+ });
2081
+ });
2082
+ });
2083
+ test("106 - sale gift 2 reversal manual", (t) => {
2084
+ t.plan(4);
2085
+ const card = Data_1.TestCards.giftCard2Manual();
2086
+ return card
2087
+ .charge(4.0)
2088
+ .withCurrency("USD")
2089
+ .execute()
2090
+ .then((response) => {
2091
+ t.truthy(response);
2092
+ t.is(response.responseCode, "00");
2093
+ return response;
2094
+ })
2095
+ .then((response) => {
2096
+ // test case 108
2097
+ return response
2098
+ .reverse(4.0)
2099
+ .execute()
2100
+ .then((voidResponse) => {
2101
+ t.truthy(voidResponse);
2102
+ t.is(voidResponse.responseCode, "00");
2103
+ });
2104
+ });
2105
+ });
2106
+ /// VOID
2107
+ test("107 - void gift", () => {
2108
+ // see test case 105
2109
+ });
2110
+ /// REVERSAL
2111
+ test("108 - reversal gift", () => {
2112
+ // see test case 106
2113
+ });
2114
+ /// DEACTIVATE
2115
+ test("109 - deactivate gift 1", (t) => {
2116
+ t.plan(2);
2117
+ const card = Data_1.TestCards.giftCard1Swipe();
2118
+ return card
2119
+ .deactivate()
2120
+ .execute()
2121
+ .then((response) => {
2122
+ t.truthy(response);
2123
+ t.is(response.responseCode, "00");
2124
+ });
2125
+ });
2126
+ /// RECEIPTS MESSAGING
2127
+ test("110 - receipts messaging", () => {
2128
+ /// PRINT AND SCAN RECEIPT FOR TEST 107
2129
+ });
2130
+ /// REWARDS
2131
+ /// BALANCE INQUIRY
2132
+ test("111 - balance inquiry rewards 1", (t) => {
2133
+ t.plan(3);
2134
+ const card = Data_1.TestCards.giftCard1Swipe();
2135
+ return card
2136
+ .balanceInquiry()
2137
+ .execute()
2138
+ .then((response) => {
2139
+ t.truthy(response);
2140
+ t.is(response.responseCode, "00");
2141
+ t.truthy(response.pointsBalanceAmount > "0");
2142
+ });
2143
+ });
2144
+ test("112 - balance inquiry rewards 2", (t) => {
2145
+ t.plan(3);
2146
+ const card = Data_1.TestCards.giftCard2Manual();
2147
+ return card
2148
+ .balanceInquiry()
2149
+ .execute()
2150
+ .then((response) => {
2151
+ t.truthy(response);
2152
+ t.is(response.responseCode, "00");
2153
+ t.truthy(response.pointsBalanceAmount > "0");
2154
+ });
2155
+ });
2156
+ /// ALIAS
2157
+ test("113 - create alias gift 1", (t) => {
2158
+ t.plan(1);
2159
+ return src_1.GiftCard.create("9725550100").then((card) => {
2160
+ t.truthy(card);
2161
+ });
2162
+ });
2163
+ test("114 - create alias gift 2", (t) => {
2164
+ t.plan(1);
2165
+ return src_1.GiftCard.create("9725550100").then((card) => {
2166
+ t.truthy(card);
2167
+ });
2168
+ });
2169
+ test("115 - add alias gift 1", (t) => {
2170
+ t.plan(2);
2171
+ const card = Data_1.TestCards.giftCard1Swipe();
2172
+ return card
2173
+ .addAlias("2145550199")
2174
+ .execute()
2175
+ .then((response) => {
2176
+ t.truthy(response);
2177
+ t.is(response.responseCode, "00");
2178
+ });
2179
+ });
2180
+ test("116 - add alias gift 2", (t) => {
2181
+ t.plan(2);
2182
+ const card = Data_1.TestCards.giftCard2Manual();
2183
+ return card
2184
+ .addAlias("2145550199")
2185
+ .execute()
2186
+ .then((response) => {
2187
+ t.truthy(response);
2188
+ t.is(response.responseCode, "00");
2189
+ });
2190
+ });
2191
+ test("117 - delete alias gift 1", (t) => {
2192
+ t.plan(2);
2193
+ const card = Data_1.TestCards.giftCard1Swipe();
2194
+ return card
2195
+ .removeAlias("2145550199")
2196
+ .execute()
2197
+ .then((response) => {
2198
+ t.truthy(response);
2199
+ t.is(response.responseCode, "00");
2200
+ });
2201
+ });
2202
+ test.after("999 - close batch", (t) => {
2203
+ t.plan(1);
2204
+ return new Promise((resolve, reject) => {
2205
+ src_1.BatchService.closeBatch()
2206
+ .then((response) => {
2207
+ t.truthy(response);
2208
+ resolve();
2209
+ })
2210
+ .catch((e) => {
2211
+ if (e.message.indexOf(BATCH_NOT_OPEN) !== -1 ||
2212
+ e.message.indexOf(BATCH_EMPTY) !== -1) {
2213
+ t.pass();
2214
+ resolve();
2215
+ return;
2216
+ }
2217
+ reject(e);
2218
+ });
2219
+ });
2220
+ });
2221
+ //# sourceMappingURL=RetailTest.js.map