globalpayments-api 3.5.1 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (835) hide show
  1. package/CHANGELOG.md +26 -1
  2. package/lib/src/Builders/AuthorizationBuilder.d.ts +348 -0
  3. package/lib/src/Builders/AuthorizationBuilder.js +668 -0
  4. package/lib/src/Builders/AuthorizationBuilder.js.map +1 -0
  5. package/lib/src/Builders/BaseBuilder/ValidationClause.d.ts +17 -0
  6. package/lib/src/Builders/BaseBuilder/ValidationClause.js +116 -0
  7. package/lib/src/Builders/BaseBuilder/ValidationClause.js.map +1 -0
  8. package/lib/src/Builders/BaseBuilder/ValidationTarget.d.ts +16 -0
  9. package/lib/src/Builders/BaseBuilder/ValidationTarget.js +36 -0
  10. package/lib/src/Builders/BaseBuilder/ValidationTarget.js.map +1 -0
  11. package/lib/src/Builders/BaseBuilder/Validations.d.ts +11 -0
  12. package/lib/src/Builders/BaseBuilder/Validations.js +55 -0
  13. package/lib/src/Builders/BaseBuilder/Validations.js.map +1 -0
  14. package/lib/src/Builders/BaseBuilder.d.ts +11 -0
  15. package/lib/src/Builders/BaseBuilder.js +17 -0
  16. package/lib/src/Builders/BaseBuilder.js.map +1 -0
  17. package/lib/src/Builders/ManagementBuilder.d.ts +122 -0
  18. package/lib/src/Builders/ManagementBuilder.js +244 -0
  19. package/lib/src/Builders/ManagementBuilder.js.map +1 -0
  20. package/lib/src/Builders/PayFacBuilder.d.ts +97 -0
  21. package/lib/src/Builders/PayFacBuilder.js +233 -0
  22. package/lib/src/Builders/PayFacBuilder.js.map +1 -0
  23. package/lib/src/Builders/RecurringBuilder.d.ts +13 -0
  24. package/lib/src/Builders/RecurringBuilder.js +34 -0
  25. package/lib/src/Builders/RecurringBuilder.js.map +1 -0
  26. package/lib/src/Builders/ReportBuilder.d.ts +10 -0
  27. package/lib/src/Builders/ReportBuilder.js +27 -0
  28. package/lib/src/Builders/ReportBuilder.js.map +1 -0
  29. package/lib/src/Builders/RequestBuilder/GpApi/AccessTokenRequest.d.ts +11 -0
  30. package/lib/src/Builders/RequestBuilder/GpApi/AccessTokenRequest.js +23 -0
  31. package/lib/src/Builders/RequestBuilder/GpApi/AccessTokenRequest.js.map +1 -0
  32. package/lib/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.d.ts +35 -0
  33. package/lib/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.js +448 -0
  34. package/lib/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.js.map +1 -0
  35. package/lib/src/Builders/RequestBuilder/GpApi/GpApiManagementRequestBuilder.d.ts +7 -0
  36. package/lib/src/Builders/RequestBuilder/GpApi/GpApiManagementRequestBuilder.js +179 -0
  37. package/lib/src/Builders/RequestBuilder/GpApi/GpApiManagementRequestBuilder.js.map +1 -0
  38. package/lib/src/Builders/RequestBuilder/GpApi/GpApiMiCRequestBuilder.d.ts +16 -0
  39. package/lib/src/Builders/RequestBuilder/GpApi/GpApiMiCRequestBuilder.js +34 -0
  40. package/lib/src/Builders/RequestBuilder/GpApi/GpApiMiCRequestBuilder.js.map +1 -0
  41. package/lib/src/Builders/RequestBuilder/GpApi/GpApiReportRequestBuilder.d.ts +11 -0
  42. package/lib/src/Builders/RequestBuilder/GpApi/GpApiReportRequestBuilder.js +163 -0
  43. package/lib/src/Builders/RequestBuilder/GpApi/GpApiReportRequestBuilder.js.map +1 -0
  44. package/lib/src/Builders/RequestBuilder/GpApi/GpApiSecureRequestBuilder.d.ts +20 -0
  45. package/lib/src/Builders/RequestBuilder/GpApi/GpApiSecureRequestBuilder.js +413 -0
  46. package/lib/src/Builders/RequestBuilder/GpApi/GpApiSecureRequestBuilder.js.map +1 -0
  47. package/lib/src/Builders/RequestBuilder/GpApi/GpApiSessionInfo.d.ts +6 -0
  48. package/lib/src/Builders/RequestBuilder/GpApi/GpApiSessionInfo.js +49 -0
  49. package/lib/src/Builders/RequestBuilder/GpApi/GpApiSessionInfo.js.map +1 -0
  50. package/lib/src/Builders/RequestBuilder/GpApi/index.d.ts +4 -0
  51. package/lib/src/Builders/RequestBuilder/GpApi/index.js +21 -0
  52. package/lib/src/Builders/RequestBuilder/GpApi/index.js.map +1 -0
  53. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.d.ts +18 -0
  54. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.js +125 -0
  55. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.js.map +1 -0
  56. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomManagementRequestBuilder.d.ts +11 -0
  57. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomManagementRequestBuilder.js +83 -0
  58. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomManagementRequestBuilder.js.map +1 -0
  59. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.d.ts +9 -0
  60. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.js +66 -0
  61. package/lib/src/Builders/RequestBuilder/GpEcom/GpEcomRequestBuilder.js.map +1 -0
  62. package/lib/src/Builders/RequestBuilder/GpEcom/index.d.ts +3 -0
  63. package/lib/src/Builders/RequestBuilder/GpEcom/index.js +20 -0
  64. package/lib/src/Builders/RequestBuilder/GpEcom/index.js.map +1 -0
  65. package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.d.ts +8 -0
  66. package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.js +41 -0
  67. package/lib/src/Builders/RequestBuilder/RequestBuilderFactory.js.map +1 -0
  68. package/lib/src/Builders/RequestBuilder/index.d.ts +3 -0
  69. package/lib/src/Builders/RequestBuilder/index.js +20 -0
  70. package/lib/src/Builders/RequestBuilder/index.js.map +1 -0
  71. package/lib/src/Builders/Secure3dBuilder.d.ts +90 -0
  72. package/lib/src/Builders/Secure3dBuilder.js +423 -0
  73. package/lib/src/Builders/Secure3dBuilder.js.map +1 -0
  74. package/lib/src/Builders/SecureBuilder.d.ts +446 -0
  75. package/lib/src/Builders/SecureBuilder.js +729 -0
  76. package/lib/src/Builders/SecureBuilder.js.map +1 -0
  77. package/lib/src/Builders/TransactionBuilder.d.ts +13 -0
  78. package/lib/src/Builders/TransactionBuilder.js +47 -0
  79. package/lib/src/Builders/TransactionBuilder.js.map +1 -0
  80. package/lib/src/Builders/TransactionReportBuilder.d.ts +19 -0
  81. package/lib/src/Builders/TransactionReportBuilder.js +92 -0
  82. package/lib/src/Builders/TransactionReportBuilder.js.map +1 -0
  83. package/lib/src/Builders/index.d.ts +10 -0
  84. package/lib/src/Builders/index.js +27 -0
  85. package/lib/src/Builders/index.js.map +1 -0
  86. package/lib/src/ConfiguredServices.d.ts +28 -0
  87. package/lib/src/ConfiguredServices.js +53 -0
  88. package/lib/src/ConfiguredServices.js.map +1 -0
  89. package/lib/src/Entities/Address.d.ts +14 -0
  90. package/lib/src/Entities/Address.js +23 -0
  91. package/lib/src/Entities/Address.js.map +1 -0
  92. package/lib/src/Entities/BatchSummary.d.ts +6 -0
  93. package/lib/src/Entities/BatchSummary.js +11 -0
  94. package/lib/src/Entities/BatchSummary.js.map +1 -0
  95. package/lib/src/Entities/BrowserData.d.ts +13 -0
  96. package/lib/src/Entities/BrowserData.js +18 -0
  97. package/lib/src/Entities/BrowserData.js.map +1 -0
  98. package/lib/src/Entities/Card.d.ts +36 -0
  99. package/lib/src/Entities/Card.js +41 -0
  100. package/lib/src/Entities/Card.js.map +1 -0
  101. package/lib/src/Entities/CardIssuerResponse.d.ts +22 -0
  102. package/lib/src/Entities/CardIssuerResponse.js +27 -0
  103. package/lib/src/Entities/CardIssuerResponse.js.map +1 -0
  104. package/lib/src/Entities/Customer.d.ts +74 -0
  105. package/lib/src/Entities/Customer.js +94 -0
  106. package/lib/src/Entities/Customer.js.map +1 -0
  107. package/lib/src/Entities/CustomerDocument.d.ts +8 -0
  108. package/lib/src/Entities/CustomerDocument.js +16 -0
  109. package/lib/src/Entities/CustomerDocument.js.map +1 -0
  110. package/lib/src/Entities/DocumentUploadData.d.ts +13 -0
  111. package/lib/src/Entities/DocumentUploadData.js +81 -0
  112. package/lib/src/Entities/DocumentUploadData.js.map +1 -0
  113. package/lib/src/Entities/EcommerceInfo.d.ts +12 -0
  114. package/lib/src/Entities/EcommerceInfo.js +22 -0
  115. package/lib/src/Entities/EcommerceInfo.js.map +1 -0
  116. package/lib/src/Entities/EncryptionData.d.ts +7 -0
  117. package/lib/src/Entities/EncryptionData.js +16 -0
  118. package/lib/src/Entities/EncryptionData.js.map +1 -0
  119. package/lib/src/Entities/Enums/AcquisitionType.d.ts +10 -0
  120. package/lib/src/Entities/Enums/AcquisitionType.js +15 -0
  121. package/lib/src/Entities/Enums/AcquisitionType.js.map +1 -0
  122. package/lib/src/Entities/Enums/CardTypeFilter.d.ts +7 -0
  123. package/lib/src/Entities/Enums/CardTypeFilter.js +12 -0
  124. package/lib/src/Entities/Enums/CardTypeFilter.js.map +1 -0
  125. package/lib/src/Entities/Enums/IsoCountries.d.ts +9 -0
  126. package/lib/src/Entities/Enums/IsoCountries.js +1941 -0
  127. package/lib/src/Entities/Enums/IsoCountries.js.map +1 -0
  128. package/lib/src/Entities/Enums.d.ts +818 -0
  129. package/lib/src/Entities/Enums.js +1030 -0
  130. package/lib/src/Entities/Enums.js.map +1 -0
  131. package/lib/src/Entities/Errors.d.ts +23 -0
  132. package/lib/src/Entities/Errors.js +72 -0
  133. package/lib/src/Entities/Errors.js.map +1 -0
  134. package/lib/src/Entities/FraudRule.d.ts +8 -0
  135. package/lib/src/Entities/FraudRule.js +17 -0
  136. package/lib/src/Entities/FraudRule.js.map +1 -0
  137. package/lib/src/Entities/GpApi/AccessTokenInfo.d.ts +16 -0
  138. package/lib/src/Entities/GpApi/AccessTokenInfo.js +21 -0
  139. package/lib/src/Entities/GpApi/AccessTokenInfo.js.map +1 -0
  140. package/lib/src/Entities/GpApi/DTO/Card.d.ts +16 -0
  141. package/lib/src/Entities/GpApi/DTO/Card.js +21 -0
  142. package/lib/src/Entities/GpApi/DTO/Card.js.map +1 -0
  143. package/lib/src/Entities/GpApi/DTO/PaymentMethod.d.ts +17 -0
  144. package/lib/src/Entities/GpApi/DTO/PaymentMethod.js +21 -0
  145. package/lib/src/Entities/GpApi/DTO/PaymentMethod.js.map +1 -0
  146. package/lib/src/Entities/GpApi/DTO/index.d.ts +2 -0
  147. package/lib/src/Entities/GpApi/DTO/index.js +19 -0
  148. package/lib/src/Entities/GpApi/DTO/index.js.map +1 -0
  149. package/lib/src/Entities/GpApi/GpApiAccount.d.ts +5 -0
  150. package/lib/src/Entities/GpApi/GpApiAccount.js +13 -0
  151. package/lib/src/Entities/GpApi/GpApiAccount.js.map +1 -0
  152. package/lib/src/Entities/GpApi/GpApiRequest.d.ts +21 -0
  153. package/lib/src/Entities/GpApi/GpApiRequest.js +26 -0
  154. package/lib/src/Entities/GpApi/GpApiRequest.js.map +1 -0
  155. package/lib/src/Entities/GpApi/GpApiTokenResponse.d.ts +52 -0
  156. package/lib/src/Entities/GpApi/GpApiTokenResponse.js +115 -0
  157. package/lib/src/Entities/GpApi/GpApiTokenResponse.js.map +1 -0
  158. package/lib/src/Entities/GpApi/PageResult.d.ts +8 -0
  159. package/lib/src/Entities/GpApi/PageResult.js +13 -0
  160. package/lib/src/Entities/GpApi/PageResult.js.map +1 -0
  161. package/lib/src/Entities/GpApi/index.d.ts +5 -0
  162. package/lib/src/Entities/GpApi/index.js +22 -0
  163. package/lib/src/Entities/GpApi/index.js.map +1 -0
  164. package/lib/src/Entities/HostedPaymentData.d.ts +10 -0
  165. package/lib/src/Entities/HostedPaymentData.js +17 -0
  166. package/lib/src/Entities/HostedPaymentData.js.map +1 -0
  167. package/lib/src/Entities/IRequestBuilder.d.ts +6 -0
  168. package/lib/src/Entities/IRequestBuilder.js +3 -0
  169. package/lib/src/Entities/IRequestBuilder.js.map +1 -0
  170. package/lib/src/Entities/IRequestLogger.d.ts +8 -0
  171. package/lib/src/Entities/IRequestLogger.js +3 -0
  172. package/lib/src/Entities/IRequestLogger.js.map +1 -0
  173. package/lib/src/Entities/LodgingData.d.ts +14 -0
  174. package/lib/src/Entities/LodgingData.js +18 -0
  175. package/lib/src/Entities/LodgingData.js.map +1 -0
  176. package/lib/src/Entities/LodgingItems.d.ts +6 -0
  177. package/lib/src/Entities/LodgingItems.js +11 -0
  178. package/lib/src/Entities/LodgingItems.js.map +1 -0
  179. package/lib/src/Entities/MaskedValueCollection.d.ts +12 -0
  180. package/lib/src/Entities/MaskedValueCollection.js +53 -0
  181. package/lib/src/Entities/MaskedValueCollection.js.map +1 -0
  182. package/lib/src/Entities/MerchantDataCollection.d.ts +16 -0
  183. package/lib/src/Entities/MerchantDataCollection.js +102 -0
  184. package/lib/src/Entities/MerchantDataCollection.js.map +1 -0
  185. package/lib/src/Entities/MerchantKVP.d.ts +11 -0
  186. package/lib/src/Entities/MerchantKVP.js +28 -0
  187. package/lib/src/Entities/MerchantKVP.js.map +1 -0
  188. package/lib/src/Entities/MessageExtension.d.ts +6 -0
  189. package/lib/src/Entities/MessageExtension.js +11 -0
  190. package/lib/src/Entities/MessageExtension.js.map +1 -0
  191. package/lib/src/Entities/MobileData.d.ts +11 -0
  192. package/lib/src/Entities/MobileData.js +15 -0
  193. package/lib/src/Entities/MobileData.js.map +1 -0
  194. package/lib/src/Entities/PayerDetails.d.ts +8 -0
  195. package/lib/src/Entities/PayerDetails.js +12 -0
  196. package/lib/src/Entities/PayerDetails.js.map +1 -0
  197. package/lib/src/Entities/PhoneNumber.d.ts +6 -0
  198. package/lib/src/Entities/PhoneNumber.js +15 -0
  199. package/lib/src/Entities/PhoneNumber.js.map +1 -0
  200. package/lib/src/Entities/ProFac/AccountBalanceResponseData.d.ts +7 -0
  201. package/lib/src/Entities/ProFac/AccountBalanceResponseData.js +12 -0
  202. package/lib/src/Entities/ProFac/AccountBalanceResponseData.js.map +1 -0
  203. package/lib/src/Entities/ProFac/AccountPermissions.d.ts +15 -0
  204. package/lib/src/Entities/ProFac/AccountPermissions.js +19 -0
  205. package/lib/src/Entities/ProFac/AccountPermissions.js.map +1 -0
  206. package/lib/src/Entities/ProFac/BankAccountData.d.ts +10 -0
  207. package/lib/src/Entities/ProFac/BankAccountData.js +42 -0
  208. package/lib/src/Entities/ProFac/BankAccountData.js.map +1 -0
  209. package/lib/src/Entities/ProFac/BankAccountOwnershipData.d.ts +8 -0
  210. package/lib/src/Entities/ProFac/BankAccountOwnershipData.js +15 -0
  211. package/lib/src/Entities/ProFac/BankAccountOwnershipData.js.map +1 -0
  212. package/lib/src/Entities/ProFac/BeneficialOwnerData.d.ts +6 -0
  213. package/lib/src/Entities/ProFac/BeneficialOwnerData.js +12 -0
  214. package/lib/src/Entities/ProFac/BeneficialOwnerData.js.map +1 -0
  215. package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.d.ts +5 -0
  216. package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.js +10 -0
  217. package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.js.map +1 -0
  218. package/lib/src/Entities/ProFac/BusinessData.d.ts +15 -0
  219. package/lib/src/Entities/ProFac/BusinessData.js +50 -0
  220. package/lib/src/Entities/ProFac/BusinessData.js.map +1 -0
  221. package/lib/src/Entities/ProFac/DeviceAttributeInfo.d.ts +4 -0
  222. package/lib/src/Entities/ProFac/DeviceAttributeInfo.js +17 -0
  223. package/lib/src/Entities/ProFac/DeviceAttributeInfo.js.map +1 -0
  224. package/lib/src/Entities/ProFac/DeviceData.d.ts +5 -0
  225. package/lib/src/Entities/ProFac/DeviceData.js +11 -0
  226. package/lib/src/Entities/ProFac/DeviceData.js.map +1 -0
  227. package/lib/src/Entities/ProFac/DeviceInfo.d.ts +6 -0
  228. package/lib/src/Entities/ProFac/DeviceInfo.js +19 -0
  229. package/lib/src/Entities/ProFac/DeviceInfo.js.map +1 -0
  230. package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.d.ts +7 -0
  231. package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.js +15 -0
  232. package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.js.map +1 -0
  233. package/lib/src/Entities/ProFac/GrossBillingInformation.d.ts +8 -0
  234. package/lib/src/Entities/ProFac/GrossBillingInformation.js +10 -0
  235. package/lib/src/Entities/ProFac/GrossBillingInformation.js.map +1 -0
  236. package/lib/src/Entities/ProFac/OrderDevice.d.ts +18 -0
  237. package/lib/src/Entities/ProFac/OrderDevice.js +23 -0
  238. package/lib/src/Entities/ProFac/OrderDevice.js.map +1 -0
  239. package/lib/src/Entities/ProFac/OwnersData.d.ts +12 -0
  240. package/lib/src/Entities/ProFac/OwnersData.js +43 -0
  241. package/lib/src/Entities/ProFac/OwnersData.js.map +1 -0
  242. package/lib/src/Entities/ProFac/PayFacResponseData.d.ts +55 -0
  243. package/lib/src/Entities/ProFac/PayFacResponseData.js +62 -0
  244. package/lib/src/Entities/ProFac/PayFacResponseData.js.map +1 -0
  245. package/lib/src/Entities/ProFac/RenewAccountData.d.ts +10 -0
  246. package/lib/src/Entities/ProFac/RenewAccountData.js +38 -0
  247. package/lib/src/Entities/ProFac/RenewAccountData.js.map +1 -0
  248. package/lib/src/Entities/ProFac/SignificantOwnerData.d.ts +8 -0
  249. package/lib/src/Entities/ProFac/SignificantOwnerData.js +27 -0
  250. package/lib/src/Entities/ProFac/SignificantOwnerData.js.map +1 -0
  251. package/lib/src/Entities/ProFac/ThreatRiskData.d.ts +5 -0
  252. package/lib/src/Entities/ProFac/ThreatRiskData.js +19 -0
  253. package/lib/src/Entities/ProFac/ThreatRiskData.js.map +1 -0
  254. package/lib/src/Entities/ProFac/UserPersonalData.d.ts +26 -0
  255. package/lib/src/Entities/ProFac/UserPersonalData.js +82 -0
  256. package/lib/src/Entities/ProFac/UserPersonalData.js.map +1 -0
  257. package/lib/src/Entities/RecurringEntity.d.ts +14 -0
  258. package/lib/src/Entities/RecurringEntity.js +92 -0
  259. package/lib/src/Entities/RecurringEntity.js.map +1 -0
  260. package/lib/src/Entities/Reporting/BaseSummary.d.ts +8 -0
  261. package/lib/src/Entities/Reporting/BaseSummary.js +13 -0
  262. package/lib/src/Entities/Reporting/BaseSummary.js.map +1 -0
  263. package/lib/src/Entities/Reporting/SearchCriteriaBuilder.d.ts +108 -0
  264. package/lib/src/Entities/Reporting/SearchCriteriaBuilder.js +125 -0
  265. package/lib/src/Entities/Reporting/SearchCriteriaBuilder.js.map +1 -0
  266. package/lib/src/Entities/Reporting/StoredPaymentMethodSummary.d.ts +11 -0
  267. package/lib/src/Entities/Reporting/StoredPaymentMethodSummary.js +16 -0
  268. package/lib/src/Entities/Reporting/StoredPaymentMethodSummary.js.map +1 -0
  269. package/lib/src/Entities/Reporting/index.d.ts +3 -0
  270. package/lib/src/Entities/Reporting/index.js +20 -0
  271. package/lib/src/Entities/Reporting/index.js.map +1 -0
  272. package/lib/src/Entities/Request.d.ts +10 -0
  273. package/lib/src/Entities/Request.js +18 -0
  274. package/lib/src/Entities/Request.js.map +1 -0
  275. package/lib/src/Entities/SSORequestData.d.ts +5 -0
  276. package/lib/src/Entities/SSORequestData.js +19 -0
  277. package/lib/src/Entities/SSORequestData.js.map +1 -0
  278. package/lib/src/Entities/Schedule.d.ts +47 -0
  279. package/lib/src/Entities/Schedule.js +325 -0
  280. package/lib/src/Entities/Schedule.js.map +1 -0
  281. package/lib/src/Entities/ServiceEndpoints.d.ts +12 -0
  282. package/lib/src/Entities/ServiceEndpoints.js +17 -0
  283. package/lib/src/Entities/ServiceEndpoints.js.map +1 -0
  284. package/lib/src/Entities/StoredCredentials.d.ts +9 -0
  285. package/lib/src/Entities/StoredCredentials.js +13 -0
  286. package/lib/src/Entities/StoredCredentials.js.map +1 -0
  287. package/lib/src/Entities/ThreeDSecure.d.ts +66 -0
  288. package/lib/src/Entities/ThreeDSecure.js +162 -0
  289. package/lib/src/Entities/ThreeDSecure.js.map +1 -0
  290. package/lib/src/Entities/Transaction.d.ts +97 -0
  291. package/lib/src/Entities/Transaction.js +158 -0
  292. package/lib/src/Entities/Transaction.js.map +1 -0
  293. package/lib/src/Entities/TransactionStatus.d.ts +13 -0
  294. package/lib/src/Entities/TransactionStatus.js +29 -0
  295. package/lib/src/Entities/TransactionStatus.js.map +1 -0
  296. package/lib/src/Entities/TransactionSummary.d.ts +78 -0
  297. package/lib/src/Entities/TransactionSummary.js +83 -0
  298. package/lib/src/Entities/TransactionSummary.js.map +1 -0
  299. package/lib/src/Entities/UPA/ProcessIndicator.d.ts +7 -0
  300. package/lib/src/Entities/UPA/ProcessIndicator.js +11 -0
  301. package/lib/src/Entities/UPA/ProcessIndicator.js.map +1 -0
  302. package/lib/src/Entities/UPA/UpaParam.d.ts +10 -0
  303. package/lib/src/Entities/UPA/UpaParam.js +14 -0
  304. package/lib/src/Entities/UPA/UpaParam.js.map +1 -0
  305. package/lib/src/Entities/UPA/UpaTransactionData.d.ts +8 -0
  306. package/lib/src/Entities/UPA/UpaTransactionData.js +12 -0
  307. package/lib/src/Entities/UPA/UpaTransactionData.js.map +1 -0
  308. package/lib/src/Entities/UPA/index.d.ts +3 -0
  309. package/lib/src/Entities/UPA/index.js +20 -0
  310. package/lib/src/Entities/UPA/index.js.map +1 -0
  311. package/lib/src/Entities/index.d.ts +38 -0
  312. package/lib/src/Entities/index.js +55 -0
  313. package/lib/src/Entities/index.js.map +1 -0
  314. package/lib/src/Gateways/Gateway.d.ts +16 -0
  315. package/lib/src/Gateways/Gateway.js +94 -0
  316. package/lib/src/Gateways/Gateway.js.map +1 -0
  317. package/lib/src/Gateways/GatewayResponse.d.ts +8 -0
  318. package/lib/src/Gateways/GatewayResponse.js +15 -0
  319. package/lib/src/Gateways/GatewayResponse.js.map +1 -0
  320. package/lib/src/Gateways/GpApiConnector.d.ts +43 -0
  321. package/lib/src/Gateways/GpApiConnector.js +239 -0
  322. package/lib/src/Gateways/GpApiConnector.js.map +1 -0
  323. package/lib/src/Gateways/GpEcomConnector.d.ts +36 -0
  324. package/lib/src/Gateways/GpEcomConnector.js +468 -0
  325. package/lib/src/Gateways/GpEcomConnector.js.map +1 -0
  326. package/lib/src/Gateways/IPayFacProvider.d.ts +5 -0
  327. package/lib/src/Gateways/IPayFacProvider.js +3 -0
  328. package/lib/src/Gateways/IPayFacProvider.js.map +1 -0
  329. package/lib/src/Gateways/IPaymentGateway.d.ts +8 -0
  330. package/lib/src/Gateways/IPaymentGateway.js +3 -0
  331. package/lib/src/Gateways/IPaymentGateway.js.map +1 -0
  332. package/lib/src/Gateways/IRecurringService.d.ts +6 -0
  333. package/lib/src/Gateways/IRecurringService.js +3 -0
  334. package/lib/src/Gateways/IRecurringService.js.map +1 -0
  335. package/lib/src/Gateways/PayPlanConnector.d.ts +42 -0
  336. package/lib/src/Gateways/PayPlanConnector.js +545 -0
  337. package/lib/src/Gateways/PayPlanConnector.js.map +1 -0
  338. package/lib/src/Gateways/PorticoConnector.d.ts +48 -0
  339. package/lib/src/Gateways/PorticoConnector.js +1010 -0
  340. package/lib/src/Gateways/PorticoConnector.js.map +1 -0
  341. package/lib/src/Gateways/ProPayConnector.d.ts +45 -0
  342. package/lib/src/Gateways/ProPayConnector.js +801 -0
  343. package/lib/src/Gateways/ProPayConnector.js.map +1 -0
  344. package/lib/src/Gateways/RestGateway.d.ts +9 -0
  345. package/lib/src/Gateways/RestGateway.js +77 -0
  346. package/lib/src/Gateways/RestGateway.js.map +1 -0
  347. package/lib/src/Gateways/XmlGateway.d.ts +6 -0
  348. package/lib/src/Gateways/XmlGateway.js +54 -0
  349. package/lib/src/Gateways/XmlGateway.js.map +1 -0
  350. package/lib/src/Gateways/https-wrapper.d.ts +3 -0
  351. package/lib/src/Gateways/https-wrapper.js +81 -0
  352. package/lib/src/Gateways/https-wrapper.js.map +1 -0
  353. package/lib/src/Gateways/index.d.ts +9 -0
  354. package/lib/src/Gateways/index.js +26 -0
  355. package/lib/src/Gateways/index.js.map +1 -0
  356. package/lib/src/HostedPaymentConfig.d.ts +12 -0
  357. package/lib/src/HostedPaymentConfig.js +16 -0
  358. package/lib/src/HostedPaymentConfig.js.map +1 -0
  359. package/lib/src/Mapping/EnumMapping.d.ts +10 -0
  360. package/lib/src/Mapping/EnumMapping.js +110 -0
  361. package/lib/src/Mapping/EnumMapping.js.map +1 -0
  362. package/lib/src/Mapping/GpApiMapping.d.ts +16 -0
  363. package/lib/src/Mapping/GpApiMapping.js +381 -0
  364. package/lib/src/Mapping/GpApiMapping.js.map +1 -0
  365. package/lib/src/Mapping/GpEcomMapping.d.ts +9 -0
  366. package/lib/src/Mapping/GpEcomMapping.js +85 -0
  367. package/lib/src/Mapping/GpEcomMapping.js.map +1 -0
  368. package/lib/src/Mapping/index.d.ts +3 -0
  369. package/lib/src/Mapping/index.js +20 -0
  370. package/lib/src/Mapping/index.js.map +1 -0
  371. package/lib/src/PaymentMethods/AlternativePaymentMethod.d.ts +22 -0
  372. package/lib/src/PaymentMethods/AlternativePaymentMethod.js +47 -0
  373. package/lib/src/PaymentMethods/AlternativePaymentMethod.js.map +1 -0
  374. package/lib/src/PaymentMethods/Cash.d.ts +8 -0
  375. package/lib/src/PaymentMethods/Cash.js +16 -0
  376. package/lib/src/PaymentMethods/Cash.js.map +1 -0
  377. package/lib/src/PaymentMethods/Credit.d.ts +109 -0
  378. package/lib/src/PaymentMethods/Credit.js +161 -0
  379. package/lib/src/PaymentMethods/Credit.js.map +1 -0
  380. package/lib/src/PaymentMethods/CreditCardData.d.ts +20 -0
  381. package/lib/src/PaymentMethods/CreditCardData.js +47 -0
  382. package/lib/src/PaymentMethods/CreditCardData.js.map +1 -0
  383. package/lib/src/PaymentMethods/CreditTrackData.d.ts +15 -0
  384. package/lib/src/PaymentMethods/CreditTrackData.js +36 -0
  385. package/lib/src/PaymentMethods/CreditTrackData.js.map +1 -0
  386. package/lib/src/PaymentMethods/Debit.d.ts +48 -0
  387. package/lib/src/PaymentMethods/Debit.js +64 -0
  388. package/lib/src/PaymentMethods/Debit.js.map +1 -0
  389. package/lib/src/PaymentMethods/DebitTrackData.d.ts +9 -0
  390. package/lib/src/PaymentMethods/DebitTrackData.js +24 -0
  391. package/lib/src/PaymentMethods/DebitTrackData.js.map +1 -0
  392. package/lib/src/PaymentMethods/EBT.d.ts +48 -0
  393. package/lib/src/PaymentMethods/EBT.js +68 -0
  394. package/lib/src/PaymentMethods/EBT.js.map +1 -0
  395. package/lib/src/PaymentMethods/EBTCardData.d.ts +16 -0
  396. package/lib/src/PaymentMethods/EBTCardData.js +25 -0
  397. package/lib/src/PaymentMethods/EBTCardData.js.map +1 -0
  398. package/lib/src/PaymentMethods/EBTTrackData.d.ts +8 -0
  399. package/lib/src/PaymentMethods/EBTTrackData.js +11 -0
  400. package/lib/src/PaymentMethods/EBTTrackData.js.map +1 -0
  401. package/lib/src/PaymentMethods/ECheck.d.ts +32 -0
  402. package/lib/src/PaymentMethods/ECheck.js +38 -0
  403. package/lib/src/PaymentMethods/ECheck.js.map +1 -0
  404. package/lib/src/PaymentMethods/GiftCard.d.ts +131 -0
  405. package/lib/src/PaymentMethods/GiftCard.js +189 -0
  406. package/lib/src/PaymentMethods/GiftCard.js.map +1 -0
  407. package/lib/src/PaymentMethods/Interfaces.d.ts +63 -0
  408. package/lib/src/PaymentMethods/Interfaces.js +3 -0
  409. package/lib/src/PaymentMethods/Interfaces.js.map +1 -0
  410. package/lib/src/PaymentMethods/PaymentMethod.d.ts +21 -0
  411. package/lib/src/PaymentMethods/PaymentMethod.js +63 -0
  412. package/lib/src/PaymentMethods/PaymentMethod.js.map +1 -0
  413. package/lib/src/PaymentMethods/RecurringPaymentMethod.d.ts +25 -0
  414. package/lib/src/PaymentMethods/RecurringPaymentMethod.js +69 -0
  415. package/lib/src/PaymentMethods/RecurringPaymentMethod.js.map +1 -0
  416. package/lib/src/PaymentMethods/TransactionReference.d.ts +10 -0
  417. package/lib/src/PaymentMethods/TransactionReference.js +17 -0
  418. package/lib/src/PaymentMethods/TransactionReference.js.map +1 -0
  419. package/lib/src/PaymentMethods/index.d.ts +17 -0
  420. package/lib/src/PaymentMethods/index.js +34 -0
  421. package/lib/src/PaymentMethods/index.js.map +1 -0
  422. package/lib/src/ServiceConfigs/AcceptorConfig.d.ts +29 -0
  423. package/lib/src/ServiceConfigs/AcceptorConfig.js +43 -0
  424. package/lib/src/ServiceConfigs/AcceptorConfig.js.map +1 -0
  425. package/lib/src/ServiceConfigs/Configuration.d.ts +15 -0
  426. package/lib/src/ServiceConfigs/Configuration.js +20 -0
  427. package/lib/src/ServiceConfigs/Configuration.js.map +1 -0
  428. package/lib/src/ServiceConfigs/Gateways/GatewayConfig.d.ts +14 -0
  429. package/lib/src/ServiceConfigs/Gateways/GatewayConfig.js +30 -0
  430. package/lib/src/ServiceConfigs/Gateways/GatewayConfig.js.map +1 -0
  431. package/lib/src/ServiceConfigs/Gateways/GpApiConfig.d.ts +21 -0
  432. package/lib/src/ServiceConfigs/Gateways/GpApiConfig.js +47 -0
  433. package/lib/src/ServiceConfigs/Gateways/GpApiConfig.js.map +1 -0
  434. package/lib/src/ServiceConfigs/Gateways/GpEcomConfig.d.ts +21 -0
  435. package/lib/src/ServiceConfigs/Gateways/GpEcomConfig.js +51 -0
  436. package/lib/src/ServiceConfigs/Gateways/GpEcomConfig.js.map +1 -0
  437. package/lib/src/ServiceConfigs/Gateways/PorticoConfig.d.ts +22 -0
  438. package/lib/src/ServiceConfigs/Gateways/PorticoConfig.js +117 -0
  439. package/lib/src/ServiceConfigs/Gateways/PorticoConfig.js.map +1 -0
  440. package/lib/src/ServiceConfigs/Gateways/index.d.ts +4 -0
  441. package/lib/src/ServiceConfigs/Gateways/index.js +21 -0
  442. package/lib/src/ServiceConfigs/Gateways/index.js.map +1 -0
  443. package/lib/src/ServiceConfigs/ServicesConfigs.d.ts +8 -0
  444. package/lib/src/ServiceConfigs/ServicesConfigs.js +15 -0
  445. package/lib/src/ServiceConfigs/ServicesConfigs.js.map +1 -0
  446. package/lib/src/ServiceConfigs/index.d.ts +4 -0
  447. package/lib/src/ServiceConfigs/index.js +21 -0
  448. package/lib/src/ServiceConfigs/index.js.map +1 -0
  449. package/lib/src/Services/BatchService.d.ts +4 -0
  450. package/lib/src/Services/BatchService.js +15 -0
  451. package/lib/src/Services/BatchService.js.map +1 -0
  452. package/lib/src/Services/CheckService.d.ts +7 -0
  453. package/lib/src/Services/CheckService.js +20 -0
  454. package/lib/src/Services/CheckService.js.map +1 -0
  455. package/lib/src/Services/CreditService.d.ts +13 -0
  456. package/lib/src/Services/CreditService.js +54 -0
  457. package/lib/src/Services/CreditService.js.map +1 -0
  458. package/lib/src/Services/DebitService.d.ts +8 -0
  459. package/lib/src/Services/DebitService.js +28 -0
  460. package/lib/src/Services/DebitService.js.map +1 -0
  461. package/lib/src/Services/DeviceService.d.ts +5 -0
  462. package/lib/src/Services/DeviceService.js +19 -0
  463. package/lib/src/Services/DeviceService.js.map +1 -0
  464. package/lib/src/Services/EBTService.d.ts +9 -0
  465. package/lib/src/Services/EBTService.js +31 -0
  466. package/lib/src/Services/EBTService.js.map +1 -0
  467. package/lib/src/Services/GiftService.d.ts +17 -0
  468. package/lib/src/Services/GiftService.js +54 -0
  469. package/lib/src/Services/GiftService.js.map +1 -0
  470. package/lib/src/Services/GpApiServices.d.ts +4 -0
  471. package/lib/src/Services/GpApiServices.js +44 -0
  472. package/lib/src/Services/GpApiServices.js.map +1 -0
  473. package/lib/src/Services/HostedService.d.ts +10 -0
  474. package/lib/src/Services/HostedService.js +59 -0
  475. package/lib/src/Services/HostedService.js.map +1 -0
  476. package/lib/src/Services/PayFacService.d.ts +26 -0
  477. package/lib/src/Services/PayFacService.js +76 -0
  478. package/lib/src/Services/PayFacService.js.map +1 -0
  479. package/lib/src/Services/RecurringService.d.ts +8 -0
  480. package/lib/src/Services/RecurringService.js +24 -0
  481. package/lib/src/Services/RecurringService.js.map +1 -0
  482. package/lib/src/Services/ReportingService.d.ts +10 -0
  483. package/lib/src/Services/ReportingService.js +34 -0
  484. package/lib/src/Services/ReportingService.js.map +1 -0
  485. package/lib/src/Services/Secure3dService.d.ts +8 -0
  486. package/lib/src/Services/Secure3dService.js +21 -0
  487. package/lib/src/Services/Secure3dService.js.map +1 -0
  488. package/lib/src/Services/index.d.ts +11 -0
  489. package/lib/src/Services/index.js +28 -0
  490. package/lib/src/Services/index.js.map +1 -0
  491. package/lib/src/ServicesContainer.d.ts +20 -0
  492. package/lib/src/ServicesContainer.js +79 -0
  493. package/lib/src/ServicesContainer.js.map +1 -0
  494. package/lib/src/Terminals/Abstractions/IDeviceCommInterface.d.ts +6 -0
  495. package/lib/src/Terminals/Abstractions/IDeviceCommInterface.js +3 -0
  496. package/lib/src/Terminals/Abstractions/IDeviceCommInterface.js.map +1 -0
  497. package/lib/src/Terminals/Abstractions/IDeviceInterface.d.ts +13 -0
  498. package/lib/src/Terminals/Abstractions/IDeviceInterface.js +3 -0
  499. package/lib/src/Terminals/Abstractions/IDeviceInterface.js.map +1 -0
  500. package/lib/src/Terminals/Abstractions/IDeviceMessage.d.ts +4 -0
  501. package/lib/src/Terminals/Abstractions/IDeviceMessage.js +3 -0
  502. package/lib/src/Terminals/Abstractions/IDeviceMessage.js.map +1 -0
  503. package/lib/src/Terminals/Abstractions/IDeviceResponse.d.ts +52 -0
  504. package/lib/src/Terminals/Abstractions/IDeviceResponse.js +3 -0
  505. package/lib/src/Terminals/Abstractions/IDeviceResponse.js.map +1 -0
  506. package/lib/src/Terminals/Abstractions/IRequestIdProvider.d.ts +3 -0
  507. package/lib/src/Terminals/Abstractions/IRequestIdProvider.js +3 -0
  508. package/lib/src/Terminals/Abstractions/IRequestIdProvider.js.map +1 -0
  509. package/lib/src/Terminals/Abstractions/IRequestSubGroup.d.ts +3 -0
  510. package/lib/src/Terminals/Abstractions/IRequestSubGroup.js +3 -0
  511. package/lib/src/Terminals/Abstractions/IRequestSubGroup.js.map +1 -0
  512. package/lib/src/Terminals/Abstractions/ITerminalConfiguration.d.ts +16 -0
  513. package/lib/src/Terminals/Abstractions/ITerminalConfiguration.js +3 -0
  514. package/lib/src/Terminals/Abstractions/ITerminalConfiguration.js.map +1 -0
  515. package/lib/src/Terminals/Abstractions/index.d.ts +7 -0
  516. package/lib/src/Terminals/Abstractions/index.js +24 -0
  517. package/lib/src/Terminals/Abstractions/index.js.map +1 -0
  518. package/lib/src/Terminals/Builders/TerminalAuthBuilder.d.ts +65 -0
  519. package/lib/src/Terminals/Builders/TerminalAuthBuilder.js +172 -0
  520. package/lib/src/Terminals/Builders/TerminalAuthBuilder.js.map +1 -0
  521. package/lib/src/Terminals/Builders/TerminalBuilder.d.ts +12 -0
  522. package/lib/src/Terminals/Builders/TerminalBuilder.js +32 -0
  523. package/lib/src/Terminals/Builders/TerminalBuilder.js.map +1 -0
  524. package/lib/src/Terminals/Builders/TerminalManageBuilder.d.ts +30 -0
  525. package/lib/src/Terminals/Builders/TerminalManageBuilder.js +95 -0
  526. package/lib/src/Terminals/Builders/TerminalManageBuilder.js.map +1 -0
  527. package/lib/src/Terminals/Builders/index.d.ts +2 -0
  528. package/lib/src/Terminals/Builders/index.js +19 -0
  529. package/lib/src/Terminals/Builders/index.js.map +1 -0
  530. package/lib/src/Terminals/ConnectionConfig.d.ts +20 -0
  531. package/lib/src/Terminals/ConnectionConfig.js +49 -0
  532. package/lib/src/Terminals/ConnectionConfig.js.map +1 -0
  533. package/lib/src/Terminals/DeviceController.d.ts +23 -0
  534. package/lib/src/Terminals/DeviceController.js +42 -0
  535. package/lib/src/Terminals/DeviceController.js.map +1 -0
  536. package/lib/src/Terminals/DeviceInterface.d.ts +21 -0
  537. package/lib/src/Terminals/DeviceInterface.js +50 -0
  538. package/lib/src/Terminals/DeviceInterface.js.map +1 -0
  539. package/lib/src/Terminals/DeviceMessage.d.ts +15 -0
  540. package/lib/src/Terminals/DeviceMessage.js +42 -0
  541. package/lib/src/Terminals/DeviceMessage.js.map +1 -0
  542. package/lib/src/Terminals/DeviceResponse.d.ts +10 -0
  543. package/lib/src/Terminals/DeviceResponse.js +16 -0
  544. package/lib/src/Terminals/DeviceResponse.js.map +1 -0
  545. package/lib/src/Terminals/Enums/ControlCodes.d.ts +5 -0
  546. package/lib/src/Terminals/Enums/ControlCodes.js +10 -0
  547. package/lib/src/Terminals/Enums/ControlCodes.js.map +1 -0
  548. package/lib/src/Terminals/Enums/index.d.ts +1 -0
  549. package/lib/src/Terminals/Enums/index.js +18 -0
  550. package/lib/src/Terminals/Enums/index.js.map +1 -0
  551. package/lib/src/Terminals/Enums.d.ts +12 -0
  552. package/lib/src/Terminals/Enums.js +18 -0
  553. package/lib/src/Terminals/Enums.js.map +1 -0
  554. package/lib/src/Terminals/SummaryResponse.d.ts +28 -0
  555. package/lib/src/Terminals/SummaryResponse.js +33 -0
  556. package/lib/src/Terminals/SummaryResponse.js.map +1 -0
  557. package/lib/src/Terminals/TerminalResponse.d.ts +42 -0
  558. package/lib/src/Terminals/TerminalResponse.js +49 -0
  559. package/lib/src/Terminals/TerminalResponse.js.map +1 -0
  560. package/lib/src/Terminals/TerminalUtils.d.ts +4 -0
  561. package/lib/src/Terminals/TerminalUtils.js +24 -0
  562. package/lib/src/Terminals/TerminalUtils.js.map +1 -0
  563. package/lib/src/Terminals/UPA/Entities/UpaMessageId.d.ts +20 -0
  564. package/lib/src/Terminals/UPA/Entities/UpaMessageId.js +25 -0
  565. package/lib/src/Terminals/UPA/Entities/UpaMessageId.js.map +1 -0
  566. package/lib/src/Terminals/UPA/Entities/index.d.ts +1 -0
  567. package/lib/src/Terminals/UPA/Entities/index.js +18 -0
  568. package/lib/src/Terminals/UPA/Entities/index.js.map +1 -0
  569. package/lib/src/Terminals/UPA/Interfaces/UpaMicInterface.d.ts +12 -0
  570. package/lib/src/Terminals/UPA/Interfaces/UpaMicInterface.js +76 -0
  571. package/lib/src/Terminals/UPA/Interfaces/UpaMicInterface.js.map +1 -0
  572. package/lib/src/Terminals/UPA/Interfaces/index.d.ts +1 -0
  573. package/lib/src/Terminals/UPA/Interfaces/index.js +18 -0
  574. package/lib/src/Terminals/UPA/Interfaces/index.js.map +1 -0
  575. package/lib/src/Terminals/UPA/Reponses/TransactionResponse.d.ts +53 -0
  576. package/lib/src/Terminals/UPA/Reponses/TransactionResponse.js +70 -0
  577. package/lib/src/Terminals/UPA/Reponses/TransactionResponse.js.map +1 -0
  578. package/lib/src/Terminals/UPA/Reponses/index.d.ts +1 -0
  579. package/lib/src/Terminals/UPA/Reponses/index.js +18 -0
  580. package/lib/src/Terminals/UPA/Reponses/index.js.map +1 -0
  581. package/lib/src/Terminals/UPA/Request/BaseRequest.d.ts +7 -0
  582. package/lib/src/Terminals/UPA/Request/BaseRequest.js +11 -0
  583. package/lib/src/Terminals/UPA/Request/BaseRequest.js.map +1 -0
  584. package/lib/src/Terminals/UPA/Request/GroupRequest.d.ts +5 -0
  585. package/lib/src/Terminals/UPA/Request/GroupRequest.js +9 -0
  586. package/lib/src/Terminals/UPA/Request/GroupRequest.js.map +1 -0
  587. package/lib/src/Terminals/UPA/Request/RequestParams.d.ts +9 -0
  588. package/lib/src/Terminals/UPA/Request/RequestParams.js +14 -0
  589. package/lib/src/Terminals/UPA/Request/RequestParams.js.map +1 -0
  590. package/lib/src/Terminals/UPA/Request/RootRequest.d.ts +5 -0
  591. package/lib/src/Terminals/UPA/Request/RootRequest.js +9 -0
  592. package/lib/src/Terminals/UPA/Request/RootRequest.js.map +1 -0
  593. package/lib/src/Terminals/UPA/Request/TransactionRequest.d.ts +10 -0
  594. package/lib/src/Terminals/UPA/Request/TransactionRequest.js +15 -0
  595. package/lib/src/Terminals/UPA/Request/TransactionRequest.js.map +1 -0
  596. package/lib/src/Terminals/UPA/Request/index.d.ts +5 -0
  597. package/lib/src/Terminals/UPA/Request/index.js +22 -0
  598. package/lib/src/Terminals/UPA/Request/index.js.map +1 -0
  599. package/lib/src/Terminals/UPA/UpaController.d.ts +16 -0
  600. package/lib/src/Terminals/UPA/UpaController.js +213 -0
  601. package/lib/src/Terminals/UPA/UpaController.js.map +1 -0
  602. package/lib/src/Terminals/UPA/UpaInterface.d.ts +10 -0
  603. package/lib/src/Terminals/UPA/UpaInterface.js +44 -0
  604. package/lib/src/Terminals/UPA/UpaInterface.js.map +1 -0
  605. package/lib/src/Terminals/UPA/UpaMessageType.d.ts +8 -0
  606. package/lib/src/Terminals/UPA/UpaMessageType.js +13 -0
  607. package/lib/src/Terminals/UPA/UpaMessageType.js.map +1 -0
  608. package/lib/src/Terminals/UPA/index.d.ts +7 -0
  609. package/lib/src/Terminals/UPA/index.js +24 -0
  610. package/lib/src/Terminals/UPA/index.js.map +1 -0
  611. package/lib/src/Terminals/index.d.ts +8 -0
  612. package/lib/src/Terminals/index.js +25 -0
  613. package/lib/src/Terminals/index.js.map +1 -0
  614. package/lib/src/Utils/CardUtils.d.ts +13 -0
  615. package/lib/src/Utils/CardUtils.js +221 -0
  616. package/lib/src/Utils/CardUtils.js.map +1 -0
  617. package/lib/src/Utils/CountryUtils.d.ts +9 -0
  618. package/lib/src/Utils/CountryUtils.js +131 -0
  619. package/lib/src/Utils/CountryUtils.js.map +1 -0
  620. package/lib/src/Utils/GenerationUtils.d.ts +6 -0
  621. package/lib/src/Utils/GenerationUtils.js +79 -0
  622. package/lib/src/Utils/GenerationUtils.js.map +1 -0
  623. package/lib/src/Utils/IRawRequestBuilder.d.ts +3 -0
  624. package/lib/src/Utils/IRawRequestBuilder.js +3 -0
  625. package/lib/src/Utils/IRawRequestBuilder.js.map +1 -0
  626. package/lib/src/Utils/InputValidation.d.ts +12 -0
  627. package/lib/src/Utils/InputValidation.js +71 -0
  628. package/lib/src/Utils/InputValidation.js.map +1 -0
  629. package/lib/src/Utils/Logging/Logger.d.ts +32 -0
  630. package/lib/src/Utils/Logging/Logger.js +209 -0
  631. package/lib/src/Utils/Logging/Logger.js.map +1 -0
  632. package/lib/src/Utils/Logging/ProtectSensitiveData.d.ts +11 -0
  633. package/lib/src/Utils/Logging/ProtectSensitiveData.js +23 -0
  634. package/lib/src/Utils/Logging/ProtectSensitiveData.js.map +1 -0
  635. package/lib/src/Utils/Logging/SampleRequestLogger.d.ts +12 -0
  636. package/lib/src/Utils/Logging/SampleRequestLogger.js +38 -0
  637. package/lib/src/Utils/Logging/SampleRequestLogger.js.map +1 -0
  638. package/lib/src/Utils/Logging/index.d.ts +3 -0
  639. package/lib/src/Utils/Logging/index.js +20 -0
  640. package/lib/src/Utils/Logging/index.js.map +1 -0
  641. package/lib/src/Utils/Sha1.d.ts +6 -0
  642. package/lib/src/Utils/Sha1.js +231 -0
  643. package/lib/src/Utils/Sha1.js.map +1 -0
  644. package/lib/src/Utils/StringUtils.d.ts +17 -0
  645. package/lib/src/Utils/StringUtils.js +95 -0
  646. package/lib/src/Utils/StringUtils.js.map +1 -0
  647. package/lib/src/Utils/index.d.ts +6 -0
  648. package/lib/src/Utils/index.js +23 -0
  649. package/lib/src/Utils/index.js.map +1 -0
  650. package/lib/src/index.d.ts +13 -0
  651. package/lib/src/index.js +34 -0
  652. package/lib/src/index.js.map +1 -0
  653. package/lib/test/Data/BaseGpApiTestConfig.d.ts +14 -0
  654. package/lib/test/Data/BaseGpApiTestConfig.js +50 -0
  655. package/lib/test/Data/BaseGpApiTestConfig.js.map +1 -0
  656. package/lib/test/Data/GpApi3DSTestCards.d.ts +17 -0
  657. package/lib/test/Data/GpApi3DSTestCards.js +22 -0
  658. package/lib/test/Data/GpApi3DSTestCards.js.map +1 -0
  659. package/lib/test/Data/TestCards.d.ts +24 -0
  660. package/lib/test/Data/TestCards.js +220 -0
  661. package/lib/test/Data/TestCards.js.map +1 -0
  662. package/lib/test/Data/TestChecks.d.ts +4 -0
  663. package/lib/test/Data/TestChecks.js +27 -0
  664. package/lib/test/Data/TestChecks.js.map +1 -0
  665. package/lib/test/Data/index.d.ts +4 -0
  666. package/lib/test/Data/index.js +21 -0
  667. package/lib/test/Data/index.js.map +1 -0
  668. package/lib/test/Integration/Gateways/AcsResponse.d.ts +12 -0
  669. package/lib/test/Integration/Gateways/AcsResponse.js +33 -0
  670. package/lib/test/Integration/Gateways/AcsResponse.js.map +1 -0
  671. package/lib/test/Integration/Gateways/GpApiConnector/3DS2Test.d.ts +1 -0
  672. package/lib/test/Integration/Gateways/GpApiConnector/3DS2Test.js +1029 -0
  673. package/lib/test/Integration/Gateways/GpApiConnector/3DS2Test.js.map +1 -0
  674. package/lib/test/Integration/Gateways/GpApiConnector/3DSecureTest.d.ts +1 -0
  675. package/lib/test/Integration/Gateways/GpApiConnector/3DSecureTest.js +649 -0
  676. package/lib/test/Integration/Gateways/GpApiConnector/3DSecureTest.js.map +1 -0
  677. package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.d.ts +1 -0
  678. package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.js +109 -0
  679. package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenTest.js.map +1 -0
  680. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.d.ts +1 -0
  681. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.js +1023 -0
  682. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardNotPresentTest.js.map +1 -0
  683. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardPresentTest.d.ts +1 -0
  684. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardPresentTest.js +439 -0
  685. package/lib/test/Integration/Gateways/GpApiConnector/CreditCardPresentTest.js.map +1 -0
  686. package/lib/test/Integration/Gateways/GpApiConnector/DebitCardTest.d.ts +1 -0
  687. package/lib/test/Integration/Gateways/GpApiConnector/DebitCardTest.js +143 -0
  688. package/lib/test/Integration/Gateways/GpApiConnector/DebitCardTest.js.map +1 -0
  689. package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactionsTest.d.ts +1 -0
  690. package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactionsTest.js +434 -0
  691. package/lib/test/Integration/Gateways/GpApiConnector/ReportingSettlementTransactionsTest.js.map +1 -0
  692. package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethodsTest.d.ts +1 -0
  693. package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethodsTest.js +217 -0
  694. package/lib/test/Integration/Gateways/GpApiConnector/ReportingStoredPaymentMethodsTest.js.map +1 -0
  695. package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.d.ts +1 -0
  696. package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.js +337 -0
  697. package/lib/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.js.map +1 -0
  698. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.d.ts +1 -0
  699. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.js +2446 -0
  700. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AuthTest.js.map +1 -0
  701. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.d.ts +1 -0
  702. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.js +506 -0
  703. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/AvsTest.js.map +1 -0
  704. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.d.ts +1 -0
  705. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.js +1296 -0
  706. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/CreditTest.js.map +1 -0
  707. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.d.ts +1 -0
  708. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.js +847 -0
  709. package/lib/test/Integration/Gateways/GpEcomConnector/Certification/HoldTest.js.map +1 -0
  710. package/lib/test/Integration/Gateways/GpEcomConnector/CreditTest.d.ts +1 -0
  711. package/lib/test/Integration/Gateways/GpEcomConnector/CreditTest.js +215 -0
  712. package/lib/test/Integration/Gateways/GpEcomConnector/CreditTest.js.map +1 -0
  713. package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.d.ts +1 -0
  714. package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.js +99 -0
  715. package/lib/test/Integration/Gateways/GpEcomConnector/HppTest.js.map +1 -0
  716. package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.d.ts +1 -0
  717. package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.js +133 -0
  718. package/lib/test/Integration/Gateways/GpEcomConnector/RecurringTest.js.map +1 -0
  719. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.d.ts +1 -0
  720. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js +59 -0
  721. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js.map +1 -0
  722. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.d.ts +1 -0
  723. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js +378 -0
  724. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js.map +1 -0
  725. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.d.ts +1 -0
  726. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js +86 -0
  727. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js.map +1 -0
  728. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.d.ts +1 -0
  729. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js +1723 -0
  730. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js.map +1 -0
  731. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.d.ts +1 -0
  732. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js +86 -0
  733. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js.map +1 -0
  734. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.d.ts +1 -0
  735. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js +1760 -0
  736. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js.map +1 -0
  737. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.d.ts +1 -0
  738. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js +420 -0
  739. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js.map +1 -0
  740. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.d.ts +1 -0
  741. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js +2221 -0
  742. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js.map +1 -0
  743. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.d.ts +1 -0
  744. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js +392 -0
  745. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js.map +1 -0
  746. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.d.ts +1 -0
  747. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js +88 -0
  748. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js.map +1 -0
  749. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.d.ts +1 -0
  750. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js +72 -0
  751. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js.map +1 -0
  752. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.d.ts +1 -0
  753. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js +111 -0
  754. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js.map +1 -0
  755. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.d.ts +1 -0
  756. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js +147 -0
  757. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js.map +1 -0
  758. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.d.ts +1 -0
  759. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js +101 -0
  760. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js.map +1 -0
  761. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.d.ts +1 -0
  762. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js +50 -0
  763. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js.map +1 -0
  764. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.d.ts +1 -0
  765. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.js +44 -0
  766. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTest.js.map +1 -0
  767. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.d.ts +1 -0
  768. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.js +221 -0
  769. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTest.js.map +1 -0
  770. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.d.ts +1 -0
  771. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.js +60 -0
  772. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTest.js.map +1 -0
  773. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.d.ts +1 -0
  774. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.js +80 -0
  775. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTest.js.map +1 -0
  776. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.d.ts +39 -0
  777. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.js +393 -0
  778. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.js.map +1 -0
  779. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.d.ts +1 -0
  780. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.js +44 -0
  781. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTest.js.map +1 -0
  782. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.d.ts +1 -0
  783. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.js +330 -0
  784. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTest.js.map +1 -0
  785. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.d.ts +1 -0
  786. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.js +60 -0
  787. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTest.js.map +1 -0
  788. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.d.ts +1 -0
  789. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.js +80 -0
  790. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTest.js.map +1 -0
  791. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.d.ts +34 -0
  792. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.js +322 -0
  793. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.js.map +1 -0
  794. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.d.ts +4 -0
  795. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.js +28 -0
  796. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.js.map +1 -0
  797. package/lib/test/Integration/Gateways/Terminals/RequestIdProvider.d.ts +4 -0
  798. package/lib/test/Integration/Gateways/Terminals/RequestIdProvider.js +10 -0
  799. package/lib/test/Integration/Gateways/Terminals/RequestIdProvider.js.map +1 -0
  800. package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.d.ts +1 -0
  801. package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.js +149 -0
  802. package/lib/test/Integration/Gateways/Terminals/UPA/UpaMicTest.js.map +1 -0
  803. package/lib/test/Integration/Gateways/ThreeDSecureAsClient.d.ts +16 -0
  804. package/lib/test/Integration/Gateways/ThreeDSecureAsClient.js +212 -0
  805. package/lib/test/Integration/Gateways/ThreeDSecureAsClient.js.map +1 -0
  806. package/lib/test/Integration/Services/CheckServiceTest.d.ts +1 -0
  807. package/lib/test/Integration/Services/CheckServiceTest.js +45 -0
  808. package/lib/test/Integration/Services/CheckServiceTest.js.map +1 -0
  809. package/lib/test/Integration/Services/CreditServiceTest.d.ts +1 -0
  810. package/lib/test/Integration/Services/CreditServiceTest.js +174 -0
  811. package/lib/test/Integration/Services/CreditServiceTest.js.map +1 -0
  812. package/lib/test/Integration/Services/DebitServiceTest.d.ts +1 -0
  813. package/lib/test/Integration/Services/DebitServiceTest.js +81 -0
  814. package/lib/test/Integration/Services/DebitServiceTest.js.map +1 -0
  815. package/lib/test/Integration/Services/EBTServiceTest.d.ts +1 -0
  816. package/lib/test/Integration/Services/EBTServiceTest.js +64 -0
  817. package/lib/test/Integration/Services/EBTServiceTest.js.map +1 -0
  818. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.d.ts +1 -0
  819. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js +111 -0
  820. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js.map +1 -0
  821. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.d.ts +1 -0
  822. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js +62 -0
  823. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js.map +1 -0
  824. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.d.ts +1 -0
  825. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js +34 -0
  826. package/lib/test/Unit/Gateways/GpEcomConnector/CreditTest.js.map +1 -0
  827. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.d.ts +1 -0
  828. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js +125 -0
  829. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js.map +1 -0
  830. package/package.json +10 -2
  831. package/.eslintignore +0 -9
  832. package/.eslintrc.cjs +0 -39
  833. package/.prettierrc +0 -14
  834. package/.travis.yml +0 -25
  835. package/tsconfig.eslint.json +0 -15
@@ -0,0 +1,1760 @@
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 ecom = new src_1.EcommerceInfo();
10
+ ecom.channel = src_1.EcommerceChannel.Moto;
11
+ const config = new src_1.PorticoConfig();
12
+ config.secretApiKey = "skapi_cert_MTyMAQBiHVEAewvIzXVFcmUd2UcyBge_eCpaASUp0A";
13
+ const BATCH_NOT_OPEN = "Transaction was rejected because it requires a batch to be open.";
14
+ const BATCH_EMPTY = "Batch close was rejected because no transactions are associated with the currently open batch";
15
+ const useTokens = false;
16
+ const usePrepaid = false;
17
+ const test = useTokens ? ava_1.default.serial : ava_1.default;
18
+ let visaToken = "";
19
+ let mastercardToken = "";
20
+ let discoverToken = "";
21
+ let amexToken = "";
22
+ ava_1.default.before(() => {
23
+ src_1.ServicesContainer.configureService(config);
24
+ });
25
+ test.before("000 - close batch", (t) => {
26
+ t.plan(1);
27
+ return new Promise((resolve, reject) => {
28
+ src_1.BatchService.closeBatch()
29
+ .then((response) => {
30
+ t.truthy(response);
31
+ resolve();
32
+ })
33
+ .catch((e) => {
34
+ if (e.message.indexOf(BATCH_NOT_OPEN) !== -1 ||
35
+ e.message.indexOf(BATCH_EMPTY) !== -1) {
36
+ t.pass();
37
+ resolve();
38
+ return;
39
+ }
40
+ reject(e);
41
+ });
42
+ });
43
+ });
44
+ /// CARD VERIFY
45
+ /// Account verification
46
+ test("001 - verify visa", (t) => {
47
+ t.plan(2);
48
+ const card = Data_1.TestCards.visaManual();
49
+ return new Promise((resolve, reject) => {
50
+ card
51
+ .verify()
52
+ .withRequestMultiUseToken(useTokens)
53
+ .withAllowDuplicates(true)
54
+ .execute()
55
+ .then((response) => {
56
+ t.truthy(response);
57
+ t.is(response.responseCode, "00");
58
+ resolve();
59
+ })
60
+ .catch(reject);
61
+ });
62
+ });
63
+ test("002 - verify mastercard", (t) => {
64
+ t.plan(2);
65
+ const card = Data_1.TestCards.masterCardManual();
66
+ return new Promise((resolve, reject) => {
67
+ card
68
+ .verify()
69
+ .withRequestMultiUseToken(useTokens)
70
+ .withAllowDuplicates(true)
71
+ .execute()
72
+ .then((response) => {
73
+ t.truthy(response);
74
+ t.is(response.responseCode, "00");
75
+ resolve();
76
+ })
77
+ .catch(reject);
78
+ });
79
+ });
80
+ test("003 - verify discover", (t) => {
81
+ t.plan(2);
82
+ const card = Data_1.TestCards.discoverManual();
83
+ const address = new src_1.Address();
84
+ address.postalCode = "75024";
85
+ return new Promise((resolve, reject) => {
86
+ card
87
+ .verify()
88
+ .withAddress(address)
89
+ .withRequestMultiUseToken(useTokens)
90
+ .withAllowDuplicates(true)
91
+ .execute()
92
+ .then((response) => {
93
+ t.truthy(response);
94
+ t.is(response.responseCode, "00");
95
+ resolve();
96
+ })
97
+ .catch(reject);
98
+ });
99
+ });
100
+ /// Address verification
101
+ test("004 - verify amex", (t) => {
102
+ t.plan(2);
103
+ const card = Data_1.TestCards.amexManual();
104
+ const address = new src_1.Address();
105
+ address.postalCode = "75024";
106
+ return new Promise((resolve, reject) => {
107
+ card
108
+ .verify()
109
+ .withAddress(address)
110
+ .withRequestMultiUseToken(useTokens)
111
+ .withAllowDuplicates(true)
112
+ .execute()
113
+ .then((response) => {
114
+ t.truthy(response);
115
+ t.is(response.responseCode, "00");
116
+ resolve();
117
+ })
118
+ .catch(reject);
119
+ });
120
+ });
121
+ /// Balance Inquiry (for prepaid cards)
122
+ test("005 - balance inquiry visa", (t) => {
123
+ t.plan(2);
124
+ const card = Data_1.TestCards.visaSwipe();
125
+ return new Promise((resolve, reject) => {
126
+ card
127
+ .balanceInquiry()
128
+ .execute()
129
+ .then((response) => {
130
+ t.truthy(response);
131
+ t.is(response.responseCode, "00");
132
+ resolve();
133
+ })
134
+ .catch(reject);
135
+ });
136
+ });
137
+ /// CREDIT SALE (for multi-use tokens only)
138
+ test("006 - charge visa token", (t) => {
139
+ t.plan(3);
140
+ const card = Data_1.TestCards.visaManual();
141
+ const address = new src_1.Address();
142
+ address.streetAddress1 = "6860 Dallas Pkwy";
143
+ address.postalCode = "75024";
144
+ return new Promise((resolve, reject) => {
145
+ card
146
+ .charge()
147
+ .withCurrency("USD")
148
+ .withAmount("13.01")
149
+ .withAddress(address)
150
+ .withRequestMultiUseToken(true)
151
+ .withAllowDuplicates(true)
152
+ .withEcommerceInfo(ecom)
153
+ .execute()
154
+ .then((response) => {
155
+ t.truthy(response);
156
+ t.is(response.responseCode, "00");
157
+ t.truthy(response.token);
158
+ visaToken = response.token;
159
+ resolve();
160
+ })
161
+ .catch(reject);
162
+ });
163
+ });
164
+ test("007 - charge mastercard token", (t) => {
165
+ t.plan(3);
166
+ const card = Data_1.TestCards.masterCardManual();
167
+ const address = new src_1.Address();
168
+ address.streetAddress1 = "6860";
169
+ address.postalCode = "75024";
170
+ return new Promise((resolve, reject) => {
171
+ card
172
+ .charge()
173
+ .withCurrency("USD")
174
+ .withAmount("13.02")
175
+ .withAddress(address)
176
+ .withRequestMultiUseToken(true)
177
+ .withAllowDuplicates(true)
178
+ .withEcommerceInfo(ecom)
179
+ .execute()
180
+ .then((response) => {
181
+ t.truthy(response);
182
+ t.is(response.responseCode, "00");
183
+ t.truthy(response.token);
184
+ mastercardToken = response.token;
185
+ resolve();
186
+ })
187
+ .catch(reject);
188
+ });
189
+ });
190
+ test("008 - charge discover token", (t) => {
191
+ t.plan(3);
192
+ const card = Data_1.TestCards.discoverManual();
193
+ const address = new src_1.Address();
194
+ address.streetAddress1 = "6860 Dallas Pkwy";
195
+ address.postalCode = "75024";
196
+ return new Promise((resolve, reject) => {
197
+ card
198
+ .charge()
199
+ .withCurrency("USD")
200
+ .withAmount("13.03")
201
+ .withAddress(address)
202
+ .withRequestMultiUseToken(true)
203
+ .withAllowDuplicates(true)
204
+ .withEcommerceInfo(ecom)
205
+ .execute()
206
+ .then((response) => {
207
+ t.truthy(response);
208
+ t.is(response.responseCode, "00");
209
+ t.truthy(response.token);
210
+ discoverToken = response.token;
211
+ resolve();
212
+ })
213
+ .catch(reject);
214
+ });
215
+ });
216
+ test("009 - charge amex token", (t) => {
217
+ t.plan(3);
218
+ const card = Data_1.TestCards.amexManual();
219
+ const address = new src_1.Address();
220
+ address.streetAddress1 = "6860 Dallas Pkwy";
221
+ address.postalCode = "75024";
222
+ return new Promise((resolve, reject) => {
223
+ card
224
+ .charge()
225
+ .withCurrency("USD")
226
+ .withAmount("13.04")
227
+ .withAddress(address)
228
+ .withRequestMultiUseToken(true)
229
+ .withAllowDuplicates(true)
230
+ .withEcommerceInfo(ecom)
231
+ .execute()
232
+ .then((response) => {
233
+ t.truthy(response);
234
+ t.is(response.responseCode, "00");
235
+ t.truthy(response.token);
236
+ amexToken = response.token;
237
+ resolve();
238
+ })
239
+ .catch(reject);
240
+ });
241
+ });
242
+ /// CREDIT SALE
243
+ test("010 - charge visa", (t) => {
244
+ t.plan(4);
245
+ let card = Data_1.TestCards.visaManual();
246
+ const address = new src_1.Address();
247
+ address.streetAddress1 = "6860 Dallas Pkwy";
248
+ address.postalCode = "75024";
249
+ if (useTokens) {
250
+ card = new src_1.CreditCardData();
251
+ card.token = visaToken;
252
+ }
253
+ return new Promise((resolve, reject) => {
254
+ card
255
+ .charge()
256
+ .withCurrency("USD")
257
+ .withAmount("17.01")
258
+ .withAddress(address)
259
+ .withInvoiceNumber("123456")
260
+ .withAllowDuplicates(true)
261
+ .withEcommerceInfo(ecom)
262
+ .execute()
263
+ .then((response) => {
264
+ t.truthy(response);
265
+ t.is(response.responseCode, "00");
266
+ return response;
267
+ })
268
+ .then((response) => {
269
+ response
270
+ .void()
271
+ .execute()
272
+ .then((voidResponse) => {
273
+ t.truthy(voidResponse);
274
+ t.is(voidResponse.responseCode, "00");
275
+ resolve();
276
+ })
277
+ .catch(reject);
278
+ })
279
+ .catch(reject);
280
+ });
281
+ });
282
+ test("011 - charge mastercard", (t) => {
283
+ t.plan(2);
284
+ let card = Data_1.TestCards.masterCardManual();
285
+ const address = new src_1.Address();
286
+ address.streetAddress1 = "6860";
287
+ address.postalCode = "75024";
288
+ if (useTokens) {
289
+ card = new src_1.CreditCardData();
290
+ card.token = mastercardToken;
291
+ }
292
+ return new Promise((resolve, reject) => {
293
+ card
294
+ .charge()
295
+ .withCurrency("USD")
296
+ .withAmount("17.02")
297
+ .withAddress(address)
298
+ .withInvoiceNumber("123456")
299
+ .withAllowDuplicates(true)
300
+ .withEcommerceInfo(ecom)
301
+ .execute()
302
+ .then((response) => {
303
+ t.truthy(response);
304
+ t.is(response.responseCode, "00");
305
+ resolve();
306
+ })
307
+ .catch(reject);
308
+ });
309
+ });
310
+ test("012 - charge discover", (t) => {
311
+ t.plan(2);
312
+ let card = Data_1.TestCards.discoverManual();
313
+ const address = new src_1.Address();
314
+ address.streetAddress1 = "6860";
315
+ address.postalCode = "750241234";
316
+ if (useTokens) {
317
+ card = new src_1.CreditCardData();
318
+ card.token = discoverToken;
319
+ }
320
+ return new Promise((resolve, reject) => {
321
+ card
322
+ .charge()
323
+ .withCurrency("USD")
324
+ .withAmount("17.03")
325
+ .withAddress(address)
326
+ .withInvoiceNumber("123456")
327
+ .withAllowDuplicates(true)
328
+ .withEcommerceInfo(ecom)
329
+ .execute()
330
+ .then((response) => {
331
+ t.truthy(response);
332
+ t.is(response.responseCode, "00");
333
+ resolve();
334
+ })
335
+ .catch(reject);
336
+ });
337
+ });
338
+ test("013 - charge amex", (t) => {
339
+ t.plan(2);
340
+ let card = Data_1.TestCards.amexManual();
341
+ const address = new src_1.Address();
342
+ address.streetAddress1 = "6860 Dallas Pkwy";
343
+ address.postalCode = "75024";
344
+ if (useTokens) {
345
+ card = new src_1.CreditCardData();
346
+ card.token = amexToken;
347
+ }
348
+ return new Promise((resolve, reject) => {
349
+ card
350
+ .charge()
351
+ .withCurrency("USD")
352
+ .withAmount("17.04")
353
+ .withAddress(address)
354
+ .withInvoiceNumber("123456")
355
+ .withAllowDuplicates(true)
356
+ .withEcommerceInfo(ecom)
357
+ .execute()
358
+ .then((response) => {
359
+ t.truthy(response);
360
+ t.is(response.responseCode, "00");
361
+ resolve();
362
+ })
363
+ .catch(reject);
364
+ });
365
+ });
366
+ test("014 - charge jcb", (t) => {
367
+ t.plan(2);
368
+ const card = Data_1.TestCards.jcbManual();
369
+ const address = new src_1.Address();
370
+ address.streetAddress1 = "6860 Dallas Pkwy";
371
+ address.postalCode = "75024";
372
+ return new Promise((resolve, reject) => {
373
+ card
374
+ .charge()
375
+ .withCurrency("USD")
376
+ .withAmount("17.04")
377
+ .withAddress(address)
378
+ .withInvoiceNumber("123456")
379
+ .withAllowDuplicates(true)
380
+ .withEcommerceInfo(ecom)
381
+ .execute()
382
+ .then((response) => {
383
+ t.truthy(response);
384
+ t.is(response.responseCode, "00");
385
+ resolve();
386
+ })
387
+ .catch(reject);
388
+ });
389
+ });
390
+ /// AUTHORIZATION
391
+ test("015 - authorization visa", (t) => {
392
+ t.plan(4);
393
+ // test 015a Authorization
394
+ const card = Data_1.TestCards.visaManual();
395
+ const address = new src_1.Address();
396
+ address.streetAddress1 = "6860 Dallas Pkwy";
397
+ address.postalCode = "75024";
398
+ return new Promise((resolve, reject) => {
399
+ card
400
+ .authorize("17.06")
401
+ .withCurrency("USD")
402
+ .withAddress(address)
403
+ .withInvoiceNumber("123456")
404
+ .withAllowDuplicates(true)
405
+ .withEcommerceInfo(ecom)
406
+ .execute()
407
+ .then((response) => {
408
+ t.truthy(response);
409
+ t.is(response.responseCode, "00");
410
+ return response;
411
+ })
412
+ .then((response) => {
413
+ // test 015b Capture/AddToBatch
414
+ response
415
+ .capture()
416
+ .execute()
417
+ .then((capture) => {
418
+ t.truthy(capture);
419
+ t.is(capture.responseCode, "00");
420
+ resolve();
421
+ })
422
+ .catch(reject);
423
+ })
424
+ .catch(reject);
425
+ });
426
+ });
427
+ test("016 - authorization mastercard", (t) => {
428
+ t.plan(4);
429
+ // test 016a Authorization
430
+ const card = Data_1.TestCards.masterCardManual();
431
+ const address = new src_1.Address();
432
+ address.streetAddress1 = "6860 Dallas Pkwy";
433
+ address.postalCode = "750241234";
434
+ return new Promise((resolve, reject) => {
435
+ card
436
+ .authorize("17.07")
437
+ .withCurrency("USD")
438
+ .withAddress(address)
439
+ .withInvoiceNumber("123456")
440
+ .withAllowDuplicates(true)
441
+ .withEcommerceInfo(ecom)
442
+ .execute()
443
+ .then((response) => {
444
+ t.truthy(response);
445
+ t.is(response.responseCode, "00");
446
+ return response;
447
+ })
448
+ .then((response) => {
449
+ // test 016b Capture/AddToBatch
450
+ response
451
+ .capture()
452
+ .execute()
453
+ .then((capture) => {
454
+ t.truthy(capture);
455
+ t.is(capture.responseCode, "00");
456
+ resolve();
457
+ })
458
+ .catch(reject);
459
+ })
460
+ .catch(reject);
461
+ });
462
+ });
463
+ test("017 - authorization discover", (t) => {
464
+ t.plan(2);
465
+ // test 017a Authorization
466
+ const card = Data_1.TestCards.discoverManual();
467
+ const address = new src_1.Address();
468
+ address.streetAddress1 = "6860";
469
+ address.postalCode = "75024";
470
+ return new Promise((resolve, reject) => {
471
+ card
472
+ .authorize("17.08")
473
+ .withCurrency("USD")
474
+ .withAddress(address)
475
+ .withInvoiceNumber("123456")
476
+ .withAllowDuplicates(true)
477
+ .withEcommerceInfo(ecom)
478
+ .execute()
479
+ .then((response) => {
480
+ t.truthy(response);
481
+ t.is(response.responseCode, "00");
482
+ return response;
483
+ })
484
+ .then(() => {
485
+ // test 017b Capture/AddToBatch
486
+ // do not capture
487
+ resolve();
488
+ })
489
+ .catch(reject);
490
+ });
491
+ });
492
+ /// PARTIALLY APPROVED SALE
493
+ test("018 - partial approval visa", (t) => {
494
+ t.plan(4);
495
+ const address = new src_1.Address();
496
+ address.streetAddress1 = "6860";
497
+ address.postalCode = "75024";
498
+ const card = Data_1.TestCards.visaManual();
499
+ return new Promise((resolve, reject) => {
500
+ card
501
+ .charge(130)
502
+ .withCurrency("USD")
503
+ .withAddress(address)
504
+ .withInvoiceNumber("123456")
505
+ .withAllowPartialAuth(true)
506
+ .withAllowDuplicates(true)
507
+ .withEcommerceInfo(ecom)
508
+ .execute()
509
+ .then((response) => {
510
+ t.truthy(response);
511
+ t.is(response.responseCode, "10");
512
+ t.truthy(response.authorizedAmount);
513
+ t.is(response.authorizedAmount, "110.00");
514
+ resolve();
515
+ })
516
+ .catch(reject);
517
+ });
518
+ });
519
+ test("019 - partial approval discover", (t) => {
520
+ t.plan(4);
521
+ const address = new src_1.Address();
522
+ address.streetAddress1 = "6860";
523
+ address.postalCode = "75024";
524
+ const card = Data_1.TestCards.discoverManual();
525
+ return new Promise((resolve, reject) => {
526
+ card
527
+ .charge(145)
528
+ .withCurrency("USD")
529
+ .withAddress(address)
530
+ .withInvoiceNumber("123456")
531
+ .withAllowPartialAuth(true)
532
+ .withAllowDuplicates(true)
533
+ .withEcommerceInfo(ecom)
534
+ .execute()
535
+ .then((response) => {
536
+ t.truthy(response);
537
+ t.is(response.responseCode, "10");
538
+ t.truthy(response.authorizedAmount);
539
+ t.is(response.authorizedAmount, "65.00");
540
+ resolve();
541
+ })
542
+ .catch(reject);
543
+ });
544
+ });
545
+ test("020 - partial approval mastercard", (t) => {
546
+ t.plan(4);
547
+ const address = new src_1.Address();
548
+ address.streetAddress1 = "6860";
549
+ address.postalCode = "75024";
550
+ const card = Data_1.TestCards.masterCardManual();
551
+ return new Promise((resolve, reject) => {
552
+ card
553
+ .charge(155)
554
+ .withCurrency("USD")
555
+ .withAddress(address)
556
+ .withInvoiceNumber("123456")
557
+ .withAllowPartialAuth(true)
558
+ .withAllowDuplicates(true)
559
+ .withEcommerceInfo(ecom)
560
+ .execute()
561
+ .then((response) => {
562
+ t.truthy(response);
563
+ t.is(response.responseCode, "10");
564
+ t.truthy(response.authorizedAmount);
565
+ t.is(response.authorizedAmount, "100.00");
566
+ resolve();
567
+ })
568
+ .catch(reject);
569
+ });
570
+ });
571
+ /// LEVEL II CORPORATE PURCHASE CARD
572
+ test("021 - level ii response b", (t) => {
573
+ t.plan(5);
574
+ const address = new src_1.Address();
575
+ address.streetAddress1 = "6860 Dallas Pkwy";
576
+ address.postalCode = "750241234";
577
+ const card = Data_1.TestCards.visaManual();
578
+ return new Promise((resolve, reject) => {
579
+ card
580
+ .charge(112.34)
581
+ .withCurrency("USD")
582
+ .withAddress(address)
583
+ .withCommercialRequest(true)
584
+ .withAllowDuplicates(true)
585
+ .withEcommerceInfo(ecom)
586
+ .execute()
587
+ .then((response) => {
588
+ t.truthy(response);
589
+ t.is(response.responseCode, "00");
590
+ t.is(response.commercialIndicator, "B");
591
+ return response;
592
+ })
593
+ .then((response) => {
594
+ response
595
+ .edit()
596
+ .withPoNumber("9876543210")
597
+ .withTaxType(src_1.TaxType.NotUsed)
598
+ .execute()
599
+ .then((cpcResponse) => {
600
+ t.truthy(cpcResponse);
601
+ t.is(cpcResponse.responseCode, "00");
602
+ resolve();
603
+ })
604
+ .catch(reject);
605
+ })
606
+ .catch(reject);
607
+ });
608
+ });
609
+ test("022 - level ii response b", (t) => {
610
+ t.plan(5);
611
+ const address = new src_1.Address();
612
+ address.streetAddress1 = "6860";
613
+ address.postalCode = "750241234";
614
+ const card = Data_1.TestCards.visaManual();
615
+ return new Promise((resolve, reject) => {
616
+ card
617
+ .charge(112.34)
618
+ .withCurrency("USD")
619
+ .withAddress(address)
620
+ .withCommercialRequest(true)
621
+ .withAllowDuplicates(true)
622
+ .withEcommerceInfo(ecom)
623
+ .execute()
624
+ .then((response) => {
625
+ t.truthy(response);
626
+ t.is(response.responseCode, "00");
627
+ t.is(response.commercialIndicator, "B");
628
+ return response;
629
+ })
630
+ .then((response) => {
631
+ response
632
+ .edit()
633
+ .withTaxType(src_1.TaxType.SalesTax)
634
+ .withTaxAmount(1.0)
635
+ .execute()
636
+ .then((cpcResponse) => {
637
+ t.truthy(cpcResponse);
638
+ t.is(cpcResponse.responseCode, "00");
639
+ resolve();
640
+ })
641
+ .catch(reject);
642
+ })
643
+ .catch(reject);
644
+ });
645
+ });
646
+ test("023 - level ii response r", (t) => {
647
+ t.plan(5);
648
+ const address = new src_1.Address();
649
+ address.streetAddress1 = "6860";
650
+ address.postalCode = "75024";
651
+ const card = Data_1.TestCards.visaManual();
652
+ return new Promise((resolve, reject) => {
653
+ card
654
+ .charge(123.45)
655
+ .withCurrency("USD")
656
+ .withAddress(address)
657
+ .withCommercialRequest(true)
658
+ .withAllowDuplicates(true)
659
+ .withEcommerceInfo(ecom)
660
+ .execute()
661
+ .then((response) => {
662
+ t.truthy(response);
663
+ t.is(response.responseCode, "00");
664
+ t.is(response.commercialIndicator, "R");
665
+ return response;
666
+ })
667
+ .then((response) => {
668
+ response
669
+ .edit()
670
+ .withTaxType(src_1.TaxType.TaxExempt)
671
+ .execute()
672
+ .then((cpcResponse) => {
673
+ t.truthy(cpcResponse);
674
+ t.is(cpcResponse.responseCode, "00");
675
+ resolve();
676
+ })
677
+ .catch(reject);
678
+ })
679
+ .catch(reject);
680
+ });
681
+ });
682
+ test("024 - level ii response s", (t) => {
683
+ t.plan(5);
684
+ const address = new src_1.Address();
685
+ address.streetAddress1 = "6860";
686
+ address.postalCode = "75024";
687
+ const card = Data_1.TestCards.visaManual();
688
+ return new Promise((resolve, reject) => {
689
+ card
690
+ .charge(134.56)
691
+ .withCurrency("USD")
692
+ .withAddress(address)
693
+ .withCommercialRequest(true)
694
+ .withAllowDuplicates(true)
695
+ .withEcommerceInfo(ecom)
696
+ .execute()
697
+ .then((response) => {
698
+ t.truthy(response);
699
+ t.is(response.responseCode, "00");
700
+ t.is(response.commercialIndicator, "S");
701
+ return response;
702
+ })
703
+ .then((response) => {
704
+ response
705
+ .edit()
706
+ .withPoNumber("9876543210")
707
+ .withTaxType(src_1.TaxType.SalesTax)
708
+ .withTaxAmount(1.0)
709
+ .execute()
710
+ .then((cpcResponse) => {
711
+ t.truthy(cpcResponse);
712
+ t.is(cpcResponse.responseCode, "00");
713
+ resolve();
714
+ })
715
+ .catch(reject);
716
+ })
717
+ .catch(reject);
718
+ });
719
+ });
720
+ test("025 - level ii response s", (t) => {
721
+ t.plan(5);
722
+ const address = new src_1.Address();
723
+ address.streetAddress1 = "6860";
724
+ address.postalCode = "75024";
725
+ const card = Data_1.TestCards.masterCardManual();
726
+ return new Promise((resolve, reject) => {
727
+ card
728
+ .charge(111.06)
729
+ .withCurrency("USD")
730
+ .withAddress(address)
731
+ .withCommercialRequest(true)
732
+ .withAllowDuplicates(true)
733
+ .withEcommerceInfo(ecom)
734
+ .execute()
735
+ .then((response) => {
736
+ t.truthy(response);
737
+ t.is(response.responseCode, "00");
738
+ t.is(response.commercialIndicator, "S");
739
+ return response;
740
+ })
741
+ .then((response) => {
742
+ response
743
+ .edit()
744
+ .withPoNumber("9876543210")
745
+ .withTaxType(src_1.TaxType.NotUsed)
746
+ .execute()
747
+ .then((cpcResponse) => {
748
+ t.truthy(cpcResponse);
749
+ t.is(cpcResponse.responseCode, "00");
750
+ resolve();
751
+ })
752
+ .catch(reject);
753
+ })
754
+ .catch(reject);
755
+ });
756
+ });
757
+ test("026 - level ii response s", (t) => {
758
+ t.plan(5);
759
+ const address = new src_1.Address();
760
+ address.streetAddress1 = "6860";
761
+ address.postalCode = "75024";
762
+ const card = Data_1.TestCards.masterCardManual();
763
+ return new Promise((resolve, reject) => {
764
+ card
765
+ .charge(111.07)
766
+ .withCurrency("USD")
767
+ .withAddress(address)
768
+ .withCommercialRequest(true)
769
+ .withAllowDuplicates(true)
770
+ .withEcommerceInfo(ecom)
771
+ .execute()
772
+ .then((response) => {
773
+ t.truthy(response);
774
+ t.is(response.responseCode, "00");
775
+ t.is(response.commercialIndicator, "S");
776
+ return response;
777
+ })
778
+ .then((response) => {
779
+ response
780
+ .edit()
781
+ .withTaxType(src_1.TaxType.SalesTax)
782
+ .withTaxAmount(1.0)
783
+ .execute()
784
+ .then((cpcResponse) => {
785
+ t.truthy(cpcResponse);
786
+ t.is(cpcResponse.responseCode, "00");
787
+ resolve();
788
+ })
789
+ .catch(reject);
790
+ })
791
+ .catch(reject);
792
+ });
793
+ });
794
+ test("027 - level ii response s", (t) => {
795
+ t.plan(5);
796
+ const address = new src_1.Address();
797
+ address.streetAddress1 = "6860";
798
+ address.postalCode = "75024";
799
+ const card = Data_1.TestCards.masterCardManual();
800
+ return new Promise((resolve, reject) => {
801
+ card
802
+ .charge(111.08)
803
+ .withCurrency("USD")
804
+ .withAddress(address)
805
+ .withCommercialRequest(true)
806
+ .withAllowDuplicates(true)
807
+ .withEcommerceInfo(ecom)
808
+ .execute()
809
+ .then((response) => {
810
+ t.truthy(response);
811
+ t.is(response.responseCode, "00");
812
+ t.is(response.commercialIndicator, "S");
813
+ return response;
814
+ })
815
+ .then((response) => {
816
+ response
817
+ .edit()
818
+ .withPoNumber("9876543210")
819
+ .withTaxType(src_1.TaxType.SalesTax)
820
+ .withTaxAmount(1.0)
821
+ .execute()
822
+ .then((cpcResponse) => {
823
+ t.truthy(cpcResponse);
824
+ t.is(cpcResponse.responseCode, "00");
825
+ resolve();
826
+ })
827
+ .catch(reject);
828
+ })
829
+ .catch(reject);
830
+ });
831
+ });
832
+ test("028 - level ii response s", (t) => {
833
+ t.plan(5);
834
+ const address = new src_1.Address();
835
+ address.streetAddress1 = "6860";
836
+ address.postalCode = "75024";
837
+ const card = Data_1.TestCards.masterCardManual();
838
+ return new Promise((resolve, reject) => {
839
+ card
840
+ .charge(111.09)
841
+ .withCurrency("USD")
842
+ .withAddress(address)
843
+ .withCommercialRequest(true)
844
+ .withAllowDuplicates(true)
845
+ .withEcommerceInfo(ecom)
846
+ .execute()
847
+ .then((response) => {
848
+ t.truthy(response);
849
+ t.is(response.responseCode, "00");
850
+ t.is(response.commercialIndicator, "S");
851
+ return response;
852
+ })
853
+ .then((response) => {
854
+ response
855
+ .edit()
856
+ .withPoNumber("9876543210")
857
+ .withTaxType(src_1.TaxType.TaxExempt)
858
+ .execute()
859
+ .then((cpcResponse) => {
860
+ t.truthy(cpcResponse);
861
+ t.is(cpcResponse.responseCode, "00");
862
+ resolve();
863
+ })
864
+ .catch(reject);
865
+ })
866
+ .catch(reject);
867
+ });
868
+ });
869
+ test("029 - level ii no response", (t) => {
870
+ t.plan(5);
871
+ const address = new src_1.Address();
872
+ address.streetAddress1 = "6860";
873
+ address.postalCode = "75024";
874
+ const card = Data_1.TestCards.amexManual();
875
+ return new Promise((resolve, reject) => {
876
+ card
877
+ .charge(111.1)
878
+ .withCurrency("USD")
879
+ .withAddress(address)
880
+ .withCommercialRequest(true)
881
+ .withAllowDuplicates(true)
882
+ .withEcommerceInfo(ecom)
883
+ .execute()
884
+ .then((response) => {
885
+ t.truthy(response);
886
+ t.is(response.responseCode, "00");
887
+ t.is(response.commercialIndicator, "0");
888
+ return response;
889
+ })
890
+ .then((response) => {
891
+ response
892
+ .edit()
893
+ .withPoNumber("9876543210")
894
+ .withTaxType(src_1.TaxType.NotUsed)
895
+ .execute()
896
+ .then((cpcResponse) => {
897
+ t.truthy(cpcResponse);
898
+ t.is(cpcResponse.responseCode, "00");
899
+ resolve();
900
+ })
901
+ .catch(reject);
902
+ })
903
+ .catch(reject);
904
+ });
905
+ });
906
+ test("030 - level ii no response", (t) => {
907
+ t.plan(5);
908
+ const address = new src_1.Address();
909
+ address.streetAddress1 = "6860";
910
+ address.postalCode = "750241234";
911
+ const card = Data_1.TestCards.amexManual();
912
+ return new Promise((resolve, reject) => {
913
+ card
914
+ .charge(111.11)
915
+ .withCurrency("USD")
916
+ .withAddress(address)
917
+ .withCommercialRequest(true)
918
+ .withAllowDuplicates(true)
919
+ .withEcommerceInfo(ecom)
920
+ .execute()
921
+ .then((response) => {
922
+ t.truthy(response);
923
+ t.is(response.responseCode, "00");
924
+ t.is(response.commercialIndicator, "0");
925
+ return response;
926
+ })
927
+ .then((response) => {
928
+ response
929
+ .edit()
930
+ .withTaxType(src_1.TaxType.SalesTax)
931
+ .withTaxAmount(1.0)
932
+ .execute()
933
+ .then((cpcResponse) => {
934
+ t.truthy(cpcResponse);
935
+ t.is(cpcResponse.responseCode, "00");
936
+ resolve();
937
+ })
938
+ .catch(reject);
939
+ })
940
+ .catch(reject);
941
+ });
942
+ });
943
+ test("031 - level ii no response", (t) => {
944
+ t.plan(5);
945
+ const address = new src_1.Address();
946
+ address.streetAddress1 = "6860";
947
+ address.postalCode = "75024";
948
+ const card = Data_1.TestCards.amexManual();
949
+ return new Promise((resolve, reject) => {
950
+ card
951
+ .charge(111.12)
952
+ .withCurrency("USD")
953
+ .withAddress(address)
954
+ .withCommercialRequest(true)
955
+ .withAllowDuplicates(true)
956
+ .withEcommerceInfo(ecom)
957
+ .execute()
958
+ .then((response) => {
959
+ t.truthy(response);
960
+ t.is(response.responseCode, "00");
961
+ t.is(response.commercialIndicator, "0");
962
+ return response;
963
+ })
964
+ .then((response) => {
965
+ response
966
+ .edit()
967
+ .withPoNumber("9876543210")
968
+ .withTaxType(src_1.TaxType.SalesTax)
969
+ .withTaxAmount(1.0)
970
+ .execute()
971
+ .then((cpcResponse) => {
972
+ t.truthy(cpcResponse);
973
+ t.is(cpcResponse.responseCode, "00");
974
+ resolve();
975
+ })
976
+ .catch(reject);
977
+ })
978
+ .catch(reject);
979
+ });
980
+ });
981
+ test("032 - level ii no response", (t) => {
982
+ t.plan(5);
983
+ const address = new src_1.Address();
984
+ address.streetAddress1 = "6860";
985
+ address.postalCode = "75024";
986
+ const card = Data_1.TestCards.amexManual();
987
+ return new Promise((resolve, reject) => {
988
+ card
989
+ .charge(111.13)
990
+ .withCurrency("USD")
991
+ .withAddress(address)
992
+ .withCommercialRequest(true)
993
+ .withAllowDuplicates(true)
994
+ .withEcommerceInfo(ecom)
995
+ .execute()
996
+ .then((response) => {
997
+ t.truthy(response);
998
+ t.is(response.responseCode, "00");
999
+ t.is(response.commercialIndicator, "0");
1000
+ return response;
1001
+ })
1002
+ .then((response) => {
1003
+ response
1004
+ .edit()
1005
+ .withPoNumber("9876543210")
1006
+ .withTaxType(src_1.TaxType.TaxExempt)
1007
+ .execute()
1008
+ .then((cpcResponse) => {
1009
+ t.truthy(cpcResponse);
1010
+ t.is(cpcResponse.responseCode, "00");
1011
+ resolve();
1012
+ })
1013
+ .catch(reject);
1014
+ })
1015
+ .catch(reject);
1016
+ });
1017
+ });
1018
+ /// PRIOR / VOICE AUTHORIZATION
1019
+ test("033 - offline sale", (t) => {
1020
+ t.plan(2);
1021
+ const card = Data_1.TestCards.visaManual();
1022
+ return new Promise((resolve, reject) => {
1023
+ card
1024
+ .charge(17.01)
1025
+ .withCurrency("USD")
1026
+ .withModifier(src_1.TransactionModifier.Offline)
1027
+ .withOfflineAuthCode("654321")
1028
+ .withInvoiceNumber("123456")
1029
+ .withAllowDuplicates(true)
1030
+ .withEcommerceInfo(ecom)
1031
+ .execute()
1032
+ .then((response) => {
1033
+ t.truthy(response);
1034
+ t.is(response.responseCode, "00");
1035
+ resolve();
1036
+ })
1037
+ .catch(reject);
1038
+ });
1039
+ });
1040
+ test("033 - offline authorization", (t) => {
1041
+ t.plan(2);
1042
+ const card = Data_1.TestCards.visaManual();
1043
+ return new Promise((resolve, reject) => {
1044
+ card
1045
+ .authorize(17.1)
1046
+ .withCurrency("USD")
1047
+ .withModifier(src_1.TransactionModifier.Offline)
1048
+ .withOfflineAuthCode("654321")
1049
+ .withInvoiceNumber("123456")
1050
+ .withAllowDuplicates(true)
1051
+ .withEcommerceInfo(ecom)
1052
+ .execute()
1053
+ .then((response) => {
1054
+ t.truthy(response);
1055
+ t.is(response.responseCode, "00");
1056
+ resolve();
1057
+ })
1058
+ .catch(reject);
1059
+ });
1060
+ });
1061
+ /// RETURN
1062
+ test("034 - offline return", (t) => {
1063
+ t.plan(2);
1064
+ const card = Data_1.TestCards.visaManual();
1065
+ return new Promise((resolve, reject) => {
1066
+ card
1067
+ .refund(15.15)
1068
+ .withCurrency("USD")
1069
+ .withInvoiceNumber("123456")
1070
+ .withAllowDuplicates(true)
1071
+ .withEcommerceInfo(ecom)
1072
+ .execute()
1073
+ .then((response) => {
1074
+ t.truthy(response);
1075
+ t.is(response.responseCode, "00");
1076
+ resolve();
1077
+ })
1078
+ .catch(reject);
1079
+ });
1080
+ });
1081
+ /// ONLINE VOID / REVERSAL
1082
+ test("035 - void test 10", () => true);
1083
+ test("036 - void test 20", () => true);
1084
+ /// ADVANCED FRAUD SCREENING
1085
+ test.failing("037 - fraud prevention sale", (t) => {
1086
+ t.plan(2);
1087
+ const card = Data_1.TestCards.visaManual();
1088
+ return new Promise((resolve, reject) => {
1089
+ card
1090
+ .charge(15000)
1091
+ .withCurrency("USD")
1092
+ .withAllowDuplicates(true)
1093
+ .withEcommerceInfo(ecom)
1094
+ .execute()
1095
+ .then((response) => {
1096
+ t.truthy(response);
1097
+ t.is(response.responseCode, "FR");
1098
+ resolve();
1099
+ })
1100
+ .catch(reject);
1101
+ });
1102
+ });
1103
+ test.failing("038 - fraud prevention return", (t) => {
1104
+ t.plan(2);
1105
+ const card = Data_1.TestCards.visaManual();
1106
+ return new Promise((resolve, reject) => {
1107
+ card
1108
+ .refund(15000)
1109
+ .withCurrency("USD")
1110
+ .withAllowDuplicates(true)
1111
+ .withEcommerceInfo(ecom)
1112
+ .execute()
1113
+ .then((response) => {
1114
+ t.truthy(response);
1115
+ t.is(response.responseCode, "41");
1116
+ resolve();
1117
+ })
1118
+ .catch(reject);
1119
+ });
1120
+ });
1121
+ /// ONE CARD - GSB CARD FUNCTIONS
1122
+ /// BALANCE INQUIRY
1123
+ (usePrepaid ? test : test.skip)("037 - balance inquiry gsb", (t) => {
1124
+ t.plan(2);
1125
+ const address = new src_1.Address();
1126
+ address.streetAddress1 = "6860";
1127
+ address.postalCode = "75024";
1128
+ const card = Data_1.TestCards.gsbManual();
1129
+ return new Promise((resolve, reject) => {
1130
+ card
1131
+ .balanceInquiry()
1132
+ .withAddress(address)
1133
+ .execute()
1134
+ .then((response) => {
1135
+ t.truthy(response);
1136
+ t.is(response.responseCode, "00");
1137
+ resolve();
1138
+ })
1139
+ .catch(reject);
1140
+ });
1141
+ });
1142
+ /// ADD VALUE
1143
+ (usePrepaid ? test : test.skip)("038 - add value gsb", (t) => {
1144
+ t.plan(2);
1145
+ const address = new src_1.Address();
1146
+ address.streetAddress1 = "6860";
1147
+ address.postalCode = "75024";
1148
+ const card = new src_1.CreditTrackData();
1149
+ card.value =
1150
+ "%B6277220572999800^ / ^49121010557010000016000000?F;6277220572999800=49121010557010000016?";
1151
+ return new Promise((resolve, reject) => {
1152
+ card
1153
+ .addValue(15.0)
1154
+ .withCurrency("USD")
1155
+ .withAllowDuplicates(true)
1156
+ .withEcommerceInfo(ecom)
1157
+ .execute()
1158
+ .then((response) => {
1159
+ t.truthy(response);
1160
+ t.is(response.responseCode, "00");
1161
+ resolve();
1162
+ })
1163
+ .catch(reject);
1164
+ });
1165
+ });
1166
+ /// SALE
1167
+ (usePrepaid ? test : test.skip)("039 - charge gsb", (t) => {
1168
+ t.plan(4);
1169
+ const address = new src_1.Address();
1170
+ address.streetAddress1 = "6860";
1171
+ address.postalCode = "75024";
1172
+ const card = Data_1.TestCards.gsbManual();
1173
+ return new Promise((resolve, reject) => {
1174
+ card
1175
+ .charge(2.05)
1176
+ .withCurrency("USD")
1177
+ .withAddress(address)
1178
+ .withInvoiceNumber("123456")
1179
+ .withAllowDuplicates(true)
1180
+ .withEcommerceInfo(ecom)
1181
+ .execute()
1182
+ .then((response) => {
1183
+ t.truthy(response);
1184
+ t.is(response.responseCode, "00");
1185
+ return response;
1186
+ })
1187
+ .then((response) => {
1188
+ response
1189
+ .void()
1190
+ .execute()
1191
+ .then((voidResponse) => {
1192
+ t.truthy(voidResponse);
1193
+ t.is(voidResponse.responseCode, "00");
1194
+ resolve();
1195
+ })
1196
+ .catch(reject);
1197
+ })
1198
+ .catch(reject);
1199
+ });
1200
+ });
1201
+ (usePrepaid ? test : test.skip)("040 - charge gsb", (t) => {
1202
+ t.plan(2);
1203
+ const address = new src_1.Address();
1204
+ address.streetAddress1 = "6860";
1205
+ address.postalCode = "75024";
1206
+ const card = Data_1.TestCards.gsbManual();
1207
+ return new Promise((resolve, reject) => {
1208
+ card
1209
+ .charge(2.1)
1210
+ .withCurrency("USD")
1211
+ .withAddress(address)
1212
+ .withInvoiceNumber("123456")
1213
+ .withAllowDuplicates(true)
1214
+ .withEcommerceInfo(ecom)
1215
+ .execute()
1216
+ .then((response) => {
1217
+ t.truthy(response);
1218
+ t.is(response.responseCode, "00");
1219
+ resolve();
1220
+ })
1221
+ .catch(reject);
1222
+ });
1223
+ });
1224
+ /// ONLINE VOID / REVERSAL
1225
+ test("041 - void gsb", () => true);
1226
+ /// HMS GIFT - REWARDS
1227
+ /// ACTIVATE
1228
+ test("042 - activate gift 1", (t) => {
1229
+ t.plan(2);
1230
+ const card = Data_1.TestCards.giftCard1Swipe();
1231
+ return new Promise((resolve, reject) => {
1232
+ card
1233
+ .activate(6.0)
1234
+ .withCurrency("USD")
1235
+ .execute()
1236
+ .then((response) => {
1237
+ t.truthy(response);
1238
+ t.is(response.responseCode, "00");
1239
+ resolve();
1240
+ })
1241
+ .catch(reject);
1242
+ });
1243
+ });
1244
+ test("043 - activate gift 2", (t) => {
1245
+ t.plan(2);
1246
+ const card = Data_1.TestCards.giftCard2Manual();
1247
+ return new Promise((resolve, reject) => {
1248
+ card
1249
+ .activate(7.0)
1250
+ .withCurrency("USD")
1251
+ .execute()
1252
+ .then((response) => {
1253
+ t.truthy(response);
1254
+ t.is(response.responseCode, "00");
1255
+ resolve();
1256
+ })
1257
+ .catch(reject);
1258
+ });
1259
+ });
1260
+ /// LOAD / ADD VALUE
1261
+ test("044 - add value gift 1", (t) => {
1262
+ t.plan(2);
1263
+ const card = Data_1.TestCards.giftCard1Swipe();
1264
+ return new Promise((resolve, reject) => {
1265
+ card
1266
+ .addValue(8.0)
1267
+ .withCurrency("USD")
1268
+ .execute()
1269
+ .then((response) => {
1270
+ t.truthy(response);
1271
+ t.is(response.responseCode, "00");
1272
+ resolve();
1273
+ })
1274
+ .catch(reject);
1275
+ });
1276
+ });
1277
+ test("045 - add value gift 2", (t) => {
1278
+ t.plan(2);
1279
+ const card = Data_1.TestCards.giftCard2Manual();
1280
+ return new Promise((resolve, reject) => {
1281
+ card
1282
+ .addValue(9.0)
1283
+ .withCurrency("USD")
1284
+ .execute()
1285
+ .then((response) => {
1286
+ t.truthy(response);
1287
+ t.is(response.responseCode, "00");
1288
+ resolve();
1289
+ })
1290
+ .catch(reject);
1291
+ });
1292
+ });
1293
+ /// BALANCE INQUIRY
1294
+ test("046 - balance inquiry gift 1", (t) => {
1295
+ t.plan(3);
1296
+ const card = Data_1.TestCards.giftCard1Swipe();
1297
+ return new Promise((resolve, reject) => {
1298
+ card
1299
+ .balanceInquiry()
1300
+ .execute()
1301
+ .then((response) => {
1302
+ t.truthy(response);
1303
+ t.is(response.responseCode, "00");
1304
+ t.is(response.balanceAmount, "10.00");
1305
+ resolve();
1306
+ })
1307
+ .catch(reject);
1308
+ });
1309
+ });
1310
+ test("047 - balance inquiry gift 2", (t) => {
1311
+ t.plan(3);
1312
+ const card = Data_1.TestCards.giftCard2Manual();
1313
+ return new Promise((resolve, reject) => {
1314
+ card
1315
+ .balanceInquiry()
1316
+ .execute()
1317
+ .then((response) => {
1318
+ t.truthy(response);
1319
+ t.is(response.responseCode, "00");
1320
+ t.is(response.balanceAmount, "10.00");
1321
+ resolve();
1322
+ })
1323
+ .catch(reject);
1324
+ });
1325
+ });
1326
+ /// REPLACE / TRANSFER
1327
+ test("048 - replace gift 1", (t) => {
1328
+ t.plan(2);
1329
+ const card = Data_1.TestCards.giftCard1Swipe();
1330
+ return new Promise((resolve, reject) => {
1331
+ card
1332
+ .replaceWith(Data_1.TestCards.giftCard2Manual())
1333
+ .execute()
1334
+ .then((response) => {
1335
+ t.truthy(response);
1336
+ t.is(response.responseCode, "00");
1337
+ resolve();
1338
+ })
1339
+ .catch(reject);
1340
+ });
1341
+ });
1342
+ test("049 - replace gift 2", (t) => {
1343
+ t.plan(2);
1344
+ const card = Data_1.TestCards.giftCard2Manual();
1345
+ return new Promise((resolve, reject) => {
1346
+ card
1347
+ .replaceWith(Data_1.TestCards.giftCard1Swipe())
1348
+ .execute()
1349
+ .then((response) => {
1350
+ t.truthy(response);
1351
+ t.is(response.responseCode, "00");
1352
+ resolve();
1353
+ })
1354
+ .catch(reject);
1355
+ });
1356
+ });
1357
+ /// SALE
1358
+ test("050 - sale gift 1", (t) => {
1359
+ t.plan(2);
1360
+ const card = Data_1.TestCards.giftCard1Swipe();
1361
+ return new Promise((resolve, reject) => {
1362
+ card
1363
+ .charge(1.0)
1364
+ .withCurrency("USD")
1365
+ .execute()
1366
+ .then((response) => {
1367
+ t.truthy(response);
1368
+ t.is(response.responseCode, "00");
1369
+ resolve();
1370
+ })
1371
+ .catch(reject);
1372
+ });
1373
+ });
1374
+ test("051 - sale gift 2", (t) => {
1375
+ t.plan(2);
1376
+ const card = Data_1.TestCards.giftCard2Manual();
1377
+ return new Promise((resolve, reject) => {
1378
+ card
1379
+ .charge(2.0)
1380
+ .withCurrency("USD")
1381
+ .execute()
1382
+ .then((response) => {
1383
+ t.truthy(response);
1384
+ t.is(response.responseCode, "00");
1385
+ resolve();
1386
+ })
1387
+ .catch(reject);
1388
+ });
1389
+ });
1390
+ test("052 - sale gift 1 void", (t) => {
1391
+ t.plan(4);
1392
+ const card = Data_1.TestCards.giftCard1Swipe();
1393
+ return new Promise((resolve, reject) => {
1394
+ card
1395
+ .charge(3.0)
1396
+ .withCurrency("USD")
1397
+ .execute()
1398
+ .then((response) => {
1399
+ t.truthy(response);
1400
+ t.is(response.responseCode, "00");
1401
+ return response;
1402
+ })
1403
+ .then((response) => {
1404
+ response
1405
+ .void()
1406
+ .execute()
1407
+ .then((voidResponse) => {
1408
+ t.truthy(voidResponse);
1409
+ t.is(voidResponse.responseCode, "00");
1410
+ resolve();
1411
+ })
1412
+ .catch(reject);
1413
+ })
1414
+ .catch(reject);
1415
+ });
1416
+ });
1417
+ test("053 - sale gift 2 void", (t) => {
1418
+ t.plan(4);
1419
+ const card = Data_1.TestCards.giftCard2Manual();
1420
+ return new Promise((resolve, reject) => {
1421
+ card
1422
+ .charge(4.0)
1423
+ .withCurrency("USD")
1424
+ .execute()
1425
+ .then((response) => {
1426
+ t.truthy(response);
1427
+ t.is(response.responseCode, "00");
1428
+ return response;
1429
+ })
1430
+ .then((response) => {
1431
+ response
1432
+ .reverse(4.0)
1433
+ .execute()
1434
+ .then((reversalResponse) => {
1435
+ t.truthy(reversalResponse);
1436
+ t.is(reversalResponse.responseCode, "00");
1437
+ resolve();
1438
+ })
1439
+ .catch(reject);
1440
+ })
1441
+ .catch(reject);
1442
+ });
1443
+ });
1444
+ /// VOID
1445
+ test("054 - void gift", () => true);
1446
+ /// REVERSAL
1447
+ test("055 - reversal gift", () => true);
1448
+ test("056 - reversal gift 2", (t) => {
1449
+ t.plan(4);
1450
+ const card = Data_1.TestCards.giftCard2Manual();
1451
+ return new Promise((resolve, reject) => {
1452
+ // setup
1453
+ card
1454
+ .charge(2.0)
1455
+ .withCurrency("USD")
1456
+ .execute()
1457
+ .then((response) => {
1458
+ t.truthy(response);
1459
+ t.is(response.responseCode, "00");
1460
+ })
1461
+ .then(() => {
1462
+ // reverse based on card, not transaction id
1463
+ card
1464
+ .reverse(2.0)
1465
+ .execute()
1466
+ .then((response) => {
1467
+ t.truthy(response);
1468
+ t.is(response.responseCode, "00");
1469
+ resolve();
1470
+ })
1471
+ .catch(reject);
1472
+ })
1473
+ .catch(reject);
1474
+ });
1475
+ });
1476
+ /// DEACTIVATE
1477
+ test("057 - deactivate gift 1", (t) => {
1478
+ t.plan(2);
1479
+ const card = Data_1.TestCards.giftCard1Swipe();
1480
+ return new Promise((resolve, reject) => {
1481
+ card
1482
+ .deactivate()
1483
+ .execute()
1484
+ .then((response) => {
1485
+ t.truthy(response);
1486
+ t.is(response.responseCode, "00");
1487
+ resolve();
1488
+ })
1489
+ .catch(reject);
1490
+ });
1491
+ });
1492
+ /// RECEIPTS MESSAGING
1493
+ test("058 - receipts messaging", () => true);
1494
+ /// REWARD
1495
+ /// BALANCE INQUIRY
1496
+ test("059 - balance inquiry rewards 1", (t) => {
1497
+ t.plan(3);
1498
+ const card = Data_1.TestCards.giftCard1Swipe();
1499
+ return new Promise((resolve, reject) => {
1500
+ card
1501
+ .balanceInquiry()
1502
+ .execute()
1503
+ .then((response) => {
1504
+ t.truthy(response);
1505
+ t.is(response.responseCode, "00");
1506
+ t.truthy(response.pointsBalanceAmount > "0");
1507
+ resolve();
1508
+ })
1509
+ .catch(reject);
1510
+ });
1511
+ });
1512
+ test("060 - balance inquiry rewards 2", (t) => {
1513
+ t.plan(3);
1514
+ const card = Data_1.TestCards.giftCard2Manual();
1515
+ return new Promise((resolve, reject) => {
1516
+ card
1517
+ .balanceInquiry()
1518
+ .execute()
1519
+ .then((response) => {
1520
+ t.truthy(response);
1521
+ t.is(response.responseCode, "00");
1522
+ t.truthy(response.pointsBalanceAmount > "0");
1523
+ resolve();
1524
+ })
1525
+ .catch(reject);
1526
+ });
1527
+ });
1528
+ /// ALIAS
1529
+ test("061 - create alias gift 1", (t) => {
1530
+ t.plan(1);
1531
+ return new Promise((resolve, reject) => {
1532
+ src_1.GiftCard.create("9725550100")
1533
+ .then((response) => {
1534
+ t.truthy(response);
1535
+ resolve();
1536
+ })
1537
+ .catch(reject);
1538
+ });
1539
+ });
1540
+ test("062 - create alias gift 2", (t) => {
1541
+ t.plan(1);
1542
+ return new Promise((resolve, reject) => {
1543
+ src_1.GiftCard.create("9725550100")
1544
+ .then((response) => {
1545
+ t.truthy(response);
1546
+ resolve();
1547
+ })
1548
+ .catch(reject);
1549
+ });
1550
+ });
1551
+ test("063 - add alias gift 1", (t) => {
1552
+ t.plan(2);
1553
+ const card = Data_1.TestCards.giftCard1Swipe();
1554
+ return new Promise((resolve, reject) => {
1555
+ card
1556
+ .addAlias("9725550100")
1557
+ .execute()
1558
+ .then((response) => {
1559
+ t.truthy(response);
1560
+ t.is(response.responseCode, "00");
1561
+ resolve();
1562
+ })
1563
+ .catch(reject);
1564
+ });
1565
+ });
1566
+ test("064 - add alias gift 2", (t) => {
1567
+ t.plan(2);
1568
+ const card = Data_1.TestCards.giftCard2Manual();
1569
+ return new Promise((resolve, reject) => {
1570
+ card
1571
+ .addAlias("9725550100")
1572
+ .execute()
1573
+ .then((response) => {
1574
+ t.truthy(response);
1575
+ t.is(response.responseCode, "00");
1576
+ resolve();
1577
+ })
1578
+ .catch(reject);
1579
+ });
1580
+ });
1581
+ test("065 - delete alias gift 1", (t) => {
1582
+ t.plan(2);
1583
+ const card = Data_1.TestCards.giftCard1Swipe();
1584
+ return new Promise((resolve, reject) => {
1585
+ card
1586
+ .removeAlias("9725550100")
1587
+ .execute()
1588
+ .then((response) => {
1589
+ t.truthy(response);
1590
+ t.is(response.responseCode, "00");
1591
+ resolve();
1592
+ })
1593
+ .catch(reject);
1594
+ });
1595
+ });
1596
+ /// SALE
1597
+ test("066 - redeem points gift 1", (t) => {
1598
+ t.plan(2);
1599
+ const card = Data_1.TestCards.giftCard1Swipe();
1600
+ return new Promise((resolve, reject) => {
1601
+ card
1602
+ .charge(100)
1603
+ .withCurrency("points")
1604
+ .execute()
1605
+ .then((response) => {
1606
+ t.truthy(response);
1607
+ t.is(response.responseCode, "00");
1608
+ resolve();
1609
+ })
1610
+ .catch(reject);
1611
+ });
1612
+ });
1613
+ test("067 - redeem points gift 2", (t) => {
1614
+ t.plan(2);
1615
+ const card = Data_1.TestCards.giftCard2Manual();
1616
+ return new Promise((resolve, reject) => {
1617
+ card
1618
+ .charge(200)
1619
+ .withCurrency("points")
1620
+ .execute()
1621
+ .then((response) => {
1622
+ t.truthy(response);
1623
+ t.is(response.responseCode, "00");
1624
+ resolve();
1625
+ })
1626
+ .catch(reject);
1627
+ });
1628
+ });
1629
+ test("068 - redeem points gift 2", (t) => {
1630
+ t.plan(2);
1631
+ const card = new src_1.GiftCard();
1632
+ card.alias = "9725550100";
1633
+ return new Promise((resolve, reject) => {
1634
+ card
1635
+ .charge(300)
1636
+ .withCurrency("points")
1637
+ .execute()
1638
+ .then((response) => {
1639
+ t.truthy(response);
1640
+ t.is(response.responseCode, "00");
1641
+ resolve();
1642
+ })
1643
+ .catch(reject);
1644
+ });
1645
+ });
1646
+ /// REWARDS
1647
+ test("069 - rewards gift 1", (t) => {
1648
+ t.plan(2);
1649
+ const card = Data_1.TestCards.giftCard1Swipe();
1650
+ return new Promise((resolve, reject) => {
1651
+ card
1652
+ .rewards(10)
1653
+ .execute()
1654
+ .then((response) => {
1655
+ t.truthy(response);
1656
+ t.is(response.responseCode, "00");
1657
+ resolve();
1658
+ })
1659
+ .catch(reject);
1660
+ });
1661
+ });
1662
+ test("070 - rewards gift 2", (t) => {
1663
+ t.plan(2);
1664
+ const card = Data_1.TestCards.giftCard2Manual();
1665
+ return new Promise((resolve, reject) => {
1666
+ card
1667
+ .rewards(11)
1668
+ .execute()
1669
+ .then((response) => {
1670
+ t.truthy(response);
1671
+ t.is(response.responseCode, "00");
1672
+ resolve();
1673
+ })
1674
+ .catch(reject);
1675
+ });
1676
+ });
1677
+ /// REPLACE / TRANSFER
1678
+ test("071 - replace rewards 1", (t) => {
1679
+ t.plan(2);
1680
+ const card = Data_1.TestCards.giftCard1Swipe();
1681
+ return new Promise((resolve, reject) => {
1682
+ card
1683
+ .replaceWith(Data_1.TestCards.giftCard2Manual())
1684
+ .execute()
1685
+ .then((response) => {
1686
+ t.truthy(response);
1687
+ t.is(response.responseCode, "00");
1688
+ resolve();
1689
+ })
1690
+ .catch(reject);
1691
+ });
1692
+ });
1693
+ test("072 - replace rewards 2", (t) => {
1694
+ t.plan(2);
1695
+ const card = Data_1.TestCards.giftCard2Manual();
1696
+ return new Promise((resolve, reject) => {
1697
+ card
1698
+ .replaceWith(Data_1.TestCards.giftCard1Swipe())
1699
+ .execute()
1700
+ .then((response) => {
1701
+ t.truthy(response);
1702
+ t.is(response.responseCode, "00");
1703
+ resolve();
1704
+ })
1705
+ .catch(reject);
1706
+ });
1707
+ });
1708
+ /// DEACTIVATE
1709
+ test("073 - deactivate rewards 1", (t) => {
1710
+ t.plan(2);
1711
+ const card = Data_1.TestCards.giftCard1Swipe();
1712
+ return new Promise((resolve, reject) => {
1713
+ card
1714
+ .deactivate()
1715
+ .execute()
1716
+ .then((response) => {
1717
+ t.truthy(response);
1718
+ t.is(response.responseCode, "00");
1719
+ resolve();
1720
+ })
1721
+ .catch(reject);
1722
+ });
1723
+ });
1724
+ test("074 - deactivate rewards 2", (t) => {
1725
+ t.plan(2);
1726
+ const card = Data_1.TestCards.giftCard2Manual();
1727
+ return new Promise((resolve, reject) => {
1728
+ card
1729
+ .deactivate()
1730
+ .execute()
1731
+ .then((response) => {
1732
+ t.truthy(response);
1733
+ t.is(response.responseCode, "00");
1734
+ resolve();
1735
+ })
1736
+ .catch(reject);
1737
+ });
1738
+ });
1739
+ /// RECEIPTS MESSAGING
1740
+ test("075 - receipts messaging", () => true);
1741
+ test.after("999 - close batch", (t) => {
1742
+ t.plan(1);
1743
+ return new Promise((resolve, reject) => {
1744
+ src_1.BatchService.closeBatch()
1745
+ .then((response) => {
1746
+ t.truthy(response);
1747
+ resolve();
1748
+ })
1749
+ .catch((e) => {
1750
+ if (e.message.indexOf(BATCH_NOT_OPEN) !== -1 ||
1751
+ e.message.indexOf(BATCH_EMPTY) !== -1) {
1752
+ t.pass();
1753
+ resolve();
1754
+ return;
1755
+ }
1756
+ reject(e);
1757
+ });
1758
+ });
1759
+ });
1760
+ //# sourceMappingURL=MotoTest.js.map