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,43 +0,0 @@
1
- import { AccountType, Address, CheckType, Customer, IPaymentMethod, IRecurringEntity, IRecurringService, RecurringBuilder, RecurringPaymentMethod, Schedule, TransactionType } from "../";
2
- import { RestGateway } from "./RestGateway";
3
- export declare class PayPlanConnector extends RestGateway implements IRecurringService {
4
- supportsRetrieval: boolean;
5
- supportsUpdatePaymentDetails: boolean;
6
- private _secretApiKey;
7
- siteId: string;
8
- licenseId: string;
9
- deviceId: string;
10
- private _username;
11
- private _password;
12
- developerId: string;
13
- versionNumber: string;
14
- get secretApiKey(): string;
15
- set secretApiKey(value: string);
16
- get username(): string;
17
- set username(value: string);
18
- get password(): string;
19
- set password(value: string);
20
- processRecurring<T extends IRecurringEntity>(builder: RecurringBuilder<T>): Promise<T>;
21
- protected mapResponse<T extends IRecurringEntity>(builder: RecurringBuilder<T>, rawResponse: string): T;
22
- log(text: string): void;
23
- protected buildCustomer(request: any, entity: Customer): any;
24
- protected buildPaymentMethod(request: any, entity: RecurringPaymentMethod, transactionType: TransactionType): any;
25
- protected buildSchedule(request: any, entity: Schedule, transactionType: TransactionType): any;
26
- protected prepareAccountType(type: AccountType): "Savings" | "Checking";
27
- protected prepareCheckType(type: CheckType): "Business" | "Payroll" | "Personal";
28
- protected buildAddress(request: any, address: Address): any;
29
- protected buildAmount(request: any, name: string, amount: number | string, currency: string, transactionType: TransactionType): any;
30
- protected buildDate(request: any, name: string, date: Date, force?: boolean): any;
31
- protected mapMethod(transactionType: TransactionType): "POST" | "PUT" | "DELETE" | "GET";
32
- protected mapUrl<T extends IRecurringEntity>(builder: RecurringBuilder<T>): string;
33
- protected hydrateCustomer(response: any): Customer;
34
- protected hydrateRecurringPaymentMethod(response: any): RecurringPaymentMethod;
35
- protected hydrateSchedule(response: any): Schedule;
36
- protected hasToken(paymentMethod: IPaymentMethod): {
37
- hasToken: boolean;
38
- tokenValue: string;
39
- };
40
- protected setAuthorizationHeader(value: string): void;
41
- protected maybeSetIdentityHeader(): void;
42
- protected maybeSetIntegrationHeader(): void;
43
- }
@@ -1,564 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.PayPlanConnector = void 0;
19
- var __1 = require("../");
20
- var RestGateway_1 = require("./RestGateway");
21
- var fs = require("fs");
22
- var PayPlanConnector = /** @class */ (function (_super) {
23
- __extends(PayPlanConnector, _super);
24
- function PayPlanConnector() {
25
- var _this = _super !== null && _super.apply(this, arguments) || this;
26
- _this.supportsRetrieval = true;
27
- _this.supportsUpdatePaymentDetails = false;
28
- return _this;
29
- }
30
- Object.defineProperty(PayPlanConnector.prototype, "secretApiKey", {
31
- get: function () {
32
- return this._secretApiKey;
33
- },
34
- set: function (value) {
35
- if (!value) {
36
- return;
37
- }
38
- this._secretApiKey = value;
39
- this.setAuthorizationHeader(this.secretApiKey);
40
- },
41
- enumerable: false,
42
- configurable: true
43
- });
44
- Object.defineProperty(PayPlanConnector.prototype, "username", {
45
- get: function () {
46
- return this._username;
47
- },
48
- set: function (value) {
49
- if (!value) {
50
- return;
51
- }
52
- this._username = value;
53
- this.setAuthorizationHeader(this.username + ":" + this.password);
54
- },
55
- enumerable: false,
56
- configurable: true
57
- });
58
- Object.defineProperty(PayPlanConnector.prototype, "password", {
59
- get: function () {
60
- return this._password;
61
- },
62
- set: function (value) {
63
- if (!value) {
64
- return;
65
- }
66
- this._password = value;
67
- this.setAuthorizationHeader(this.username + ":" + this.password);
68
- },
69
- enumerable: false,
70
- configurable: true
71
- });
72
- PayPlanConnector.prototype.processRecurring = function (builder) {
73
- var _this = this;
74
- var request = new Object();
75
- // todo
76
- if (builder.transactionType === __1.TransactionType.Create ||
77
- builder.transactionType === __1.TransactionType.Edit) {
78
- if (builder.entity instanceof __1.Customer) {
79
- request = this.buildCustomer(request, builder.entity);
80
- }
81
- if (builder.entity instanceof __1.RecurringPaymentMethod) {
82
- request = this.buildPaymentMethod(request, builder.entity, builder.transactionType);
83
- }
84
- if (builder.entity instanceof __1.Schedule) {
85
- request = this.buildSchedule(request, builder.entity, builder.transactionType);
86
- }
87
- }
88
- else if (builder.transactionType === __1.TransactionType.Search) {
89
- for (var entry in builder.searchCriteria) {
90
- if (builder.searchCriteria.hasOwnProperty(entry)) {
91
- request[entry] = builder.searchCriteria[entry];
92
- }
93
- }
94
- }
95
- this.maybeSetIdentityHeader();
96
- this.maybeSetIntegrationHeader();
97
- return this.doTransaction(this.mapMethod(builder.transactionType), this.mapUrl(builder), JSON.stringify(request)).then(function (response) {
98
- return _this.mapResponse(builder, response);
99
- });
100
- };
101
- PayPlanConnector.prototype.mapResponse = function (builder, rawResponse) {
102
- var _this = this;
103
- if (!rawResponse) {
104
- this.log(rawResponse);
105
- return new Object();
106
- }
107
- var response = JSON.parse(rawResponse);
108
- this.log(response);
109
- var result;
110
- if ((builder.entity instanceof __1.Customer || builder.entity.name === 'Customer') &&
111
- builder.transactionType === __1.TransactionType.Search) {
112
- result = response.results.map(function (customer) {
113
- return _this.hydrateCustomer(customer);
114
- });
115
- }
116
- else if (builder.entity instanceof __1.Customer) {
117
- result = this.hydrateCustomer(response);
118
- }
119
- if ((builder.entity instanceof __1.RecurringPaymentMethod || builder.entity.name === 'RecurringPaymentMethod') &&
120
- builder.transactionType === __1.TransactionType.Search) {
121
- result = response.results.map(function (paymentMethod) {
122
- return _this.hydrateRecurringPaymentMethod(paymentMethod);
123
- });
124
- }
125
- else if (builder.entity instanceof __1.RecurringPaymentMethod) {
126
- result = this.hydrateRecurringPaymentMethod(response);
127
- }
128
- if ((builder.entity instanceof __1.Schedule || builder.entity.name === 'Schedule') &&
129
- builder.transactionType === __1.TransactionType.Search) {
130
- result = response.results.map(function (schedule) {
131
- return _this.hydrateSchedule(schedule);
132
- });
133
- }
134
- else if (builder.entity instanceof __1.Schedule) {
135
- result = this.hydrateSchedule(response);
136
- }
137
- return result;
138
- };
139
- PayPlanConnector.prototype.log = function (text) {
140
- fs.appendFile('loggerResponse.txt', text + '\n', function (err) {
141
- if (err)
142
- throw err;
143
- });
144
- };
145
- ;
146
- PayPlanConnector.prototype.buildCustomer = function (request, entity) {
147
- if (entity) {
148
- request.customerIdentifier = entity.id;
149
- request.firstName = entity.firstName;
150
- request.lastName = entity.lastName;
151
- request.company = entity.company;
152
- request.customerStatus = entity.status;
153
- request.primaryEmail = entity.email;
154
- request.phoneDay = entity.homePhone;
155
- request.phoneEvening = entity.workPhone;
156
- request.phoneMobile = entity.mobilePhone;
157
- request.fax = entity.fax;
158
- request.title = entity.title;
159
- request.department = entity.department;
160
- request = this.buildAddress(request, entity.address);
161
- }
162
- return request;
163
- };
164
- PayPlanConnector.prototype.buildPaymentMethod = function (request, entity, transactionType) {
165
- if (entity) {
166
- request.preferredPayment = entity.preferredPayment;
167
- request.paymentMethodIdentifier = entity.id;
168
- request.customerKey = entity.customerKey;
169
- request.nameOnAccount = entity.nameOnAccount;
170
- request = this.buildAddress(request, entity.address);
171
- if (transactionType === __1.TransactionType.Create) {
172
- var _a = this.hasToken(entity.paymentMethod), hasToken = _a.hasToken, tokenValue = _a.tokenValue;
173
- var paymentInfo = {};
174
- if (entity.paymentMethod.isCardData) {
175
- var method = entity.paymentMethod;
176
- paymentInfo.type = hasToken ? "SINGLEUSETOKEN" : null;
177
- paymentInfo[hasToken ? "token" : "number"] = hasToken
178
- ? tokenValue
179
- : method.number;
180
- paymentInfo.expMon = method.expMonth;
181
- paymentInfo.expYear = method.expYear;
182
- request.cardVerificationValue = method.cvn;
183
- request[hasToken ? "alternateIdentity" : "card"] = paymentInfo;
184
- }
185
- else if (entity.paymentMethod.isTrackData) {
186
- var method = entity.paymentMethod;
187
- paymentInfo.data = method.value;
188
- paymentInfo.dataEntryMode = method.entryMethod
189
- .toString()
190
- .toUpperCase();
191
- request.track = paymentInfo;
192
- }
193
- else if (entity.paymentMethod instanceof __1.ECheck) {
194
- var check = entity.paymentMethod;
195
- request.achType = this.prepareAccountType(check.accountType);
196
- request.accountType = this.prepareCheckType(check.checkType);
197
- request.telephoneIndicator =
198
- check.secCode === __1.SecCode.CCD || check.SecCode === __1.SecCode.PPD
199
- ? false
200
- : true;
201
- request.routingNumber = check.routingNumber;
202
- request.accountNumber = check.accountNumber;
203
- request.accountHolderYob = check.birthYear.toString();
204
- request.driversLicenseState = check.driversLicenseState;
205
- request.driversLicenseNumber = check.driversLicenseNumber;
206
- request.socialSecurityNumberLast4 = check.ssnLast4;
207
- delete request.country;
208
- }
209
- if (entity.paymentMethod.isEncryptable) {
210
- var enc = entity.paymentMethod
211
- .encryptionData;
212
- if (enc) {
213
- paymentInfo.trackNumber = enc.trackNumber;
214
- paymentInfo.key = enc.ktb;
215
- paymentInfo.encryptionType = "E3";
216
- }
217
- }
218
- }
219
- else {
220
- // edit fields
221
- delete request.customerKey;
222
- request.paymentStatus = entity.status;
223
- request.cpcTaxType = entity.taxType;
224
- request.expirationDate = entity.expirationDate;
225
- }
226
- }
227
- return request;
228
- };
229
- PayPlanConnector.prototype.buildSchedule = function (request, entity, transactionType) {
230
- var mapDuration = function () {
231
- if (entity.numberOfPayments) {
232
- return "Limited Number";
233
- }
234
- else if (entity.endDate) {
235
- return "End Date";
236
- }
237
- else {
238
- return "Ongoing";
239
- }
240
- };
241
- var mapProcessingDate = function () {
242
- var frequencies = [
243
- "Monthly",
244
- "Bi-Monthly",
245
- "Quarterly",
246
- "Semi-Annually",
247
- ];
248
- if (entity.frequency &&
249
- frequencies.indexOf(entity.frequency.toString()) !== -1) {
250
- switch (entity.paymentSchedule) {
251
- case __1.PaymentSchedule.FirstDayOfTheMonth:
252
- return "First";
253
- case __1.PaymentSchedule.LastDayOfTheMonth:
254
- return "Last";
255
- default:
256
- var day = entity.startDate.getUTCDate();
257
- if (day > 28) {
258
- return "Last";
259
- }
260
- return day.toString();
261
- }
262
- }
263
- else if (entity.frequency &&
264
- entity.frequency.toString() === "Semi-Monthly") {
265
- if (entity.paymentSchedule === __1.PaymentSchedule.LastDayOfTheMonth) {
266
- return "Last";
267
- }
268
- return "First";
269
- }
270
- return null;
271
- };
272
- if (entity) {
273
- request.scheduleIdentifier = entity.id;
274
- request.scheduleName = entity.name;
275
- request.scheduleStatus = entity.status;
276
- request.paymentMethodKey = entity.paymentKey;
277
- request = this.buildAmount(request, "subtotalAmount", entity.amount, entity.currency, transactionType);
278
- request = this.buildAmount(request, "taxAmount", entity.taxAmount, entity.currency, transactionType);
279
- request.deviceId = entity.deviceId;
280
- request.processingDateInfo = mapProcessingDate();
281
- request = this.buildDate(request, "endDate", entity.endDate, transactionType === __1.TransactionType.Edit);
282
- request.reprocessingCount = entity.reprocessingCount || 3;
283
- if (entity.emailReceipt) {
284
- request.emailReceipt = entity.emailReceipt.toString();
285
- }
286
- request.emailAdvanceNotice = entity.emailNotification ? "Yes" : "No";
287
- // debt repay ind
288
- request.invoiceNbr = entity.invoiceNumber;
289
- request.poNumber = entity.poNumber;
290
- request.description = entity.description;
291
- request.numberOfPayments = entity.numberOfPayments;
292
- if (transactionType === __1.TransactionType.Create) {
293
- request.customerKey = entity.customerKey;
294
- request = this.buildDate(request, "startDate", entity.startDate);
295
- if (entity.frequency) {
296
- request.frequency = entity.frequency.toString();
297
- }
298
- request.duration = mapDuration();
299
- }
300
- else {
301
- // edit Fields
302
- if (!entity.hasStarted) {
303
- request = this.buildDate(request, "startDate", entity.startDate);
304
- if (entity.frequency) {
305
- request.frequency = entity.frequency.toString();
306
- }
307
- request.duration = mapDuration();
308
- }
309
- else {
310
- request = this.buildDate(request, "cancellationDate", entity.cancellationDate);
311
- request = this.buildDate(request, "nextProcressingDate", entity.nextProcessingDate);
312
- }
313
- }
314
- }
315
- return request;
316
- };
317
- PayPlanConnector.prototype.prepareAccountType = function (type) {
318
- switch (type) {
319
- case __1.AccountType.Savings:
320
- return "Savings";
321
- case __1.AccountType.Checking:
322
- default:
323
- return "Checking";
324
- }
325
- };
326
- PayPlanConnector.prototype.prepareCheckType = function (type) {
327
- switch (type) {
328
- case __1.CheckType.Business:
329
- return "Business";
330
- case __1.CheckType.Payroll:
331
- return "Payroll";
332
- case __1.CheckType.Personal:
333
- default:
334
- return "Personal";
335
- }
336
- };
337
- PayPlanConnector.prototype.buildAddress = function (request, address) {
338
- if (address) {
339
- request.addressLine1 = address.streetAddress1;
340
- request.addressLine2 = address.streetAddress2;
341
- request.city = address.city;
342
- request.country = address.country;
343
- request.stateProvince = address.state;
344
- request.zipPostalCode = address.postalCode;
345
- }
346
- return request;
347
- };
348
- PayPlanConnector.prototype.buildAmount = function (request, name, amount, currency, transactionType) {
349
- if (amount) {
350
- request[name] = {
351
- value: parseFloat(amount.toString()) * 100,
352
- };
353
- if (transactionType === __1.TransactionType.Create) {
354
- request[name].currency = currency;
355
- }
356
- }
357
- return request;
358
- };
359
- PayPlanConnector.prototype.buildDate = function (request, name, date, force) {
360
- if (force === void 0) { force = false; }
361
- var getDateValue = function (d) {
362
- if (typeof (date) === 'string' && date.length === 8) {
363
- return d;
364
- }
365
- var day = __1.StringUtils.leftPad(d.getUTCDate().toString(), 2, "0");
366
- var month = __1.StringUtils.leftPad((d.getUTCMonth() + 1).toString(), 2, "0");
367
- var year = __1.StringUtils.leftPad(d.getUTCFullYear().toString(), 4, "0");
368
- return month + day + year;
369
- };
370
- if (date || force) {
371
- var value = date ? getDateValue(date) : null;
372
- request[name] = value;
373
- }
374
- return request;
375
- };
376
- PayPlanConnector.prototype.mapMethod = function (transactionType) {
377
- switch (transactionType) {
378
- case __1.TransactionType.Create:
379
- case __1.TransactionType.Search:
380
- return "POST";
381
- case __1.TransactionType.Edit:
382
- return "PUT";
383
- case __1.TransactionType.Delete:
384
- return "DELETE";
385
- default:
386
- return "GET";
387
- }
388
- };
389
- PayPlanConnector.prototype.mapUrl = function (builder) {
390
- var suffix = "";
391
- if (builder.transactionType === __1.TransactionType.Fetch ||
392
- builder.transactionType === __1.TransactionType.Delete ||
393
- builder.transactionType === __1.TransactionType.Edit) {
394
- suffix = "/" + builder.entity.key;
395
- }
396
- if (builder.entity instanceof __1.Customer || builder.entity.name === 'Customer') {
397
- return ((builder.transactionType === __1.TransactionType.Search
398
- ? "searchCustomers"
399
- : "customers") + suffix);
400
- }
401
- if (builder.entity instanceof __1.RecurringPaymentMethod || builder.entity.name === 'RecurringPaymentMethod') {
402
- var paymentMethod = "";
403
- if (builder.transactionType === __1.TransactionType.Create) {
404
- paymentMethod =
405
- builder.entity.paymentMethod instanceof __1.Credit ? "CreditCard" : "ACH";
406
- }
407
- else if (builder.transactionType === __1.TransactionType.Edit) {
408
- paymentMethod = builder.entity.paymentType.replace(" ", "");
409
- }
410
- return ((builder.transactionType === __1.TransactionType.Search
411
- ? "searchPaymentMethods"
412
- : "paymentMethods") +
413
- paymentMethod +
414
- suffix);
415
- }
416
- if (builder.entity instanceof __1.Schedule || builder.entity.name === 'Schedule') {
417
- return ((builder.transactionType === __1.TransactionType.Search
418
- ? "searchSchedules"
419
- : "schedules") + suffix);
420
- }
421
- throw new __1.UnsupportedTransactionError();
422
- };
423
- PayPlanConnector.prototype.hydrateCustomer = function (response) {
424
- var customer = new __1.Customer();
425
- customer.key = response.customerKey;
426
- customer.id = response.customerIdentifier;
427
- customer.firstName = response.firstName;
428
- customer.lastName = response.lastName;
429
- customer.company = response.company;
430
- customer.status = response.customerStatus;
431
- customer.title = response.title;
432
- customer.department = response.department;
433
- customer.email = response.primaryEmail;
434
- customer.homePhone = response.phoneDay;
435
- customer.workPhone = response.phoneEvening;
436
- customer.mobilePhone = response.phoneMobile;
437
- customer.fax = response.fax;
438
- customer.address = new __1.Address();
439
- customer.address.streetAddress1 = response.addressLine1;
440
- customer.address.streetAddress2 = response.addressLine2;
441
- customer.address.city = response.city;
442
- customer.address.province = response.stateProvince;
443
- customer.address.postalCode = response.zipPostalCode;
444
- customer.address.country = response.country;
445
- return customer;
446
- };
447
- PayPlanConnector.prototype.hydrateRecurringPaymentMethod = function (response) {
448
- var paymentMethod = new __1.RecurringPaymentMethod();
449
- paymentMethod.key = response.paymentMethodKey;
450
- paymentMethod.paymentType = response.paymentMethodType;
451
- paymentMethod.preferredPayment = response.preferredPayment;
452
- paymentMethod.status = response.paymentStatus;
453
- paymentMethod.id = response.paymentMethodIdentifier;
454
- paymentMethod.customerKey = response.customerKey;
455
- paymentMethod.nameOnAccount = response.nameOnAccount;
456
- paymentMethod.commercialIndicator = response.cpcInd;
457
- paymentMethod.taxType = response.cpcTaxType;
458
- paymentMethod.expirationDate = response.expirationDate;
459
- paymentMethod.address = new __1.Address();
460
- paymentMethod.address.streetAddress1 = response.addressLine1;
461
- paymentMethod.address.streetAddress2 = response.addressLine2;
462
- paymentMethod.address.city = response.city;
463
- paymentMethod.address.state = response.stateProvince;
464
- paymentMethod.address.postalCode = response.zipPostalCode;
465
- paymentMethod.address.country = response.country;
466
- return paymentMethod;
467
- };
468
- PayPlanConnector.prototype.hydrateSchedule = function (response) {
469
- var schedule = new __1.Schedule();
470
- schedule.key = response.scheduleKey;
471
- schedule.id = response.scheduleIdentifier;
472
- schedule.customerKey = response.customerKey;
473
- schedule.name = response.scheduleName;
474
- schedule.status = response.scheduleStatus;
475
- schedule.paymentKey = response.paymentMethodKey;
476
- if (response.subtotalAmount) {
477
- var subtotal = response.subtotalAmount;
478
- schedule.amount = subtotal.value.slice(0, -2) + '.' + subtotal.value.slice(-2); // add the decimal back in
479
- schedule.currency = subtotal.currency;
480
- }
481
- if (response.taxAmount) {
482
- var taxAmount = response.taxAmount;
483
- schedule.taxAmount = taxAmount.value.slice(0, -2) + '.' + taxAmount.value.slice(-2); // add the decimal back in
484
- }
485
- schedule.deviceId = response.deviceId;
486
- schedule.startDate = response.startDate === "" ? null : response.startDate;
487
- schedule.paymentSchedule = (function (value) {
488
- switch (value) {
489
- case "Last":
490
- return __1.PaymentSchedule.LastDayOfTheMonth;
491
- case "First":
492
- return __1.PaymentSchedule.FirstDayOfTheMonth;
493
- default:
494
- return __1.PaymentSchedule.Dynamic;
495
- }
496
- })(response.processingDateInfo);
497
- schedule.frequency = response.frequency;
498
- schedule.endDate = response.endDate === "" ? null : response.endDate;
499
- schedule.reprocessingCount = response.reprocessingCount;
500
- schedule.emailReceipt = response.emailReceipt;
501
- schedule.emailNotification = (function (value) {
502
- if (!value) {
503
- return false;
504
- }
505
- return value === "No" ? false : true;
506
- })(response.emailNotification);
507
- // dept repay indicator
508
- schedule.invoiceNumber = response.invoiceNbr;
509
- schedule.poNumber = response.poNumber;
510
- schedule.description = response.description;
511
- // statusSetDate
512
- schedule.nextProcessingDate = response.nextProcessingDate === "" ? null : response.nextProcessingDate;
513
- // previousProcessingDate
514
- // approvedTransactionCount
515
- // failureCount
516
- // totalApprovedAmountToDate
517
- // numberOfPaymentsRemaining
518
- schedule.cancellationDate = response.cancellationDate === "" ? null : response.cancellationDate;
519
- // creationDate
520
- // lastChangeDate
521
- schedule.hasStarted = response.scheduleStarted;
522
- return schedule;
523
- };
524
- PayPlanConnector.prototype.hasToken = function (paymentMethod) {
525
- var tokenizable = paymentMethod;
526
- if (tokenizable.token) {
527
- return {
528
- hasToken: true,
529
- tokenValue: tokenizable.token,
530
- };
531
- }
532
- return {
533
- hasToken: false,
534
- tokenValue: "",
535
- };
536
- };
537
- PayPlanConnector.prototype.setAuthorizationHeader = function (value) {
538
- var buffer = (Buffer.from ? Buffer.from(value) : new Buffer(value));
539
- var auth = "Basic " + buffer.toString("base64");
540
- this.headers[RestGateway_1.RestGateway.AUTHORIZATION_HEADER] = auth;
541
- };
542
- PayPlanConnector.prototype.maybeSetIdentityHeader = function () {
543
- var identity = [];
544
- if (this.siteId) {
545
- identity.push("SiteID=" + this.siteId);
546
- }
547
- if (this.deviceId) {
548
- identity.push("DeviceID=" + this.deviceId);
549
- }
550
- if (this.licenseId) {
551
- identity.push("LicenseID=" + this.licenseId);
552
- }
553
- if (identity.length > 0) {
554
- this.headers['HPS-Identity'] = identity.join(',');
555
- }
556
- };
557
- PayPlanConnector.prototype.maybeSetIntegrationHeader = function () {
558
- if (this.versionNumber || this.developerId) {
559
- this.headers['HPS-Integration'] = "DeveloperId=" + this.developerId + ",VersionNbr=" + this.versionNumber;
560
- }
561
- };
562
- return PayPlanConnector;
563
- }(RestGateway_1.RestGateway));
564
- exports.PayPlanConnector = PayPlanConnector;
@@ -1,44 +0,0 @@
1
- import { Element } from "@azz/elementtree";
2
- import { AccountType, AuthorizationBuilder, CheckType, EntryMethod, InquiryType, IPaymentGateway, IPaymentMethod, ManagementBuilder, ReportBuilder, SecCode, TaxType, Transaction, TransactionBuilder, TransactionSummary } from "../";
3
- import { XmlGateway } from "./XmlGateway";
4
- export declare class PorticoConnector extends XmlGateway implements IPaymentGateway {
5
- protected static XmlNamespace: string;
6
- siteId: string;
7
- licenseId: string;
8
- deviceId: string;
9
- username: string;
10
- password: string;
11
- secretApiKey: string;
12
- developerId: string;
13
- versionNumber: string;
14
- sdkNameVersion: string;
15
- supportsHostedPayments: boolean;
16
- processAuthorization(builder: AuthorizationBuilder): Promise<Transaction>;
17
- serializeRequest(_builder: AuthorizationBuilder): string;
18
- manageTransaction(builder: ManagementBuilder): Promise<Transaction>;
19
- processReport<T>(builder: ReportBuilder<T>): Promise<T>;
20
- protected buildEnvelope(transaction: Element, clientTransactionId?: string): string;
21
- protected mapRequestType(builder: TransactionBuilder<Transaction>): string;
22
- protected mapReportRequestType<T>(builder: ReportBuilder<T>): string;
23
- protected mapResponse(rawResponse: string, builder: TransactionBuilder<Transaction>): Transaction;
24
- protected mapReportResponse<T>(rawResponse: string, builder: ReportBuilder<T>): T;
25
- protected normalizeResponse(input: string): string;
26
- protected hasToken(paymentMethod: IPaymentMethod): {
27
- hasToken: boolean;
28
- tokenValue: string;
29
- };
30
- protected hydrateAccountType(type: AccountType): "" | "CHECKING" | "SAVINGS";
31
- protected hydrateCheckType(type: CheckType): "" | "BUSINESS" | "PAYROLL" | "PERSONAL";
32
- protected hydrateCredentialOnFile(builder: AuthorizationBuilder): Element;
33
- protected hydrateEncryptionData(builder: TransactionBuilder<Transaction>): Element;
34
- protected hydrateEntryMethod(method: EntryMethod): "" | "Manual" | "Proximity" | "Swipe";
35
- protected hydrateHolder(builder: AuthorizationBuilder, isCheck: boolean): Element;
36
- protected hydrateInquiryType(type: InquiryType): "" | "CASH" | "FOODSTAMP" | "POINTS" | "STANDARD";
37
- protected hydrateManualEntry(block1: Element, builder: AuthorizationBuilder, hasToken: boolean, tokenValue: string): Element;
38
- protected hydrateSecCode(code: SecCode): "" | "CCD" | "PPD" | "POP" | "WEB" | "TEL" | "EBRONZE";
39
- protected hydrateTaxType(type: TaxType): "" | "NOTUSED" | "SALESTAX" | "TAXEXEMPT";
40
- protected hydrateTrackData(builder: TransactionBuilder<Transaction>, hasToken: boolean, tokenValue: string): Element;
41
- protected hydrateTransactionSummary(root: Element): TransactionSummary;
42
- protected shouldIncludeCredentialOnFile(builder: TransactionBuilder<Transaction>): boolean;
43
- protected isAppleOrGooglePay(paymentDataSource: string): boolean;
44
- }