globalpayments-api 1.4.8 → 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 (223) hide show
  1. package/CHANGELOG.md +11 -1
  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/RecurringBuilder.d.ts +0 -13
  16. package/lib/src/Builders/RecurringBuilder.js +0 -47
  17. package/lib/src/Builders/ReportBuilder.d.ts +0 -8
  18. package/lib/src/Builders/ReportBuilder.js +0 -36
  19. package/lib/src/Builders/TransactionBuilder.d.ts +0 -10
  20. package/lib/src/Builders/TransactionBuilder.js +0 -46
  21. package/lib/src/Builders/TransactionReportBuilder.d.ts +0 -15
  22. package/lib/src/Builders/TransactionReportBuilder.js +0 -79
  23. package/lib/src/Builders/index.d.ts +0 -7
  24. package/lib/src/Builders/index.js +0 -19
  25. package/lib/src/Entities/Address.d.ts +0 -13
  26. package/lib/src/Entities/Address.js +0 -19
  27. package/lib/src/Entities/BatchSummary.d.ts +0 -6
  28. package/lib/src/Entities/BatchSummary.js +0 -9
  29. package/lib/src/Entities/Customer.d.ts +0 -64
  30. package/lib/src/Entities/Customer.js +0 -47
  31. package/lib/src/Entities/EcommerceInfo.d.ts +0 -12
  32. package/lib/src/Entities/EcommerceInfo.js +0 -14
  33. package/lib/src/Entities/EncryptionData.d.ts +0 -6
  34. package/lib/src/Entities/EncryptionData.js +0 -9
  35. package/lib/src/Entities/Enums.d.ts +0 -230
  36. package/lib/src/Entities/Enums.js +0 -267
  37. package/lib/src/Entities/Errors.d.ts +0 -23
  38. package/lib/src/Entities/Errors.js +0 -106
  39. package/lib/src/Entities/HostedPaymentData.d.ts +0 -10
  40. package/lib/src/Entities/HostedPaymentData.js +0 -10
  41. package/lib/src/Entities/RecurringEntity.d.ts +0 -14
  42. package/lib/src/Entities/RecurringEntity.js +0 -86
  43. package/lib/src/Entities/Schedule.d.ts +0 -47
  44. package/lib/src/Entities/Schedule.js +0 -253
  45. package/lib/src/Entities/Transaction.d.ts +0 -76
  46. package/lib/src/Entities/Transaction.js +0 -108
  47. package/lib/src/Entities/TransactionSummary.d.ts +0 -61
  48. package/lib/src/Entities/TransactionSummary.js +0 -9
  49. package/lib/src/Entities/index.d.ts +0 -12
  50. package/lib/src/Entities/index.js +0 -24
  51. package/lib/src/Gateways/Gateway.d.ts +0 -10
  52. package/lib/src/Gateways/Gateway.js +0 -42
  53. package/lib/src/Gateways/IPaymentGateway.d.ts +0 -8
  54. package/lib/src/Gateways/IPaymentGateway.js +0 -2
  55. package/lib/src/Gateways/IRecurringService.d.ts +0 -6
  56. package/lib/src/Gateways/IRecurringService.js +0 -2
  57. package/lib/src/Gateways/PayPlanConnector.d.ts +0 -42
  58. package/lib/src/Gateways/PayPlanConnector.js +0 -552
  59. package/lib/src/Gateways/PorticoConnector.d.ts +0 -44
  60. package/lib/src/Gateways/PorticoConnector.js +0 -1018
  61. package/lib/src/Gateways/RealexConnector.d.ts +0 -30
  62. package/lib/src/Gateways/RealexConnector.js +0 -523
  63. package/lib/src/Gateways/RestGateway.d.ts +0 -6
  64. package/lib/src/Gateways/RestGateway.js +0 -31
  65. package/lib/src/Gateways/XmlGateway.d.ts +0 -6
  66. package/lib/src/Gateways/XmlGateway.js +0 -38
  67. package/lib/src/Gateways/https-wrapper.d.ts +0 -3
  68. package/lib/src/Gateways/https-wrapper.js +0 -35
  69. package/lib/src/Gateways/index.d.ts +0 -7
  70. package/lib/src/Gateways/index.js +0 -19
  71. package/lib/src/HostedPaymentConfig.d.ts +0 -12
  72. package/lib/src/HostedPaymentConfig.js +0 -9
  73. package/lib/src/PaymentMethods/Cash.d.ts +0 -8
  74. package/lib/src/PaymentMethods/Cash.js +0 -36
  75. package/lib/src/PaymentMethods/Credit.d.ts +0 -85
  76. package/lib/src/PaymentMethods/Credit.js +0 -106
  77. package/lib/src/PaymentMethods/CreditCardData.d.ts +0 -19
  78. package/lib/src/PaymentMethods/CreditCardData.js +0 -51
  79. package/lib/src/PaymentMethods/CreditTrackData.d.ts +0 -7
  80. package/lib/src/PaymentMethods/CreditTrackData.js +0 -27
  81. package/lib/src/PaymentMethods/Debit.d.ts +0 -40
  82. package/lib/src/PaymentMethods/Debit.js +0 -70
  83. package/lib/src/PaymentMethods/DebitTrackData.d.ts +0 -7
  84. package/lib/src/PaymentMethods/DebitTrackData.js +0 -27
  85. package/lib/src/PaymentMethods/EBT.d.ts +0 -48
  86. package/lib/src/PaymentMethods/EBT.js +0 -88
  87. package/lib/src/PaymentMethods/EBTCardData.d.ts +0 -16
  88. package/lib/src/PaymentMethods/EBTCardData.js +0 -32
  89. package/lib/src/PaymentMethods/EBTTrackData.d.ts +0 -8
  90. package/lib/src/PaymentMethods/EBTTrackData.js +0 -27
  91. package/lib/src/PaymentMethods/ECheck.d.ts +0 -32
  92. package/lib/src/PaymentMethods/ECheck.js +0 -40
  93. package/lib/src/PaymentMethods/GiftCard.d.ts +0 -131
  94. package/lib/src/PaymentMethods/GiftCard.js +0 -205
  95. package/lib/src/PaymentMethods/Interfaces.d.ts +0 -55
  96. package/lib/src/PaymentMethods/Interfaces.js +0 -2
  97. package/lib/src/PaymentMethods/PaymentMethod.d.ts +0 -19
  98. package/lib/src/PaymentMethods/PaymentMethod.js +0 -114
  99. package/lib/src/PaymentMethods/RecurringPaymentMethod.d.ts +0 -23
  100. package/lib/src/PaymentMethods/RecurringPaymentMethod.js +0 -77
  101. package/lib/src/PaymentMethods/TransactionReference.d.ts +0 -10
  102. package/lib/src/PaymentMethods/TransactionReference.js +0 -12
  103. package/lib/src/PaymentMethods/index.d.ts +0 -15
  104. package/lib/src/PaymentMethods/index.js +0 -27
  105. package/lib/src/Services/BatchService.d.ts +0 -4
  106. package/lib/src/Services/BatchService.js +0 -17
  107. package/lib/src/Services/CheckService.d.ts +0 -6
  108. package/lib/src/Services/CheckService.js +0 -20
  109. package/lib/src/Services/CreditService.d.ts +0 -12
  110. package/lib/src/Services/CreditService.js +0 -54
  111. package/lib/src/Services/DebitService.d.ts +0 -7
  112. package/lib/src/Services/DebitService.js +0 -28
  113. package/lib/src/Services/EBTService.d.ts +0 -8
  114. package/lib/src/Services/EBTService.js +0 -32
  115. package/lib/src/Services/GiftService.d.ts +0 -16
  116. package/lib/src/Services/GiftService.js +0 -54
  117. package/lib/src/Services/HostedService.d.ts +0 -9
  118. package/lib/src/Services/HostedService.js +0 -59
  119. package/lib/src/Services/RecurringService.d.ts +0 -8
  120. package/lib/src/Services/RecurringService.js +0 -27
  121. package/lib/src/Services/ReportingService.d.ts +0 -6
  122. package/lib/src/Services/ReportingService.js +0 -19
  123. package/lib/src/Services/index.d.ts +0 -9
  124. package/lib/src/Services/index.js +0 -21
  125. package/lib/src/ServicesConfig.d.ts +0 -23
  126. package/lib/src/ServicesConfig.js +0 -50
  127. package/lib/src/ServicesContainer.d.ts +0 -11
  128. package/lib/src/ServicesContainer.js +0 -73
  129. package/lib/src/Utils/GenerationUtils.d.ts +0 -5
  130. package/lib/src/Utils/GenerationUtils.js +0 -36
  131. package/lib/src/Utils/InputValidation.d.ts +0 -12
  132. package/lib/src/Utils/InputValidation.js +0 -72
  133. package/lib/src/Utils/Sha1.d.ts +0 -6
  134. package/lib/src/Utils/Sha1.js +0 -225
  135. package/lib/src/Utils/StringUtils.d.ts +0 -6
  136. package/lib/src/Utils/StringUtils.js +0 -53
  137. package/lib/src/Utils/index.d.ts +0 -2
  138. package/lib/src/Utils/index.js +0 -14
  139. package/lib/src/index.d.ts +0 -11
  140. package/lib/src/index.js +0 -27
  141. package/lib/test/Data/TestCards.d.ts +0 -24
  142. package/lib/test/Data/TestCards.js +0 -232
  143. package/lib/test/Data/TestChecks.d.ts +0 -4
  144. package/lib/test/Data/TestChecks.js +0 -32
  145. package/lib/test/Data/index.d.ts +0 -2
  146. package/lib/test/Data/index.js +0 -14
  147. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.d.ts +0 -1
  148. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js +0 -112
  149. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.d.ts +0 -1
  150. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js +0 -483
  151. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.d.ts +0 -1
  152. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js +0 -83
  153. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.d.ts +0 -1
  154. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js +0 -1720
  155. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.d.ts +0 -1
  156. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js +0 -83
  157. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.d.ts +0 -1
  158. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js +0 -1757
  159. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.d.ts +0 -1
  160. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js +0 -682
  161. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.d.ts +0 -1
  162. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js +0 -2218
  163. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.d.ts +0 -1
  164. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js +0 -708
  165. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.d.ts +0 -1
  166. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js +0 -151
  167. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.d.ts +0 -1
  168. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js +0 -171
  169. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.d.ts +0 -1
  170. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js +0 -192
  171. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.d.ts +0 -1
  172. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js +0 -377
  173. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.d.ts +0 -1
  174. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js +0 -196
  175. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.d.ts +0 -1
  176. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js +0 -47
  177. package/lib/test/Integration/Gateways/RealexConnector/Certification/AuthTest.d.ts +0 -1
  178. package/lib/test/Integration/Gateways/RealexConnector/Certification/AuthTest.js +0 -4373
  179. package/lib/test/Integration/Gateways/RealexConnector/Certification/AvsTest.d.ts +0 -1
  180. package/lib/test/Integration/Gateways/RealexConnector/Certification/AvsTest.js +0 -758
  181. package/lib/test/Integration/Gateways/RealexConnector/Certification/CreditTest.d.ts +0 -1
  182. package/lib/test/Integration/Gateways/RealexConnector/Certification/CreditTest.js +0 -2399
  183. package/lib/test/Integration/Gateways/RealexConnector/Certification/HoldTest.d.ts +0 -1
  184. package/lib/test/Integration/Gateways/RealexConnector/Certification/HoldTest.js +0 -1656
  185. package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.d.ts +0 -1
  186. package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.js +0 -5650
  187. package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.d.ts +0 -1
  188. package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.js +0 -1985
  189. package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.d.ts +0 -1
  190. package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.js +0 -2369
  191. package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.d.ts +0 -1
  192. package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.js +0 -1703
  193. package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.d.ts +0 -1
  194. package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.js +0 -2053
  195. package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.d.ts +0 -1
  196. package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.js +0 -2469
  197. package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.d.ts +0 -1
  198. package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.js +0 -3116
  199. package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.d.ts +0 -1
  200. package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.js +0 -2031
  201. package/lib/test/Integration/Gateways/RealexConnector/CreditTest.d.ts +0 -1
  202. package/lib/test/Integration/Gateways/RealexConnector/CreditTest.js +0 -322
  203. package/lib/test/Integration/Gateways/RealexConnector/HppTest.d.ts +0 -1
  204. package/lib/test/Integration/Gateways/RealexConnector/HppTest.js +0 -98
  205. package/lib/test/Integration/Gateways/RealexConnector/RecurringTest.d.ts +0 -1
  206. package/lib/test/Integration/Gateways/RealexConnector/RecurringTest.js +0 -263
  207. package/lib/test/Integration/Services/CheckServiceTest.d.ts +0 -1
  208. package/lib/test/Integration/Services/CheckServiceTest.js +0 -98
  209. package/lib/test/Integration/Services/CreditServiceTest.d.ts +0 -1
  210. package/lib/test/Integration/Services/CreditServiceTest.js +0 -313
  211. package/lib/test/Integration/Services/DebitServiceTest.d.ts +0 -1
  212. package/lib/test/Integration/Services/DebitServiceTest.js +0 -154
  213. package/lib/test/Integration/Services/EBTServiceTest.d.ts +0 -1
  214. package/lib/test/Integration/Services/EBTServiceTest.js +0 -135
  215. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.d.ts +0 -1
  216. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js +0 -161
  217. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.d.ts +0 -1
  218. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js +0 -139
  219. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.d.ts +0 -1
  220. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js +0 -202
  221. package/lib/test/Unit/Gateways/RealexConnector/CreditTest.d.ts +0 -1
  222. package/lib/test/Unit/Gateways/RealexConnector/CreditTest.js +0 -29
  223. package/logger.txt +0 -4
@@ -1,253 +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.Schedule = void 0;
19
- var _1 = require("./");
20
- var Schedule = /** @class */ (function (_super) {
21
- __extends(Schedule, _super);
22
- function Schedule(customerKey, paymentKey) {
23
- var _this = _super.call(this) || this;
24
- if (customerKey) {
25
- _this.customerKey = customerKey;
26
- }
27
- if (paymentKey) {
28
- _this.paymentKey = paymentKey;
29
- }
30
- return _this;
31
- }
32
- Object.defineProperty(Schedule.prototype, "totalAmount", {
33
- /// <summary>
34
- /// The total amount for the schedule (`Amount` + `TaxAmount`).
35
- /// </summary>
36
- get: function () {
37
- return (parseFloat(this.amount.toString()) + parseFloat(this.taxAmount.toString()));
38
- },
39
- enumerable: false,
40
- configurable: true
41
- });
42
- /// <summary>
43
- /// Sets the schedule's amount.
44
- /// </summary>
45
- /// <param name="value">The amount</param>
46
- /// <returns>Schedule</returns>
47
- Schedule.prototype.withAmount = function (value) {
48
- if (value) {
49
- this.amount = value;
50
- }
51
- return this;
52
- };
53
- /// <summary>
54
- /// Sets the schedule's currency.
55
- /// </summary>
56
- /// <param name="value">The currency</param>
57
- /// <returns>Schedule</returns>
58
- Schedule.prototype.withCurrency = function (value) {
59
- if (value) {
60
- this.currency = value;
61
- }
62
- return this;
63
- };
64
- /// <summary>
65
- /// Sets the schedule's customer.
66
- /// </summary>
67
- /// <param name="value">The customer's key</param>
68
- /// <returns>Schedule</returns>
69
- Schedule.prototype.withCustomerKey = function (value) {
70
- if (value) {
71
- this.customerKey = value;
72
- }
73
- return this;
74
- };
75
- /// <summary>
76
- /// Sets the schedule's description.
77
- /// </summary>
78
- /// <param name="value">The description</param>
79
- /// <returns>Schedule</returns>
80
- Schedule.prototype.withDescription = function (value) {
81
- if (value) {
82
- this.description = value;
83
- }
84
- return this;
85
- };
86
- /// <summary>
87
- /// Sets the schedule's device ID.
88
- /// </summary>
89
- /// <param name="value">The device ID</param>
90
- /// <returns>Schedule</returns>
91
- Schedule.prototype.withDeviceId = function (value) {
92
- if (value) {
93
- this.deviceId = value;
94
- }
95
- return this;
96
- };
97
- /// <summary>
98
- /// Sets whether the schedule should send email notifications.
99
- /// </summary>
100
- /// <param name="value">The email notification flag</param>
101
- /// <returns>Schedule</returns>
102
- Schedule.prototype.withEmailNotification = function (value) {
103
- if (value) {
104
- this.emailNotification = value;
105
- }
106
- return this;
107
- };
108
- /// <summary>
109
- /// Sets when the schedule should email receipts.
110
- /// </summary>
111
- /// <param name="value">When the schedule should email receipts</param>
112
- /// <returns>Schedule</returns>
113
- Schedule.prototype.withEmailReceipt = function (value) {
114
- if (value) {
115
- this.emailReceipt = value;
116
- }
117
- return this;
118
- };
119
- /// <summary>
120
- /// Sets the schedule's end date.
121
- /// </summary>
122
- /// <param name="value">The end date</param>
123
- /// <returns>Schedule</returns>
124
- Schedule.prototype.withEndDate = function (value) {
125
- if (value) {
126
- this.endDate = value;
127
- }
128
- return this;
129
- };
130
- /// <summary>
131
- /// Sets the schedule's frequency.
132
- /// </summary>
133
- /// <param name="value">The frequency</param>
134
- /// <returns>Schedule</returns>
135
- Schedule.prototype.withFrequency = function (value) {
136
- if (value) {
137
- this.frequency = value;
138
- }
139
- return this;
140
- };
141
- /// <summary>
142
- /// Sets the schedule's invoice number.
143
- /// </summary>
144
- /// <param name="value">The invoice number</param>
145
- /// <returns>Schedule</returns>
146
- Schedule.prototype.withInvoiceNumber = function (value) {
147
- if (value) {
148
- this.invoiceNumber = value;
149
- }
150
- return this;
151
- };
152
- /// <summary>
153
- /// Sets the schedule's name.
154
- /// </summary>
155
- /// <param name="value">The name</param>
156
- /// <returns>Schedule</returns>
157
- Schedule.prototype.withName = function (value) {
158
- if (value) {
159
- this.name = value;
160
- }
161
- return this;
162
- };
163
- /// <summary>
164
- /// Sets the schedule's number of payments.
165
- /// </summary>
166
- /// <param name="value">The number of payments</param>
167
- /// <returns>Schedule</returns>
168
- Schedule.prototype.withNumberOfPayments = function (value) {
169
- if (value) {
170
- this.numberOfPayments = value;
171
- }
172
- return this;
173
- };
174
- /// <summary>
175
- /// Sets the schedule's purchase order (PO) number.
176
- /// </summary>
177
- /// <param name="value">The purchase order (PO) number</param>
178
- /// <returns>Schedule</returns>
179
- Schedule.prototype.withPoNumber = function (value) {
180
- if (value) {
181
- this.poNumber = value;
182
- }
183
- return this;
184
- };
185
- /// <summary>
186
- /// Sets the schedule's payment method.
187
- /// </summary>
188
- /// <param name="value">The payment method's key</param>
189
- /// <returns>Schedule</returns>
190
- Schedule.prototype.withPaymentKey = function (value) {
191
- if (value) {
192
- this.paymentKey = value;
193
- }
194
- return this;
195
- };
196
- /// <summary>
197
- /// Sets the schedule's recurring schedule.
198
- /// </summary>
199
- /// <param name="value">The recurring schedule</param>
200
- /// <returns>Schedule</returns>
201
- Schedule.prototype.withPaymentSchedule = function (value) {
202
- if (value) {
203
- this.paymentSchedule = value;
204
- }
205
- return this;
206
- };
207
- /// <summary>
208
- /// Sets the schedule's reprocessing count.
209
- /// </summary>
210
- /// <param name="value">The reprocessing count</param>
211
- /// <returns>Schedule</returns>
212
- Schedule.prototype.withReprocessingCount = function (value) {
213
- if (value) {
214
- this.reprocessingCount = value;
215
- }
216
- return this;
217
- };
218
- /// <summary>
219
- /// Sets the schedule's start date.
220
- /// </summary>
221
- /// <param name="value">The start date</param>
222
- /// <returns>Schedule</returns>
223
- Schedule.prototype.withStartDate = function (value) {
224
- if (value) {
225
- this.startDate = value;
226
- }
227
- return this;
228
- };
229
- /// <summary>
230
- /// Sets the schedule's status.
231
- /// </summary>
232
- /// <param name="value">The new status</param>
233
- /// <returns>Schedule</returns>
234
- Schedule.prototype.withStatus = function (value) {
235
- if (value) {
236
- this.status = value;
237
- }
238
- return this;
239
- };
240
- /// <summary>
241
- /// Sets the schedule's tax amount.
242
- /// </summary>
243
- /// <param name="value">The tax amount</param>
244
- /// <returns>Schedule</returns>
245
- Schedule.prototype.withTaxAmount = function (value) {
246
- if (value) {
247
- this.taxAmount = value;
248
- }
249
- return this;
250
- };
251
- return Schedule;
252
- }(_1.RecurringEntity));
253
- exports.Schedule = Schedule;
@@ -1,76 +0,0 @@
1
- import { AuthorizationBuilder, GiftCard, ManagementBuilder, PaymentMethodType, TransactionReference } from "../";
2
- export declare class Transaction {
3
- authorizedAmount: string;
4
- balanceAmount: string;
5
- pointsBalanceAmount: string;
6
- cardBrandTransactionId: string;
7
- commercialIndicator: string;
8
- responseCode: string;
9
- responseMessage: string;
10
- transactionDescriptor: string;
11
- referenceNumber: string;
12
- recurringDataCode: string;
13
- cvnResponseMessage: string;
14
- cvnResponseCode: string;
15
- cavvResponseCode: string;
16
- cardLast4: string;
17
- cardType: string;
18
- avsResponseMessage: string;
19
- avsResponseCode: string;
20
- availableBalance: string;
21
- transactionReference: TransactionReference;
22
- token: string;
23
- giftCard: GiftCard;
24
- clientTransactionId: string;
25
- timestamp: string;
26
- batchId: string;
27
- batchSeqNbr: string;
28
- get transactionId(): string;
29
- static fromId(transactionId: string, orderId?: string | PaymentMethodType, paymentMethodType?: PaymentMethodType): Transaction;
30
- /**
31
- * Allows for a follow-up request to add an additional authorization
32
- *
33
- * @param string|number amount Amount to authorize
34
- *
35
- * @return AuthorizationBuilder
36
- */
37
- additionalAuth(amount?: string | number): AuthorizationBuilder;
38
- /**
39
- * Allows for a follow-up request to add the transaction to an open batch
40
- *
41
- * @param string|number amount Amount to capture
42
- *
43
- * @return ManagementBuilder
44
- */
45
- capture(amount?: string | number): ManagementBuilder;
46
- /**
47
- * Allows for a follow-up request to edit the transaction
48
- *
49
- * @return ManagementBuilder
50
- */
51
- edit(): ManagementBuilder;
52
- hold(): ManagementBuilder;
53
- /**
54
- * Allows for a follow-up request to refund the transaction
55
- *
56
- * @param string|number amount Amount to refund
57
- *
58
- * @return ManagementBuilder
59
- */
60
- refund(amount?: string | number): ManagementBuilder;
61
- release(): ManagementBuilder;
62
- /**
63
- * Allows for a follow-up request to reverse the transaction
64
- *
65
- * @param string|number amount Amount to reverse
66
- *
67
- * @return ManagementBuilder
68
- */
69
- reverse(amount?: string | number): ManagementBuilder;
70
- /**
71
- * Allows for a follow-up request to void the transaction
72
- *
73
- * @return ManagementBuilder
74
- */
75
- void(): ManagementBuilder;
76
- }
@@ -1,108 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Transaction = void 0;
4
- var __1 = require("../");
5
- var Transaction = /** @class */ (function () {
6
- function Transaction() {
7
- }
8
- Object.defineProperty(Transaction.prototype, "transactionId", {
9
- get: function () {
10
- return this.transactionReference.transactionId;
11
- },
12
- enumerable: false,
13
- configurable: true
14
- });
15
- Transaction.fromId = function (transactionId, orderId, paymentMethodType) {
16
- if (paymentMethodType === void 0) { paymentMethodType = __1.PaymentMethodType.Credit; }
17
- var transaction = new Transaction();
18
- transaction.transactionReference = new __1.TransactionReference();
19
- transaction.transactionReference.transactionId = transactionId;
20
- if (orderId &&
21
- (typeof orderId === "string" ||
22
- Object.prototype.toString.call(orderId) === "[object String]")) {
23
- transaction.transactionReference.orderId = orderId;
24
- }
25
- else if (orderId) {
26
- paymentMethodType = orderId;
27
- }
28
- transaction.transactionReference.paymentMethodType = paymentMethodType;
29
- return transaction;
30
- };
31
- /**
32
- * Allows for a follow-up request to add an additional authorization
33
- *
34
- * @param string|number amount Amount to authorize
35
- *
36
- * @return AuthorizationBuilder
37
- */
38
- Transaction.prototype.additionalAuth = function (amount) {
39
- return new __1.AuthorizationBuilder(__1.TransactionType.Auth)
40
- .withPaymentMethod(this.transactionReference)
41
- .withAmount(amount)
42
- .withModifier(__1.TransactionModifier.Additional);
43
- };
44
- /**
45
- * Allows for a follow-up request to add the transaction to an open batch
46
- *
47
- * @param string|number amount Amount to capture
48
- *
49
- * @return ManagementBuilder
50
- */
51
- Transaction.prototype.capture = function (amount) {
52
- return new __1.ManagementBuilder(__1.TransactionType.Capture)
53
- .withPaymentMethod(this.transactionReference)
54
- .withAmount(amount);
55
- };
56
- /**
57
- * Allows for a follow-up request to edit the transaction
58
- *
59
- * @return ManagementBuilder
60
- */
61
- Transaction.prototype.edit = function () {
62
- var builder = new __1.ManagementBuilder(__1.TransactionType.Edit).withPaymentMethod(this.transactionReference);
63
- if (this.commercialIndicator) {
64
- builder = builder.withModifier(__1.TransactionModifier.LevelII);
65
- }
66
- return builder;
67
- };
68
- Transaction.prototype.hold = function () {
69
- return new __1.ManagementBuilder(__1.TransactionType.Hold).withPaymentMethod(this.transactionReference);
70
- };
71
- /**
72
- * Allows for a follow-up request to refund the transaction
73
- *
74
- * @param string|number amount Amount to refund
75
- *
76
- * @return ManagementBuilder
77
- */
78
- Transaction.prototype.refund = function (amount) {
79
- return new __1.ManagementBuilder(__1.TransactionType.Refund)
80
- .withPaymentMethod(this.transactionReference)
81
- .withAmount(amount);
82
- };
83
- Transaction.prototype.release = function () {
84
- return new __1.ManagementBuilder(__1.TransactionType.Release).withPaymentMethod(this.transactionReference);
85
- };
86
- /**
87
- * Allows for a follow-up request to reverse the transaction
88
- *
89
- * @param string|number amount Amount to reverse
90
- *
91
- * @return ManagementBuilder
92
- */
93
- Transaction.prototype.reverse = function (amount) {
94
- return new __1.ManagementBuilder(__1.TransactionType.Reversal)
95
- .withPaymentMethod(this.transactionReference)
96
- .withAmount(amount);
97
- };
98
- /**
99
- * Allows for a follow-up request to void the transaction
100
- *
101
- * @return ManagementBuilder
102
- */
103
- Transaction.prototype.void = function () {
104
- return new __1.ManagementBuilder(__1.TransactionType.Void).withPaymentMethod(this.transactionReference);
105
- };
106
- return Transaction;
107
- }());
108
- exports.Transaction = Transaction;
@@ -1,61 +0,0 @@
1
- export declare class TransactionSummary {
2
- accountDataSource: string;
3
- amount: string;
4
- authCode: string;
5
- authorizedAmount: string;
6
- batchCloseDate: Date;
7
- batchSequenceNumber: string;
8
- cardSwiped: string;
9
- cardType: string;
10
- clerkId: string;
11
- clientTransactionId: string;
12
- convenienceAmt: string;
13
- deviceId: string;
14
- issuerResponseCode: string;
15
- issuerResponseMessage: string;
16
- issuerTransactionId: string;
17
- gatewayResponseCode: string;
18
- gatewayResponseMessage: string;
19
- gratuityAmount: string;
20
- maskedCardNumber: string;
21
- originalTransactionId: string;
22
- paymentType: string;
23
- poNumber: string;
24
- referenceNumber: string;
25
- responseDate: Date;
26
- serviceName: string;
27
- settlementAmount: string;
28
- shippingAmt: string;
29
- siteTrace: string;
30
- status: string;
31
- taxAmount: string;
32
- taxType: string;
33
- transactionDate: Date;
34
- transactionId: string;
35
- username: string;
36
- description: string;
37
- invoiceNumber: string;
38
- customerId: string;
39
- uniqueDeviceId: string;
40
- transactionDescriptor: string;
41
- giftCurrency: string;
42
- maskedAlias: string;
43
- paymentMethodKey: string;
44
- scheduleId: string;
45
- oneTimePayment: string;
46
- recurringDataCode: string;
47
- surchargeAmount: string;
48
- fraudRuleInfo: string;
49
- repeatCount: string;
50
- emvChipCondition: string;
51
- hasEmvTags: string;
52
- hasEcomPaymentData: string;
53
- cavvResponseCode: string;
54
- tokenPanLastFour: string;
55
- companyName: string;
56
- customerFirstName: string;
57
- customerLastName: string;
58
- debtRepaymentIndicator: string;
59
- captureAmount: string;
60
- fullyCaptured: string;
61
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TransactionSummary = void 0;
4
- var TransactionSummary = /** @class */ (function () {
5
- function TransactionSummary() {
6
- }
7
- return TransactionSummary;
8
- }());
9
- exports.TransactionSummary = TransactionSummary;
@@ -1,12 +0,0 @@
1
- export * from "./Address";
2
- export * from "./BatchSummary";
3
- export * from "./Customer";
4
- export * from "./EcommerceInfo";
5
- export * from "./EncryptionData";
6
- export * from "./Enums";
7
- export * from "./Errors";
8
- export * from "./HostedPaymentData";
9
- export * from "./RecurringEntity";
10
- export * from "./Schedule";
11
- export * from "./Transaction";
12
- export * from "./TransactionSummary";
@@ -1,24 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./Address"), exports);
14
- __exportStar(require("./BatchSummary"), exports);
15
- __exportStar(require("./Customer"), exports);
16
- __exportStar(require("./EcommerceInfo"), exports);
17
- __exportStar(require("./EncryptionData"), exports);
18
- __exportStar(require("./Enums"), exports);
19
- __exportStar(require("./Errors"), exports);
20
- __exportStar(require("./HostedPaymentData"), exports);
21
- __exportStar(require("./RecurringEntity"), exports);
22
- __exportStar(require("./Schedule"), exports);
23
- __exportStar(require("./Transaction"), exports);
24
- __exportStar(require("./TransactionSummary"), exports);
@@ -1,10 +0,0 @@
1
- import { IDictionary } from "../Builders";
2
- export declare abstract class Gateway {
3
- headers: IDictionary<string>;
4
- timeout: number;
5
- serviceUrl: string;
6
- private contentType;
7
- constructor(contentType: string);
8
- sendRequest(httpMethod: string, endpoint: string, data?: string, queryStringParams?: IDictionary<string>): Promise<string>;
9
- protected buildQueryString(queryStringParams?: IDictionary<string>): string;
10
- }
@@ -1,42 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Gateway = void 0;
4
- var url = require("url");
5
- var https_wrapper_1 = require("./https-wrapper");
6
- var Gateway = /** @class */ (function () {
7
- function Gateway(contentType) {
8
- this.contentType = contentType;
9
- this.headers = {};
10
- this.headers["Content-Type"] = this.contentType;
11
- }
12
- Gateway.prototype.sendRequest = function (httpMethod, endpoint, data, queryStringParams) {
13
- var uri = url.parse(this.serviceUrl);
14
- var queryString = this.buildQueryString(queryStringParams);
15
- var options = {
16
- headers: this.headers,
17
- host: uri.host,
18
- method: httpMethod,
19
- path: uri.path + endpoint + queryString,
20
- port: uri.port ? parseInt(uri.port, 10) : 443,
21
- timeout: this.timeout || 100000,
22
- };
23
- if (data !== undefined && options && options.headers) {
24
- options.headers["Content-Length"] = data.length;
25
- }
26
- return https_wrapper_1.request(data, options);
27
- };
28
- Gateway.prototype.buildQueryString = function (queryStringParams) {
29
- if (queryStringParams === undefined) {
30
- return "";
31
- }
32
- var params = [];
33
- for (var param in queryStringParams) {
34
- if (queryStringParams.hasOwnProperty(param)) {
35
- params.push(encodeURIComponent(param) + "=" + encodeURIComponent(queryStringParams[param]));
36
- }
37
- }
38
- return "?" + params.join("&");
39
- };
40
- return Gateway;
41
- }());
42
- exports.Gateway = Gateway;
@@ -1,8 +0,0 @@
1
- import { AuthorizationBuilder, ManagementBuilder, ReportBuilder, Transaction } from "../";
2
- export interface IPaymentGateway {
3
- supportsHostedPayments: boolean;
4
- processAuthorization(builder: AuthorizationBuilder): Promise<Transaction>;
5
- manageTransaction(builder: ManagementBuilder): Promise<Transaction>;
6
- processReport<T>(builder: ReportBuilder<T>): Promise<T>;
7
- serializeRequest(builder: AuthorizationBuilder): string;
8
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- import { IRecurringEntity, RecurringBuilder } from "../";
2
- export interface IRecurringService {
3
- supportsRetrieval: boolean;
4
- supportsUpdatePaymentDetails: boolean;
5
- processRecurring<T extends IRecurringEntity>(builder: RecurringBuilder<T>): Promise<T>;
6
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,42 +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
- protected buildCustomer(request: any, entity: Customer): any;
23
- protected buildPaymentMethod(request: any, entity: RecurringPaymentMethod, transactionType: TransactionType): any;
24
- protected buildSchedule(request: any, entity: Schedule, transactionType: TransactionType): any;
25
- protected prepareAccountType(type: AccountType): "Savings" | "Checking";
26
- protected prepareCheckType(type: CheckType): "Business" | "Payroll" | "Personal";
27
- protected buildAddress(request: any, address: Address): any;
28
- protected buildAmount(request: any, name: string, amount: number | string, currency: string, transactionType: TransactionType): any;
29
- protected buildDate(request: any, name: string, date: Date, force?: boolean): any;
30
- protected mapMethod(transactionType: TransactionType): "POST" | "PUT" | "DELETE" | "GET";
31
- protected mapUrl<T extends IRecurringEntity>(builder: RecurringBuilder<T>): string;
32
- protected hydrateCustomer(response: any): Customer;
33
- protected hydrateRecurringPaymentMethod(response: any): RecurringPaymentMethod;
34
- protected hydrateSchedule(response: any): Schedule;
35
- protected hasToken(paymentMethod: IPaymentMethod): {
36
- hasToken: boolean;
37
- tokenValue: string;
38
- };
39
- protected setAuthorizationHeader(value: string): void;
40
- protected maybeSetIdentityHeader(): void;
41
- protected maybeSetIntegrationHeader(): void;
42
- }