globalpayments-api 1.4.9 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (295) hide show
  1. package/CHANGELOG.md +7 -3
  2. package/package.json +3 -4
  3. package/lib/src/Builders/AuthorizationBuilder.d.ts +0 -325
  4. package/lib/src/Builders/AuthorizationBuilder.js +0 -599
  5. package/lib/src/Builders/BaseBuilder/ValidationClause.d.ts +0 -14
  6. package/lib/src/Builders/BaseBuilder/ValidationClause.js +0 -61
  7. package/lib/src/Builders/BaseBuilder/ValidationTarget.d.ts +0 -16
  8. package/lib/src/Builders/BaseBuilder/ValidationTarget.js +0 -28
  9. package/lib/src/Builders/BaseBuilder/Validations.d.ts +0 -11
  10. package/lib/src/Builders/BaseBuilder/Validations.js +0 -56
  11. package/lib/src/Builders/BaseBuilder.d.ts +0 -11
  12. package/lib/src/Builders/BaseBuilder.js +0 -16
  13. package/lib/src/Builders/ManagementBuilder.d.ts +0 -103
  14. package/lib/src/Builders/ManagementBuilder.js +0 -227
  15. package/lib/src/Builders/PayFacBuilder.d.ts +0 -96
  16. package/lib/src/Builders/PayFacBuilder.js +0 -184
  17. package/lib/src/Builders/RecurringBuilder.d.ts +0 -13
  18. package/lib/src/Builders/RecurringBuilder.js +0 -47
  19. package/lib/src/Builders/ReportBuilder.d.ts +0 -8
  20. package/lib/src/Builders/ReportBuilder.js +0 -36
  21. package/lib/src/Builders/TransactionBuilder.d.ts +0 -10
  22. package/lib/src/Builders/TransactionBuilder.js +0 -46
  23. package/lib/src/Builders/TransactionReportBuilder.d.ts +0 -15
  24. package/lib/src/Builders/TransactionReportBuilder.js +0 -79
  25. package/lib/src/Builders/index.d.ts +0 -7
  26. package/lib/src/Builders/index.js +0 -19
  27. package/lib/src/Entities/Address.d.ts +0 -13
  28. package/lib/src/Entities/Address.js +0 -19
  29. package/lib/src/Entities/BatchSummary.d.ts +0 -6
  30. package/lib/src/Entities/BatchSummary.js +0 -9
  31. package/lib/src/Entities/Customer.d.ts +0 -64
  32. package/lib/src/Entities/Customer.js +0 -47
  33. package/lib/src/Entities/DocumentUploadData.d.ts +0 -13
  34. package/lib/src/Entities/DocumentUploadData.js +0 -48
  35. package/lib/src/Entities/EcommerceInfo.d.ts +0 -12
  36. package/lib/src/Entities/EcommerceInfo.js +0 -14
  37. package/lib/src/Entities/EncryptionData.d.ts +0 -6
  38. package/lib/src/Entities/EncryptionData.js +0 -9
  39. package/lib/src/Entities/Enums.d.ts +0 -273
  40. package/lib/src/Entities/Enums.js +0 -385
  41. package/lib/src/Entities/Errors.d.ts +0 -23
  42. package/lib/src/Entities/Errors.js +0 -106
  43. package/lib/src/Entities/HostedPaymentData.d.ts +0 -10
  44. package/lib/src/Entities/HostedPaymentData.js +0 -10
  45. package/lib/src/Entities/ProFac/AccountBalanceResponseData.d.ts +0 -7
  46. package/lib/src/Entities/ProFac/AccountBalanceResponseData.js +0 -9
  47. package/lib/src/Entities/ProFac/AccountPermissions.d.ts +0 -15
  48. package/lib/src/Entities/ProFac/AccountPermissions.js +0 -9
  49. package/lib/src/Entities/ProFac/BankAccountData.d.ts +0 -10
  50. package/lib/src/Entities/ProFac/BankAccountData.js +0 -9
  51. package/lib/src/Entities/ProFac/BankAccountOwnershipData.d.ts +0 -8
  52. package/lib/src/Entities/ProFac/BankAccountOwnershipData.js +0 -11
  53. package/lib/src/Entities/ProFac/BeneficialOwnerData.d.ts +0 -6
  54. package/lib/src/Entities/ProFac/BeneficialOwnerData.js +0 -10
  55. package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.d.ts +0 -5
  56. package/lib/src/Entities/ProFac/BeneficialOwnerDataResult.js +0 -9
  57. package/lib/src/Entities/ProFac/BusinessData.d.ts +0 -14
  58. package/lib/src/Entities/ProFac/BusinessData.js +0 -11
  59. package/lib/src/Entities/ProFac/DeviceAttributeInfo.d.ts +0 -4
  60. package/lib/src/Entities/ProFac/DeviceAttributeInfo.js +0 -9
  61. package/lib/src/Entities/ProFac/DeviceData.d.ts +0 -5
  62. package/lib/src/Entities/ProFac/DeviceData.js +0 -10
  63. package/lib/src/Entities/ProFac/DeviceInfo.d.ts +0 -6
  64. package/lib/src/Entities/ProFac/DeviceInfo.js +0 -9
  65. package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.d.ts +0 -7
  66. package/lib/src/Entities/ProFac/FlashFundsPaymentCardData.js +0 -13
  67. package/lib/src/Entities/ProFac/GrossBillingInformation.d.ts +0 -8
  68. package/lib/src/Entities/ProFac/GrossBillingInformation.js +0 -9
  69. package/lib/src/Entities/ProFac/OrderDevice.d.ts +0 -18
  70. package/lib/src/Entities/ProFac/OrderDevice.js +0 -9
  71. package/lib/src/Entities/ProFac/OwnersData.d.ts +0 -12
  72. package/lib/src/Entities/ProFac/OwnersData.js +0 -11
  73. package/lib/src/Entities/ProFac/PayFacResponseData.d.ts +0 -55
  74. package/lib/src/Entities/ProFac/PayFacResponseData.js +0 -9
  75. package/lib/src/Entities/ProFac/RenewAccountData.d.ts +0 -10
  76. package/lib/src/Entities/ProFac/RenewAccountData.js +0 -11
  77. package/lib/src/Entities/ProFac/SignificantOwnerData.d.ts +0 -8
  78. package/lib/src/Entities/ProFac/SignificantOwnerData.js +0 -11
  79. package/lib/src/Entities/ProFac/ThreatRiskData.d.ts +0 -5
  80. package/lib/src/Entities/ProFac/ThreatRiskData.js +0 -9
  81. package/lib/src/Entities/ProFac/UserPersonalData.d.ts +0 -26
  82. package/lib/src/Entities/ProFac/UserPersonalData.js +0 -14
  83. package/lib/src/Entities/RecurringEntity.d.ts +0 -14
  84. package/lib/src/Entities/RecurringEntity.js +0 -86
  85. package/lib/src/Entities/SSORequestData.d.ts +0 -5
  86. package/lib/src/Entities/SSORequestData.js +0 -9
  87. package/lib/src/Entities/Schedule.d.ts +0 -47
  88. package/lib/src/Entities/Schedule.js +0 -253
  89. package/lib/src/Entities/Transaction.d.ts +0 -78
  90. package/lib/src/Entities/Transaction.js +0 -108
  91. package/lib/src/Entities/TransactionSummary.d.ts +0 -61
  92. package/lib/src/Entities/TransactionSummary.js +0 -9
  93. package/lib/src/Entities/index.d.ts +0 -12
  94. package/lib/src/Entities/index.js +0 -24
  95. package/lib/src/Gateways/Gateway.d.ts +0 -10
  96. package/lib/src/Gateways/Gateway.js +0 -42
  97. package/lib/src/Gateways/IPayFacProvider.d.ts +0 -5
  98. package/lib/src/Gateways/IPayFacProvider.js +0 -2
  99. package/lib/src/Gateways/IPaymentGateway.d.ts +0 -8
  100. package/lib/src/Gateways/IPaymentGateway.js +0 -2
  101. package/lib/src/Gateways/IRecurringService.d.ts +0 -6
  102. package/lib/src/Gateways/IRecurringService.js +0 -2
  103. package/lib/src/Gateways/PayPlanConnector.d.ts +0 -43
  104. package/lib/src/Gateways/PayPlanConnector.js +0 -564
  105. package/lib/src/Gateways/PorticoConnector.d.ts +0 -44
  106. package/lib/src/Gateways/PorticoConnector.js +0 -1017
  107. package/lib/src/Gateways/ProPayConnector.d.ts +0 -41
  108. package/lib/src/Gateways/ProPayConnector.js +0 -698
  109. package/lib/src/Gateways/RealexConnector.d.ts +0 -30
  110. package/lib/src/Gateways/RealexConnector.js +0 -523
  111. package/lib/src/Gateways/RestGateway.d.ts +0 -6
  112. package/lib/src/Gateways/RestGateway.js +0 -31
  113. package/lib/src/Gateways/XmlGateway.d.ts +0 -6
  114. package/lib/src/Gateways/XmlGateway.js +0 -39
  115. package/lib/src/Gateways/https-wrapper.d.ts +0 -3
  116. package/lib/src/Gateways/https-wrapper.js +0 -35
  117. package/lib/src/Gateways/index.d.ts +0 -7
  118. package/lib/src/Gateways/index.js +0 -19
  119. package/lib/src/HostedPaymentConfig.d.ts +0 -12
  120. package/lib/src/HostedPaymentConfig.js +0 -9
  121. package/lib/src/PaymentMethods/Cash.d.ts +0 -8
  122. package/lib/src/PaymentMethods/Cash.js +0 -36
  123. package/lib/src/PaymentMethods/Credit.d.ts +0 -85
  124. package/lib/src/PaymentMethods/Credit.js +0 -106
  125. package/lib/src/PaymentMethods/CreditCardData.d.ts +0 -20
  126. package/lib/src/PaymentMethods/CreditCardData.js +0 -57
  127. package/lib/src/PaymentMethods/CreditTrackData.d.ts +0 -7
  128. package/lib/src/PaymentMethods/CreditTrackData.js +0 -27
  129. package/lib/src/PaymentMethods/Debit.d.ts +0 -40
  130. package/lib/src/PaymentMethods/Debit.js +0 -70
  131. package/lib/src/PaymentMethods/DebitTrackData.d.ts +0 -7
  132. package/lib/src/PaymentMethods/DebitTrackData.js +0 -27
  133. package/lib/src/PaymentMethods/EBT.d.ts +0 -48
  134. package/lib/src/PaymentMethods/EBT.js +0 -88
  135. package/lib/src/PaymentMethods/EBTCardData.d.ts +0 -16
  136. package/lib/src/PaymentMethods/EBTCardData.js +0 -32
  137. package/lib/src/PaymentMethods/EBTTrackData.d.ts +0 -8
  138. package/lib/src/PaymentMethods/EBTTrackData.js +0 -27
  139. package/lib/src/PaymentMethods/ECheck.d.ts +0 -32
  140. package/lib/src/PaymentMethods/ECheck.js +0 -40
  141. package/lib/src/PaymentMethods/GiftCard.d.ts +0 -131
  142. package/lib/src/PaymentMethods/GiftCard.js +0 -205
  143. package/lib/src/PaymentMethods/Interfaces.d.ts +0 -55
  144. package/lib/src/PaymentMethods/Interfaces.js +0 -2
  145. package/lib/src/PaymentMethods/PaymentMethod.d.ts +0 -19
  146. package/lib/src/PaymentMethods/PaymentMethod.js +0 -114
  147. package/lib/src/PaymentMethods/RecurringPaymentMethod.d.ts +0 -23
  148. package/lib/src/PaymentMethods/RecurringPaymentMethod.js +0 -77
  149. package/lib/src/PaymentMethods/TransactionReference.d.ts +0 -10
  150. package/lib/src/PaymentMethods/TransactionReference.js +0 -12
  151. package/lib/src/PaymentMethods/index.d.ts +0 -15
  152. package/lib/src/PaymentMethods/index.js +0 -27
  153. package/lib/src/Services/BatchService.d.ts +0 -4
  154. package/lib/src/Services/BatchService.js +0 -17
  155. package/lib/src/Services/CheckService.d.ts +0 -6
  156. package/lib/src/Services/CheckService.js +0 -20
  157. package/lib/src/Services/CreditService.d.ts +0 -12
  158. package/lib/src/Services/CreditService.js +0 -54
  159. package/lib/src/Services/DebitService.d.ts +0 -7
  160. package/lib/src/Services/DebitService.js +0 -28
  161. package/lib/src/Services/EBTService.d.ts +0 -8
  162. package/lib/src/Services/EBTService.js +0 -32
  163. package/lib/src/Services/GiftService.d.ts +0 -16
  164. package/lib/src/Services/GiftService.js +0 -54
  165. package/lib/src/Services/HostedService.d.ts +0 -9
  166. package/lib/src/Services/HostedService.js +0 -59
  167. package/lib/src/Services/PayFacService.d.ts +0 -26
  168. package/lib/src/Services/PayFacService.js +0 -77
  169. package/lib/src/Services/RecurringService.d.ts +0 -8
  170. package/lib/src/Services/RecurringService.js +0 -27
  171. package/lib/src/Services/ReportingService.d.ts +0 -6
  172. package/lib/src/Services/ReportingService.js +0 -19
  173. package/lib/src/Services/index.d.ts +0 -9
  174. package/lib/src/Services/index.js +0 -21
  175. package/lib/src/ServicesConfig.d.ts +0 -27
  176. package/lib/src/ServicesConfig.js +0 -50
  177. package/lib/src/ServicesContainer.d.ts +0 -14
  178. package/lib/src/ServicesContainer.js +0 -87
  179. package/lib/src/Utils/GenerationUtils.d.ts +0 -5
  180. package/lib/src/Utils/GenerationUtils.js +0 -36
  181. package/lib/src/Utils/InputValidation.d.ts +0 -12
  182. package/lib/src/Utils/InputValidation.js +0 -72
  183. package/lib/src/Utils/Sha1.d.ts +0 -6
  184. package/lib/src/Utils/Sha1.js +0 -225
  185. package/lib/src/Utils/StringUtils.d.ts +0 -6
  186. package/lib/src/Utils/StringUtils.js +0 -53
  187. package/lib/src/Utils/index.d.ts +0 -2
  188. package/lib/src/Utils/index.js +0 -14
  189. package/lib/src/index.d.ts +0 -11
  190. package/lib/src/index.js +0 -27
  191. package/lib/test/Data/TestCards.d.ts +0 -24
  192. package/lib/test/Data/TestCards.js +0 -232
  193. package/lib/test/Data/TestChecks.d.ts +0 -4
  194. package/lib/test/Data/TestChecks.js +0 -32
  195. package/lib/test/Data/index.d.ts +0 -2
  196. package/lib/test/Data/index.js +0 -14
  197. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.d.ts +0 -1
  198. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js +0 -112
  199. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.d.ts +0 -1
  200. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js +0 -483
  201. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.d.ts +0 -1
  202. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js +0 -83
  203. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.d.ts +0 -1
  204. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js +0 -1720
  205. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.d.ts +0 -1
  206. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js +0 -83
  207. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.d.ts +0 -1
  208. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js +0 -1757
  209. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.d.ts +0 -1
  210. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js +0 -682
  211. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.d.ts +0 -1
  212. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js +0 -2218
  213. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.d.ts +0 -1
  214. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js +0 -707
  215. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.d.ts +0 -1
  216. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js +0 -151
  217. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.d.ts +0 -1
  218. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js +0 -171
  219. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.d.ts +0 -1
  220. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js +0 -192
  221. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.d.ts +0 -1
  222. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js +0 -377
  223. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.d.ts +0 -1
  224. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js +0 -196
  225. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.d.ts +0 -1
  226. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js +0 -47
  227. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.d.ts +0 -1
  228. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.js +0 -100
  229. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.d.ts +0 -1
  230. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.js +0 -352
  231. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.d.ts +0 -1
  232. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.js +0 -123
  233. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.d.ts +0 -1
  234. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.js +0 -146
  235. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.d.ts +0 -39
  236. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/TestData/TestAccountData.js +0 -371
  237. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.d.ts +0 -1
  238. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.js +0 -100
  239. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.d.ts +0 -1
  240. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.js +0 -535
  241. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.d.ts +0 -1
  242. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.js +0 -124
  243. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.d.ts +0 -1
  244. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.js +0 -144
  245. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.d.ts +0 -33
  246. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestAccountData.js +0 -268
  247. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.d.ts +0 -4
  248. package/lib/test/Integration/Gateways/ProPayConnector/TestData/TestFundsData.js +0 -30
  249. package/lib/test/Integration/Gateways/RealexConnector/Certification/AuthTest.d.ts +0 -1
  250. package/lib/test/Integration/Gateways/RealexConnector/Certification/AuthTest.js +0 -4373
  251. package/lib/test/Integration/Gateways/RealexConnector/Certification/AvsTest.d.ts +0 -1
  252. package/lib/test/Integration/Gateways/RealexConnector/Certification/AvsTest.js +0 -758
  253. package/lib/test/Integration/Gateways/RealexConnector/Certification/CreditTest.d.ts +0 -1
  254. package/lib/test/Integration/Gateways/RealexConnector/Certification/CreditTest.js +0 -2399
  255. package/lib/test/Integration/Gateways/RealexConnector/Certification/HoldTest.d.ts +0 -1
  256. package/lib/test/Integration/Gateways/RealexConnector/Certification/HoldTest.js +0 -1656
  257. package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.d.ts +0 -1
  258. package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.js +0 -5650
  259. package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.d.ts +0 -1
  260. package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.js +0 -1985
  261. package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.d.ts +0 -1
  262. package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.js +0 -2369
  263. package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.d.ts +0 -1
  264. package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.js +0 -1703
  265. package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.d.ts +0 -1
  266. package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.js +0 -2053
  267. package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.d.ts +0 -1
  268. package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.js +0 -2469
  269. package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.d.ts +0 -1
  270. package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.js +0 -3116
  271. package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.d.ts +0 -1
  272. package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.js +0 -2031
  273. package/lib/test/Integration/Gateways/RealexConnector/CreditTest.d.ts +0 -1
  274. package/lib/test/Integration/Gateways/RealexConnector/CreditTest.js +0 -322
  275. package/lib/test/Integration/Gateways/RealexConnector/HppTest.d.ts +0 -1
  276. package/lib/test/Integration/Gateways/RealexConnector/HppTest.js +0 -98
  277. package/lib/test/Integration/Gateways/RealexConnector/RecurringTest.d.ts +0 -1
  278. package/lib/test/Integration/Gateways/RealexConnector/RecurringTest.js +0 -263
  279. package/lib/test/Integration/Services/CheckServiceTest.d.ts +0 -1
  280. package/lib/test/Integration/Services/CheckServiceTest.js +0 -98
  281. package/lib/test/Integration/Services/CreditServiceTest.d.ts +0 -1
  282. package/lib/test/Integration/Services/CreditServiceTest.js +0 -313
  283. package/lib/test/Integration/Services/DebitServiceTest.d.ts +0 -1
  284. package/lib/test/Integration/Services/DebitServiceTest.js +0 -154
  285. package/lib/test/Integration/Services/EBTServiceTest.d.ts +0 -1
  286. package/lib/test/Integration/Services/EBTServiceTest.js +0 -135
  287. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.d.ts +0 -1
  288. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js +0 -161
  289. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.d.ts +0 -1
  290. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js +0 -139
  291. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.d.ts +0 -1
  292. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js +0 -202
  293. package/lib/test/Unit/Gateways/RealexConnector/CreditTest.d.ts +0 -1
  294. package/lib/test/Unit/Gateways/RealexConnector/CreditTest.js +0 -29
  295. package/logger.txt +0 -483
@@ -1,377 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- var ava_1 = require("ava");
40
- var src_1 = require("../../../../src/");
41
- var config = new src_1.ServicesConfig();
42
- config.secretApiKey = "skapi_cert_MaePAQBr-1QAqjfckFC8FTbRTT120bVQUlfVOjgCBw";
43
- config.serviceUrl = "https://cert.api2-c.heartlandportico.com";
44
- var runSerially = false;
45
- var test = runSerially ? ava_1.default.serial : ava_1.default;
46
- var card = new src_1.GiftCard();
47
- card.number = "5022440000000000007";
48
- var track = new src_1.GiftCard();
49
- track.trackData =
50
- "%B5022440000000000098^^391200081613?;5022440000000000098=391200081613?";
51
- ava_1.default.before(function (_t) {
52
- src_1.ServicesContainer.configure(config);
53
- });
54
- test("gift create", function (t) { return __awaiter(void 0, void 0, void 0, function () {
55
- var newCard;
56
- return __generator(this, function (_a) {
57
- switch (_a.label) {
58
- case 0:
59
- t.plan(4);
60
- return [4 /*yield*/, src_1.GiftCard.create("2145550199")];
61
- case 1:
62
- newCard = _a.sent();
63
- t.truthy(newCard);
64
- t.truthy(newCard.number);
65
- t.truthy(newCard.alias);
66
- t.truthy(newCard.pin);
67
- return [2 /*return*/];
68
- }
69
- });
70
- }); });
71
- test("gift add alias", function (t) { return __awaiter(void 0, void 0, void 0, function () {
72
- var response;
73
- return __generator(this, function (_a) {
74
- switch (_a.label) {
75
- case 0:
76
- t.plan(2);
77
- return [4 /*yield*/, card.addAlias("2145550199").execute()];
78
- case 1:
79
- response = _a.sent();
80
- t.truthy(response);
81
- t.is(response.responseCode, "00", response.responseMessage);
82
- return [2 /*return*/];
83
- }
84
- });
85
- }); });
86
- test("gift add value", function (t) { return __awaiter(void 0, void 0, void 0, function () {
87
- var response;
88
- return __generator(this, function (_a) {
89
- switch (_a.label) {
90
- case 0:
91
- t.plan(2);
92
- return [4 /*yield*/, card
93
- .addValue(10)
94
- .withCurrency("USD")
95
- .execute()];
96
- case 1:
97
- response = _a.sent();
98
- t.truthy(response);
99
- t.is(response.responseCode, "00", response.responseMessage);
100
- return [2 /*return*/];
101
- }
102
- });
103
- }); });
104
- test("gift balance inquiry", function (t) { return __awaiter(void 0, void 0, void 0, function () {
105
- var response;
106
- return __generator(this, function (_a) {
107
- switch (_a.label) {
108
- case 0:
109
- t.plan(2);
110
- return [4 /*yield*/, card.balanceInquiry().execute()];
111
- case 1:
112
- response = _a.sent();
113
- t.truthy(response);
114
- t.is(response.responseCode, "00", response.responseMessage);
115
- return [2 /*return*/];
116
- }
117
- });
118
- }); });
119
- test("gift sale", function (t) { return __awaiter(void 0, void 0, void 0, function () {
120
- var response;
121
- return __generator(this, function (_a) {
122
- switch (_a.label) {
123
- case 0:
124
- t.plan(2);
125
- return [4 /*yield*/, card
126
- .charge(10)
127
- .withCurrency("USD")
128
- .execute()];
129
- case 1:
130
- response = _a.sent();
131
- t.truthy(response);
132
- t.is(response.responseCode, "00", response.responseMessage);
133
- return [2 /*return*/];
134
- }
135
- });
136
- }); });
137
- test("gift deactivate", function (t) { return __awaiter(void 0, void 0, void 0, function () {
138
- var response;
139
- return __generator(this, function (_a) {
140
- switch (_a.label) {
141
- case 0:
142
- t.plan(2);
143
- return [4 /*yield*/, card.deactivate().execute()];
144
- case 1:
145
- response = _a.sent();
146
- t.truthy(response);
147
- t.is(response.responseCode, "00", response.responseMessage);
148
- return [2 /*return*/];
149
- }
150
- });
151
- }); });
152
- test("gift remove alias", function (t) { return __awaiter(void 0, void 0, void 0, function () {
153
- var response;
154
- return __generator(this, function (_a) {
155
- switch (_a.label) {
156
- case 0:
157
- t.plan(2);
158
- return [4 /*yield*/, card.removeAlias("2145550199").execute()];
159
- case 1:
160
- response = _a.sent();
161
- t.truthy(response);
162
- t.is(response.responseCode, "00", response.responseMessage);
163
- return [2 /*return*/];
164
- }
165
- });
166
- }); });
167
- test("gift replace", function (t) { return __awaiter(void 0, void 0, void 0, function () {
168
- var response;
169
- return __generator(this, function (_a) {
170
- switch (_a.label) {
171
- case 0:
172
- t.plan(2);
173
- return [4 /*yield*/, card.replaceWith(track).execute()];
174
- case 1:
175
- response = _a.sent();
176
- t.truthy(response);
177
- t.is(response.responseCode, "00", response.responseMessage);
178
- return [2 /*return*/];
179
- }
180
- });
181
- }); });
182
- test("gift reverse", function (t) { return __awaiter(void 0, void 0, void 0, function () {
183
- var response;
184
- return __generator(this, function (_a) {
185
- switch (_a.label) {
186
- case 0:
187
- t.plan(2);
188
- return [4 /*yield*/, card.reverse(10).execute()];
189
- case 1:
190
- response = _a.sent();
191
- t.truthy(response);
192
- t.is(response.responseCode, "00", response.responseMessage);
193
- return [2 /*return*/];
194
- }
195
- });
196
- }); });
197
- test("gift rewards", function (t) { return __awaiter(void 0, void 0, void 0, function () {
198
- var response;
199
- return __generator(this, function (_a) {
200
- switch (_a.label) {
201
- case 0:
202
- t.plan(2);
203
- return [4 /*yield*/, card.rewards(10).execute()];
204
- case 1:
205
- response = _a.sent();
206
- t.truthy(response);
207
- t.is(response.responseCode, "00", response.responseMessage);
208
- return [2 /*return*/];
209
- }
210
- });
211
- }); });
212
- test("gift track add alias", function (t) { return __awaiter(void 0, void 0, void 0, function () {
213
- var response;
214
- return __generator(this, function (_a) {
215
- switch (_a.label) {
216
- case 0:
217
- t.plan(2);
218
- return [4 /*yield*/, track.addAlias("2145550199").execute()];
219
- case 1:
220
- response = _a.sent();
221
- t.truthy(response);
222
- t.is(response.responseCode, "00", response.responseMessage);
223
- return [2 /*return*/];
224
- }
225
- });
226
- }); });
227
- test("gift track add value", function (t) { return __awaiter(void 0, void 0, void 0, function () {
228
- var response;
229
- return __generator(this, function (_a) {
230
- switch (_a.label) {
231
- case 0:
232
- t.plan(2);
233
- return [4 /*yield*/, track
234
- .addValue(10)
235
- .withCurrency("USD")
236
- .execute()];
237
- case 1:
238
- response = _a.sent();
239
- t.truthy(response);
240
- t.is(response.responseCode, "00", response.responseMessage);
241
- return [2 /*return*/];
242
- }
243
- });
244
- }); });
245
- test("gift track balance inquiry", function (t) { return __awaiter(void 0, void 0, void 0, function () {
246
- var response;
247
- return __generator(this, function (_a) {
248
- switch (_a.label) {
249
- case 0:
250
- t.plan(2);
251
- return [4 /*yield*/, track.balanceInquiry().execute()];
252
- case 1:
253
- response = _a.sent();
254
- t.truthy(response);
255
- t.is(response.responseCode, "00", response.responseMessage);
256
- return [2 /*return*/];
257
- }
258
- });
259
- }); });
260
- test("gift track sale", function (t) { return __awaiter(void 0, void 0, void 0, function () {
261
- var response;
262
- return __generator(this, function (_a) {
263
- switch (_a.label) {
264
- case 0:
265
- t.plan(2);
266
- return [4 /*yield*/, track
267
- .charge(10)
268
- .withCurrency("USD")
269
- .execute()];
270
- case 1:
271
- response = _a.sent();
272
- t.truthy(response);
273
- t.is(response.responseCode, "00", response.responseMessage);
274
- return [2 /*return*/];
275
- }
276
- });
277
- }); });
278
- test("gift track deactivate", function (t) { return __awaiter(void 0, void 0, void 0, function () {
279
- var response;
280
- return __generator(this, function (_a) {
281
- switch (_a.label) {
282
- case 0:
283
- t.plan(2);
284
- return [4 /*yield*/, track.deactivate().execute()];
285
- case 1:
286
- response = _a.sent();
287
- t.truthy(response);
288
- t.is(response.responseCode, "00", response.responseMessage);
289
- return [2 /*return*/];
290
- }
291
- });
292
- }); });
293
- test("gift track remove alias", function (t) { return __awaiter(void 0, void 0, void 0, function () {
294
- var response;
295
- return __generator(this, function (_a) {
296
- switch (_a.label) {
297
- case 0:
298
- t.plan(2);
299
- return [4 /*yield*/, track.removeAlias("2145550199").execute()];
300
- case 1:
301
- response = _a.sent();
302
- t.truthy(response);
303
- t.is(response.responseCode, "00", response.responseMessage);
304
- return [2 /*return*/];
305
- }
306
- });
307
- }); });
308
- test("gift track replace", function (t) { return __awaiter(void 0, void 0, void 0, function () {
309
- var response;
310
- return __generator(this, function (_a) {
311
- switch (_a.label) {
312
- case 0:
313
- t.plan(2);
314
- return [4 /*yield*/, track.replaceWith(track).execute()];
315
- case 1:
316
- response = _a.sent();
317
- t.truthy(response);
318
- t.is(response.responseCode, "00", response.responseMessage);
319
- return [2 /*return*/];
320
- }
321
- });
322
- }); });
323
- test("gift track reverse", function (t) { return __awaiter(void 0, void 0, void 0, function () {
324
- var response;
325
- return __generator(this, function (_a) {
326
- switch (_a.label) {
327
- case 0:
328
- t.plan(2);
329
- return [4 /*yield*/, track.reverse(10).execute()];
330
- case 1:
331
- response = _a.sent();
332
- t.truthy(response);
333
- t.is(response.responseCode, "00", response.responseMessage);
334
- return [2 /*return*/];
335
- }
336
- });
337
- }); });
338
- test("gift track rewards", function (t) { return __awaiter(void 0, void 0, void 0, function () {
339
- var response;
340
- return __generator(this, function (_a) {
341
- switch (_a.label) {
342
- case 0:
343
- t.plan(2);
344
- return [4 /*yield*/, track.rewards(10).execute()];
345
- case 1:
346
- response = _a.sent();
347
- t.truthy(response);
348
- t.is(response.responseCode, "00", response.responseMessage);
349
- return [2 /*return*/];
350
- }
351
- });
352
- }); });
353
- test("gift reverse with transaction id", function (t) { return __awaiter(void 0, void 0, void 0, function () {
354
- var response, reverseResponse;
355
- return __generator(this, function (_a) {
356
- switch (_a.label) {
357
- case 0:
358
- t.plan(4);
359
- return [4 /*yield*/, card
360
- .charge(10)
361
- .withCurrency("USD")
362
- .execute()];
363
- case 1:
364
- response = _a.sent();
365
- t.truthy(response);
366
- t.is(response.responseCode, "00", response.responseMessage);
367
- return [4 /*yield*/, src_1.Transaction.fromId(response.transactionId, src_1.PaymentMethodType.Gift)
368
- .reverse(10)
369
- .execute()];
370
- case 2:
371
- reverseResponse = _a.sent();
372
- t.truthy(reverseResponse);
373
- t.is(reverseResponse.responseCode, "00", reverseResponse.responseMessage);
374
- return [2 /*return*/];
375
- }
376
- });
377
- }); });
@@ -1,196 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- var ava_1 = require("ava");
40
- var src_1 = require("../../../../src/");
41
- var timeForId = new Date().getTime();
42
- ava_1.default("allow 5-part credentials", function (t) {
43
- var c = new src_1.ServicesConfig();
44
- c.username = "123456789";
45
- c.password = "$Test1234";
46
- c.siteId = "12345";
47
- c.deviceId = "123456";
48
- c.licenseId = "12345";
49
- c.serviceUrl = "https://cert.api2-c.heartlandportico.com";
50
- src_1.ServicesContainer.configure(c);
51
- t.truthy(true);
52
- });
53
- ava_1.default("make PayPlan customer", function (t) { return __awaiter(void 0, void 0, void 0, function () {
54
- var customer, createdCustomer;
55
- return __generator(this, function (_a) {
56
- switch (_a.label) {
57
- case 0:
58
- t.plan(1);
59
- handleAuth();
60
- customer = new src_1.Customer();
61
- customer.id = "Customer" + timeForId;
62
- customer.firstName = "John";
63
- customer.lastName = "Doe";
64
- customer.status = "Active";
65
- customer.email = "john.doe@email.com";
66
- customer.address = new src_1.Address();
67
- customer.address.streetAddress1 = "123 Main St.";
68
- customer.address.city = "Dallas";
69
- customer.address.state = "TX";
70
- customer.address.postalCode = "98765";
71
- customer.address.country = "USA";
72
- customer.workPhone = "5551112222";
73
- return [4 /*yield*/, customer.create()];
74
- case 1:
75
- createdCustomer = _a.sent();
76
- t.truthy(createdCustomer);
77
- return [2 /*return*/];
78
- }
79
- });
80
- }); });
81
- ava_1.default("attach CC payment method to customer", function (t) { return __awaiter(void 0, void 0, void 0, function () {
82
- var foundCustomer, card, ccPaymentMethod;
83
- return __generator(this, function (_a) {
84
- switch (_a.label) {
85
- case 0:
86
- t.plan(2);
87
- handleAuth();
88
- return [4 /*yield*/, src_1.Customer.find("Customer" + timeForId)];
89
- case 1:
90
- foundCustomer = _a.sent();
91
- t.truthy(foundCustomer);
92
- card = new src_1.CreditCardData();
93
- card.number = "4111111111111111";
94
- card.expMonth = "12";
95
- card.expYear = "2025";
96
- card.cvn = "123";
97
- return [4 /*yield*/, foundCustomer
98
- .addPaymentMethod("Payment" + timeForId, card)
99
- .create()];
100
- case 2:
101
- ccPaymentMethod = _a.sent();
102
- t.truthy(ccPaymentMethod);
103
- return [2 /*return*/];
104
- }
105
- });
106
- }); });
107
- ava_1.default("attach payment schedule to customer", function (t) { return __awaiter(void 0, void 0, void 0, function () {
108
- var foundCcPaymentMethod, paymentSchedule;
109
- return __generator(this, function (_a) {
110
- switch (_a.label) {
111
- case 0:
112
- t.plan(2);
113
- handleAuth();
114
- return [4 /*yield*/, src_1.RecurringPaymentMethod.find("Payment" + timeForId)];
115
- case 1:
116
- foundCcPaymentMethod = _a.sent();
117
- t.truthy(foundCcPaymentMethod);
118
- return [4 /*yield*/, foundCcPaymentMethod
119
- .addSchedule("Schedule" + timeForId)
120
- .withStartDate(new Date(2027, 1, 1))
121
- .withAmount(30.01)
122
- .withFrequency(src_1.ScheduleFrequency.Weekly)
123
- .withReprocessingCount(1)
124
- .withStatus("Active")
125
- .withEmailReceipt(src_1.EmailReceipt.Never)
126
- .create()];
127
- case 2:
128
- paymentSchedule = _a.sent();
129
- t.truthy(paymentSchedule);
130
- return [2 /*return*/];
131
- }
132
- });
133
- }); });
134
- ava_1.default("edit/deactivate the schedule from above test", function (t) { return __awaiter(void 0, void 0, void 0, function () {
135
- var foundSchedule;
136
- return __generator(this, function (_a) {
137
- switch (_a.label) {
138
- case 0:
139
- t.plan(2);
140
- handleAuth();
141
- return [4 /*yield*/, src_1.Schedule.find("Schedule" + timeForId)];
142
- case 1:
143
- foundSchedule = _a.sent();
144
- t.truthy(foundSchedule);
145
- foundSchedule.status = "Inactive";
146
- t.truthy(foundSchedule.saveChanges());
147
- return [2 /*return*/];
148
- }
149
- });
150
- }); });
151
- ava_1.default("find and charge payment method", function (t) { return __awaiter(void 0, void 0, void 0, function () {
152
- var foundCcPaymentMethod, chargeResponse;
153
- return __generator(this, function (_a) {
154
- switch (_a.label) {
155
- case 0:
156
- t.plan(1);
157
- handleAuth();
158
- return [4 /*yield*/, src_1.RecurringPaymentMethod.find("Payment" + timeForId)];
159
- case 1:
160
- foundCcPaymentMethod = _a.sent();
161
- return [4 /*yield*/, foundCcPaymentMethod.charge(12.34)
162
- .withCurrency("USD")
163
- .execute()];
164
- case 2:
165
- chargeResponse = _a.sent();
166
- t.true(chargeResponse.responseCode == '00');
167
- return [2 /*return*/];
168
- }
169
- });
170
- }); });
171
- ava_1.default("find transactions from this new payment method", function (t) { return __awaiter(void 0, void 0, void 0, function () {
172
- var foundCcPaymentMethod, foundTransactions;
173
- return __generator(this, function (_a) {
174
- switch (_a.label) {
175
- case 0:
176
- t.plan(1);
177
- handleAuth();
178
- return [4 /*yield*/, src_1.RecurringPaymentMethod.find("Payment" + timeForId)];
179
- case 1:
180
- foundCcPaymentMethod = _a.sent();
181
- return [4 /*yield*/, src_1.ReportingService.findTransactions()
182
- .where("PaymentMethodKey", foundCcPaymentMethod.key)
183
- .execute()];
184
- case 2:
185
- foundTransactions = _a.sent();
186
- t.true(foundTransactions.length === 2); // one transaction was the CreditAccountVerify from creating the payment method
187
- return [2 /*return*/];
188
- }
189
- });
190
- }); });
191
- function handleAuth() {
192
- var config = new src_1.ServicesConfig();
193
- config.secretApiKey = "skapi_cert_MXvdAQB61V4AkyM-x3EJuY6hkEaCzaMimTWav7mVfQ";
194
- config.serviceUrl = "https://cert.api2.heartlandportico.com";
195
- src_1.ServicesContainer.configure(config);
196
- }
@@ -1,47 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var ava_1 = require("ava");
4
- var src_1 = require("../../../../src/");
5
- var config = new src_1.ServicesConfig();
6
- config.secretApiKey = "skapi_cert_MTeSAQAfG1UA9qQDrzl-kz4toXvARyieptFwSKP24w";
7
- config.serviceUrl = "https://cert.api2-c.heartlandportico.com";
8
- ava_1.default.before(function (_t) {
9
- src_1.ServicesContainer.configure(config);
10
- });
11
- ava_1.default("report activity", function (t) {
12
- t.plan(2);
13
- var start = new Date(Date.now());
14
- start.setDate(start.getDate() - 7);
15
- var end = new Date(Date.now());
16
- return src_1.ReportingService.activity()
17
- .withStartDate(start)
18
- .withEndDate(end)
19
- .execute()
20
- .then(function (activity) {
21
- t.truthy(activity);
22
- t.true(activity.length > 0);
23
- });
24
- });
25
- ava_1.default("report transaction detail", function (t) {
26
- t.plan(3);
27
- var start = new Date(Date.now());
28
- start.setDate(start.getDate() - 7);
29
- var end = new Date(Date.now());
30
- return src_1.ReportingService.activity()
31
- .withStartDate(start)
32
- .withEndDate(end)
33
- .execute()
34
- .then(function (activity) {
35
- t.truthy(activity);
36
- if (activity.length > 0) {
37
- return src_1.ReportingService.transactionDetail(activity[0].transactionId)
38
- .execute()
39
- .then(function (detail) {
40
- t.truthy(detail);
41
- t.is(detail.gatewayResponseCode, "00");
42
- });
43
- }
44
- t.plan(1);
45
- return Promise.resolve();
46
- });
47
- });