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,88 +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.EBT = void 0;
19
- var __1 = require("../");
20
- var PaymentMethod_1 = require("./PaymentMethod");
21
- var EBT = /** @class */ (function (_super) {
22
- __extends(EBT, _super);
23
- function EBT() {
24
- var _this = _super !== null && _super.apply(this, arguments) || this;
25
- _this.paymentMethodType = __1.PaymentMethodType.EBT;
26
- return _this;
27
- }
28
- /**
29
- * Authorizes the payment method and captures the entire authorized amount
30
- *
31
- * @param string|number amount Amount to authorize
32
- *
33
- * @return AuthorizationBuilder
34
- */
35
- EBT.prototype.charge = function (amount) {
36
- return new __1.AuthorizationBuilder(__1.TransactionType.Sale, this).withAmount(amount);
37
- };
38
- /**
39
- * Adds value to the payment method
40
- *
41
- * @param string|number amount Amount to add
42
- *
43
- * @return AuthorizationBuilder
44
- */
45
- EBT.prototype.addValue = function (amount) {
46
- return new __1.AuthorizationBuilder(__1.TransactionType.AddValue, this).withAmount(amount);
47
- };
48
- /**
49
- * Inquires the balance of the payment method
50
- *
51
- * @param InquiryType inquiry Type of inquiry
52
- *
53
- * @return AuthorizationBuilder
54
- */
55
- EBT.prototype.balanceInquiry = function (inquiry) {
56
- if (inquiry === void 0) { inquiry = __1.InquiryType.Foodstamp; }
57
- return new __1.AuthorizationBuilder(__1.TransactionType.Balance, this)
58
- .withBalanceInquiryType(inquiry)
59
- .withAmount(0);
60
- };
61
- EBT.prototype.benefitWithdrawal = function (amount) {
62
- return new __1.AuthorizationBuilder(__1.TransactionType.BenefitWithDrawal, this)
63
- .withAmount(amount)
64
- .withCashBack(0);
65
- };
66
- /**
67
- * Refunds the payment method
68
- *
69
- * @param string|number amount Amount to refund
70
- *
71
- * @return AuthorizationBuilder
72
- */
73
- EBT.prototype.refund = function (amount) {
74
- return new __1.AuthorizationBuilder(__1.TransactionType.Refund, this).withAmount(amount);
75
- };
76
- /**
77
- * Reverses the payment method
78
- *
79
- * @param string|number amount Amount to reverse
80
- *
81
- * @return AuthorizationBuilder
82
- */
83
- EBT.prototype.reverse = function (_amount) {
84
- throw new __1.NotImplementedError();
85
- };
86
- return EBT;
87
- }(PaymentMethod_1.PaymentMethod));
88
- exports.EBT = EBT;
@@ -1,16 +0,0 @@
1
- import { CvnPresenceIndicator } from "../";
2
- import { EBT } from "./EBT";
3
- import { ICardData } from "./Interfaces";
4
- export declare class EBTCardData extends EBT implements ICardData {
5
- approvalCode: string;
6
- number: string;
7
- expMonth: string;
8
- expYear: string;
9
- cvn: string;
10
- cvnPresenceIndicator: CvnPresenceIndicator;
11
- cardHolderName: string;
12
- cardPresent: boolean;
13
- readerPresent: boolean;
14
- serialNumber: string;
15
- constructor();
16
- }
@@ -1,32 +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.EBTCardData = void 0;
19
- var __1 = require("../");
20
- var EBT_1 = require("./EBT");
21
- var EBTCardData = /** @class */ (function (_super) {
22
- __extends(EBTCardData, _super);
23
- function EBTCardData() {
24
- var _this = _super.call(this) || this;
25
- _this.cardPresent = false;
26
- _this.readerPresent = false;
27
- _this.cvnPresenceIndicator = __1.CvnPresenceIndicator.NotRequested;
28
- return _this;
29
- }
30
- return EBTCardData;
31
- }(EBT_1.EBT));
32
- exports.EBTCardData = EBTCardData;
@@ -1,8 +0,0 @@
1
- import { EncryptionData, EntryMethod } from "../";
2
- import { EBT } from "./EBT";
3
- import { IEncryptable, ITrackData } from "./Interfaces";
4
- export declare class EBTTrackData extends EBT implements ITrackData, IEncryptable {
5
- encryptionData: EncryptionData;
6
- entryMethod: EntryMethod;
7
- value: string;
8
- }
@@ -1,27 +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.EBTTrackData = void 0;
19
- var EBT_1 = require("./EBT");
20
- var EBTTrackData = /** @class */ (function (_super) {
21
- __extends(EBTTrackData, _super);
22
- function EBTTrackData() {
23
- return _super !== null && _super.apply(this, arguments) || this;
24
- }
25
- return EBTTrackData;
26
- }(EBT_1.EBT));
27
- exports.EBTTrackData = EBTTrackData;
@@ -1,32 +0,0 @@
1
- import { AccountType, AuthorizationBuilder, CheckType, EntryMethod, PaymentMethodType, SecCode } from "../";
2
- import { IChargable } from "./Interfaces";
3
- import { PaymentMethod } from "./PaymentMethod";
4
- export declare class ECheck extends PaymentMethod implements IChargable {
5
- accountNumber: string;
6
- accountType: AccountType;
7
- achVerify: boolean;
8
- birthYear: string;
9
- checkHolderName: string;
10
- checkName: string;
11
- checkNumber: string;
12
- checkType: CheckType;
13
- checkVerify: boolean;
14
- driversLicenseNumber: string;
15
- driversLicenseState: string;
16
- entryMode: EntryMethod;
17
- micrNumber: string;
18
- paymentMethodType: PaymentMethodType;
19
- phoneNumber: string;
20
- routingNumber: string;
21
- secCode: SecCode;
22
- ssnLast4: string;
23
- token: string;
24
- /**
25
- * Authorizes the payment method and captures the entire authorized amount
26
- *
27
- * @param string|number amount Amount to authorize
28
- *
29
- * @return AuthorizationBuilder
30
- */
31
- charge(amount?: string | number): AuthorizationBuilder;
32
- }
@@ -1,40 +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.ECheck = void 0;
19
- var __1 = require("../");
20
- var PaymentMethod_1 = require("./PaymentMethod");
21
- var ECheck = /** @class */ (function (_super) {
22
- __extends(ECheck, _super);
23
- function ECheck() {
24
- var _this = _super !== null && _super.apply(this, arguments) || this;
25
- _this.paymentMethodType = __1.PaymentMethodType.ACH;
26
- return _this;
27
- }
28
- /**
29
- * Authorizes the payment method and captures the entire authorized amount
30
- *
31
- * @param string|number amount Amount to authorize
32
- *
33
- * @return AuthorizationBuilder
34
- */
35
- ECheck.prototype.charge = function (amount) {
36
- return new __1.AuthorizationBuilder(__1.TransactionType.Sale, this).withAmount(amount);
37
- };
38
- return ECheck;
39
- }(PaymentMethod_1.PaymentMethod));
40
- exports.ECheck = ECheck;
@@ -1,131 +0,0 @@
1
- import { AuthorizationBuilder, InquiryType, PaymentMethodType } from "../";
2
- import { IBalanceable, IChargable, IPrePayable, IReversable } from "./Interfaces";
3
- import { PaymentMethod } from "./PaymentMethod";
4
- export declare class GiftCard extends PaymentMethod implements IPrePayable, IBalanceable, IReversable, IChargable {
5
- /**
6
- * Payment method value types
7
- *
8
- * @var string[]
9
- */
10
- protected static valueTypes: string[];
11
- /**
12
- * Payment method type
13
- *
14
- * @var PaymentMethodType
15
- */
16
- paymentMethodType: PaymentMethodType;
17
- /**
18
- * Payment method PIN
19
- *
20
- * @var string
21
- */
22
- pin: string;
23
- /**
24
- * Payment method value
25
- *
26
- * @internal
27
- * @var string
28
- */
29
- value: string;
30
- /**
31
- * Payment method value type
32
- *
33
- * @internal
34
- * @var string
35
- */
36
- valueType: string;
37
- /**
38
- * Creates a new payment method
39
- *
40
- * @param string alias Alias to use
41
- *
42
- * @return GiftCard
43
- */
44
- static create(alias?: string): Promise<GiftCard>;
45
- /**
46
- * Adds an alias to the payment method
47
- *
48
- * @param string alias Alias to add
49
- *
50
- * @return AuthorizationBuilder
51
- */
52
- addAlias(alias?: string): AuthorizationBuilder;
53
- /**
54
- * Activates the payment method with the given amount
55
- *
56
- * @param string|number amount Amount to add
57
- *
58
- * @return AuthorizationBuilder
59
- */
60
- activate(amount?: string | number): AuthorizationBuilder;
61
- /**
62
- * Adds value to the payment method
63
- *
64
- * @param string|number amount Amount to add
65
- *
66
- * @return AuthorizationBuilder
67
- */
68
- addValue(amount?: string | number): AuthorizationBuilder;
69
- /**
70
- * Inquires the balance of the payment method
71
- *
72
- * @param InquiryType inquiry Type of inquiry
73
- *
74
- * @return AuthorizationBuilder
75
- */
76
- balanceInquiry(inquiry?: InquiryType): AuthorizationBuilder;
77
- /**
78
- * Authorizes the payment method and captures the entire authorized amount
79
- *
80
- * @param string|number amount Amount to authorize
81
- *
82
- * @return AuthorizationBuilder
83
- */
84
- charge(amount?: string | number): AuthorizationBuilder;
85
- /**
86
- * Deactivates the payment method
87
- *
88
- * @return AuthorizationBuilder
89
- */
90
- deactivate(): AuthorizationBuilder;
91
- /**
92
- * Removes an alias to the payment method
93
- *
94
- * @param string alias Alias to remove
95
- *
96
- * @return AuthorizationBuilder
97
- */
98
- removeAlias(alias?: string): AuthorizationBuilder;
99
- /**
100
- * Replaces the payment method with the given one
101
- *
102
- * @param GiftCard newCard Replacement gift card
103
- *
104
- * @return AuthorizationBuilder
105
- */
106
- replaceWith(newCard?: GiftCard): AuthorizationBuilder;
107
- /**
108
- * Reverses the payment method
109
- *
110
- * @param string|number amount Amount to reverse
111
- *
112
- * @return AuthorizationBuilder
113
- */
114
- reverse(amount?: string | number): AuthorizationBuilder;
115
- /**
116
- * Rewards the payment method
117
- *
118
- * @param string|number amount Amount to reward
119
- *
120
- * @return AuthorizationBuilder
121
- */
122
- rewards(amount?: string | number): AuthorizationBuilder;
123
- get alias(): string;
124
- set alias(value: string);
125
- get number(): string;
126
- set number(value: string);
127
- get token(): string;
128
- set token(value: string);
129
- get trackData(): string;
130
- set trackData(value: string);
131
- }
@@ -1,205 +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.GiftCard = void 0;
19
- var __1 = require("../");
20
- var PaymentMethod_1 = require("./PaymentMethod");
21
- var GiftCard = /** @class */ (function (_super) {
22
- __extends(GiftCard, _super);
23
- function GiftCard() {
24
- var _this = _super !== null && _super.apply(this, arguments) || this;
25
- /**
26
- * Payment method type
27
- *
28
- * @var PaymentMethodType
29
- */
30
- _this.paymentMethodType = __1.PaymentMethodType.Gift;
31
- return _this;
32
- }
33
- /**
34
- * Creates a new payment method
35
- *
36
- * @param string alias Alias to use
37
- *
38
- * @return GiftCard
39
- */
40
- GiftCard.create = function (alias) {
41
- var card = new GiftCard();
42
- return new __1.AuthorizationBuilder(__1.TransactionType.Alias, card)
43
- .withAlias(__1.AliasAction.Create, alias)
44
- .execute()
45
- .then(function (response) {
46
- if (response.responseCode === "00") {
47
- return response.giftCard;
48
- }
49
- throw new __1.ApiError(response.responseMessage);
50
- })
51
- .catch(function () {
52
- throw new __1.ApiError("Unable to create gift card alias");
53
- });
54
- };
55
- /**
56
- * Adds an alias to the payment method
57
- *
58
- * @param string alias Alias to add
59
- *
60
- * @return AuthorizationBuilder
61
- */
62
- GiftCard.prototype.addAlias = function (alias) {
63
- return new __1.AuthorizationBuilder(__1.TransactionType.Alias, this).withAlias(__1.AliasAction.Add, alias);
64
- };
65
- /**
66
- * Activates the payment method with the given amount
67
- *
68
- * @param string|number amount Amount to add
69
- *
70
- * @return AuthorizationBuilder
71
- */
72
- GiftCard.prototype.activate = function (amount) {
73
- return new __1.AuthorizationBuilder(__1.TransactionType.Activate, this).withAmount(amount);
74
- };
75
- /**
76
- * Adds value to the payment method
77
- *
78
- * @param string|number amount Amount to add
79
- *
80
- * @return AuthorizationBuilder
81
- */
82
- GiftCard.prototype.addValue = function (amount) {
83
- return new __1.AuthorizationBuilder(__1.TransactionType.AddValue, this).withAmount(amount);
84
- };
85
- /**
86
- * Inquires the balance of the payment method
87
- *
88
- * @param InquiryType inquiry Type of inquiry
89
- *
90
- * @return AuthorizationBuilder
91
- */
92
- GiftCard.prototype.balanceInquiry = function (inquiry) {
93
- return new __1.AuthorizationBuilder(__1.TransactionType.Balance, this).withBalanceInquiryType(inquiry);
94
- };
95
- /**
96
- * Authorizes the payment method and captures the entire authorized amount
97
- *
98
- * @param string|number amount Amount to authorize
99
- *
100
- * @return AuthorizationBuilder
101
- */
102
- GiftCard.prototype.charge = function (amount) {
103
- return new __1.AuthorizationBuilder(__1.TransactionType.Sale, this).withAmount(amount);
104
- };
105
- /**
106
- * Deactivates the payment method
107
- *
108
- * @return AuthorizationBuilder
109
- */
110
- GiftCard.prototype.deactivate = function () {
111
- return new __1.AuthorizationBuilder(__1.TransactionType.Deactivate, this);
112
- };
113
- /**
114
- * Removes an alias to the payment method
115
- *
116
- * @param string alias Alias to remove
117
- *
118
- * @return AuthorizationBuilder
119
- */
120
- GiftCard.prototype.removeAlias = function (alias) {
121
- return new __1.AuthorizationBuilder(__1.TransactionType.Alias, this).withAlias(__1.AliasAction.Delete, alias);
122
- };
123
- /**
124
- * Replaces the payment method with the given one
125
- *
126
- * @param GiftCard newCard Replacement gift card
127
- *
128
- * @return AuthorizationBuilder
129
- */
130
- GiftCard.prototype.replaceWith = function (newCard) {
131
- return new __1.AuthorizationBuilder(__1.TransactionType.Replace, this).withReplacementCard(newCard);
132
- };
133
- /**
134
- * Reverses the payment method
135
- *
136
- * @param string|number amount Amount to reverse
137
- *
138
- * @return AuthorizationBuilder
139
- */
140
- GiftCard.prototype.reverse = function (amount) {
141
- return new __1.AuthorizationBuilder(__1.TransactionType.Reversal, this).withAmount(amount);
142
- };
143
- /**
144
- * Rewards the payment method
145
- *
146
- * @param string|number amount Amount to reward
147
- *
148
- * @return AuthorizationBuilder
149
- */
150
- GiftCard.prototype.rewards = function (amount) {
151
- return new __1.AuthorizationBuilder(__1.TransactionType.Reward, this).withAmount(amount);
152
- };
153
- Object.defineProperty(GiftCard.prototype, "alias", {
154
- get: function () {
155
- return this.value;
156
- },
157
- set: function (value) {
158
- this.value = value;
159
- this.valueType = "Alias";
160
- },
161
- enumerable: false,
162
- configurable: true
163
- });
164
- Object.defineProperty(GiftCard.prototype, "number", {
165
- get: function () {
166
- return this.value;
167
- },
168
- set: function (value) {
169
- this.value = value;
170
- this.valueType = "CardNbr";
171
- },
172
- enumerable: false,
173
- configurable: true
174
- });
175
- Object.defineProperty(GiftCard.prototype, "token", {
176
- get: function () {
177
- return this.value;
178
- },
179
- set: function (value) {
180
- this.value = value;
181
- this.valueType = "TokenValue";
182
- },
183
- enumerable: false,
184
- configurable: true
185
- });
186
- Object.defineProperty(GiftCard.prototype, "trackData", {
187
- get: function () {
188
- return this.value;
189
- },
190
- set: function (value) {
191
- this.value = value;
192
- this.valueType = "TrackData";
193
- },
194
- enumerable: false,
195
- configurable: true
196
- });
197
- /**
198
- * Payment method value types
199
- *
200
- * @var string[]
201
- */
202
- GiftCard.valueTypes = ["alias", "number", "token", "trackData"];
203
- return GiftCard;
204
- }(PaymentMethod_1.PaymentMethod));
205
- exports.GiftCard = GiftCard;
@@ -1,55 +0,0 @@
1
- import { AuthorizationBuilder, CvnPresenceIndicator, EncryptionData, EntryMethod, InquiryType, ManagementBuilder, PaymentMethodType } from "../";
2
- export interface IAuthable {
3
- authorize(amount?: string | number): AuthorizationBuilder;
4
- }
5
- export interface IBalanceable {
6
- balanceInquiry(inquiry?: InquiryType): AuthorizationBuilder;
7
- }
8
- export interface ICardData {
9
- number: string;
10
- expMonth: string;
11
- expYear: string;
12
- cvn: string;
13
- cvnPresenceIndicator: CvnPresenceIndicator;
14
- cardHolderName: string;
15
- cardPresent: boolean;
16
- readerPresent: boolean;
17
- }
18
- export interface IChargable {
19
- charge(amount?: string | number): AuthorizationBuilder;
20
- }
21
- export interface IEditable {
22
- edit(amount?: string | number): AuthorizationBuilder;
23
- }
24
- export interface IEncryptable {
25
- encryptionData: EncryptionData;
26
- }
27
- export interface IPaymentMethod {
28
- paymentMethodType: PaymentMethodType;
29
- }
30
- export interface IPinProtected {
31
- pinBlock: string;
32
- }
33
- export interface IPrePayable {
34
- addValue(amount?: string | number): AuthorizationBuilder;
35
- }
36
- export interface IRefundable {
37
- refund(amount?: string | number): AuthorizationBuilder;
38
- }
39
- export interface IReversable {
40
- reverse(amount?: string | number): AuthorizationBuilder;
41
- }
42
- export interface ITokenizable {
43
- token: string;
44
- tokenize(): AuthorizationBuilder;
45
- }
46
- export interface ITrackData {
47
- value: string;
48
- entryMethod: EntryMethod;
49
- }
50
- export interface IVerifyable {
51
- verify(): AuthorizationBuilder;
52
- }
53
- export interface IVoidable {
54
- void(): ManagementBuilder;
55
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,19 +0,0 @@
1
- import { IPaymentMethod, PaymentMethodType } from "../";
2
- export declare abstract class PaymentMethod implements IPaymentMethod {
3
- paymentMethodType: PaymentMethodType;
4
- [key: string]: any;
5
- get isAuthable(): boolean;
6
- get isBalanceable(): boolean;
7
- get isCardData(): boolean;
8
- get isChargable(): boolean;
9
- get isEditable(): boolean;
10
- get isEncryptable(): boolean;
11
- get isPinProtected(): boolean;
12
- get isPrePayable(): boolean;
13
- get isRefundable(): boolean;
14
- get isReversable(): boolean;
15
- get isTokenizable(): boolean;
16
- get isTrackData(): boolean;
17
- get isVerifyable(): boolean;
18
- get isVoidable(): boolean;
19
- }