globalpayments-api 3.10.1 → 3.10.2

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 (112) hide show
  1. package/CHANGELOG.md +184 -177
  2. package/LICENSE.md +257 -257
  3. package/README.md +141 -141
  4. package/appsec.properties +8 -0
  5. package/lib/src/Gateways/PorticoConnector.js +24 -0
  6. package/lib/src/Gateways/PorticoConnector.js.map +1 -1
  7. package/lib/src/Gateways/RealexConnector.d.ts +30 -0
  8. package/lib/src/Gateways/RealexConnector.js +523 -0
  9. package/lib/src/PaymentMethods/Credit.d.ts +2 -1
  10. package/lib/src/PaymentMethods/Credit.js +1 -0
  11. package/lib/src/PaymentMethods/Credit.js.map +1 -1
  12. package/lib/src/ServicesConfig.d.ts +27 -0
  13. package/lib/src/ServicesConfig.js +50 -0
  14. package/lib/test/Integration/Gateways/GpApiConnector/3DS2.test.js +15 -15
  15. package/lib/test/Integration/Gateways/GpApiConnector/3DSecure.test.js +5 -5
  16. package/lib/test/Integration/Gateways/GpEcomConnector/Credit.test.js +4 -4
  17. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.d.ts +1 -0
  18. package/lib/test/Integration/Gateways/PorticoConnector/AchTest.js +112 -0
  19. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.d.ts +1 -0
  20. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/CheckTest.js +483 -0
  21. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.d.ts +1 -0
  22. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceCheckTest.js +83 -0
  23. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.d.ts +1 -0
  24. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.js +1720 -0
  25. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.d.ts +1 -0
  26. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoCheckTest.js +83 -0
  27. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.d.ts +1 -0
  28. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/MotoTest.js +1757 -0
  29. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.d.ts +1 -0
  30. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RecurringTest.js +682 -0
  31. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.d.ts +1 -0
  32. package/lib/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.js +2218 -0
  33. package/lib/test/Integration/Gateways/PorticoConnector/Credit.test.js +32 -0
  34. package/lib/test/Integration/Gateways/PorticoConnector/Credit.test.js.map +1 -1
  35. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.d.ts +1 -0
  36. package/lib/test/Integration/Gateways/PorticoConnector/CreditTest.js +707 -0
  37. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.d.ts +1 -0
  38. package/lib/test/Integration/Gateways/PorticoConnector/DebitTest.js +151 -0
  39. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.d.ts +1 -0
  40. package/lib/test/Integration/Gateways/PorticoConnector/EbtTest.js +171 -0
  41. package/lib/test/Integration/Gateways/PorticoConnector/Ecommerce.test.js +8 -8
  42. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.d.ts +1 -0
  43. package/lib/test/Integration/Gateways/PorticoConnector/EcommerceTest.js +192 -0
  44. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.d.ts +1 -0
  45. package/lib/test/Integration/Gateways/PorticoConnector/GiftTest.js +377 -0
  46. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.d.ts +1 -0
  47. package/lib/test/Integration/Gateways/PorticoConnector/RecurringTest.js +196 -0
  48. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.d.ts +1 -0
  49. package/lib/test/Integration/Gateways/PorticoConnector/ReportingTest.js +53 -0
  50. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.d.ts +1 -0
  51. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/GetInformationCertificationTests.js +100 -0
  52. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.d.ts +1 -0
  53. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayAccountCertificationTests.js +352 -0
  54. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.d.ts +1 -0
  55. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayFundCertificationTests.js +123 -0
  56. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.d.ts +1 -0
  57. package/lib/test/Integration/Gateways/ProPayConnector/Certifications/ProPayInNetworkTransactionCertificationTests.js +142 -0
  58. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.d.ts +1 -0
  59. package/lib/test/Integration/Gateways/ProPayConnector/GetInformationTests.js +100 -0
  60. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.d.ts +1 -0
  61. package/lib/test/Integration/Gateways/ProPayConnector/ProPayAccountTests.js +535 -0
  62. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.d.ts +1 -0
  63. package/lib/test/Integration/Gateways/ProPayConnector/ProPayFundsTests.js +124 -0
  64. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.d.ts +1 -0
  65. package/lib/test/Integration/Gateways/ProPayConnector/ProPayInNetworkTransactionTests.js +144 -0
  66. package/lib/test/Integration/Gateways/RealexConnector/Certification/AuthTest.d.ts +1 -0
  67. package/lib/test/Integration/Gateways/RealexConnector/Certification/AuthTest.js +4373 -0
  68. package/lib/test/Integration/Gateways/RealexConnector/Certification/AvsTest.d.ts +1 -0
  69. package/lib/test/Integration/Gateways/RealexConnector/Certification/AvsTest.js +758 -0
  70. package/lib/test/Integration/Gateways/RealexConnector/Certification/CreditTest.d.ts +1 -0
  71. package/lib/test/Integration/Gateways/RealexConnector/Certification/CreditTest.js +2399 -0
  72. package/lib/test/Integration/Gateways/RealexConnector/Certification/HoldTest.d.ts +1 -0
  73. package/lib/test/Integration/Gateways/RealexConnector/Certification/HoldTest.js +1656 -0
  74. package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.d.ts +1 -0
  75. package/lib/test/Integration/Gateways/RealexConnector/Certification/ManualTest.js +5650 -0
  76. package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.d.ts +1 -0
  77. package/lib/test/Integration/Gateways/RealexConnector/Certification/OtbTest.js +1985 -0
  78. package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.d.ts +1 -0
  79. package/lib/test/Integration/Gateways/RealexConnector/Certification/RebateTest.js +2369 -0
  80. package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.d.ts +1 -0
  81. package/lib/test/Integration/Gateways/RealexConnector/Certification/ReleaseTest.js +1703 -0
  82. package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.d.ts +1 -0
  83. package/lib/test/Integration/Gateways/RealexConnector/Certification/SettleTest.js +2053 -0
  84. package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.d.ts +1 -0
  85. package/lib/test/Integration/Gateways/RealexConnector/Certification/ValidationTest.js +2469 -0
  86. package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.d.ts +1 -0
  87. package/lib/test/Integration/Gateways/RealexConnector/Certification/VerifyEnrolledTest.js +3116 -0
  88. package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.d.ts +1 -0
  89. package/lib/test/Integration/Gateways/RealexConnector/Certification/VoidTest.js +2031 -0
  90. package/lib/test/Integration/Gateways/RealexConnector/CreditTest.d.ts +1 -0
  91. package/lib/test/Integration/Gateways/RealexConnector/CreditTest.js +322 -0
  92. package/lib/test/Integration/Gateways/RealexConnector/HppTest.d.ts +1 -0
  93. package/lib/test/Integration/Gateways/RealexConnector/HppTest.js +98 -0
  94. package/lib/test/Integration/Gateways/RealexConnector/RecurringTest.d.ts +1 -0
  95. package/lib/test/Integration/Gateways/RealexConnector/RecurringTest.js +263 -0
  96. package/lib/test/Integration/Services/CheckServiceTest.d.ts +1 -0
  97. package/lib/test/Integration/Services/CheckServiceTest.js +98 -0
  98. package/lib/test/Integration/Services/CreditServiceTest.d.ts +1 -0
  99. package/lib/test/Integration/Services/CreditServiceTest.js +313 -0
  100. package/lib/test/Integration/Services/DebitServiceTest.d.ts +1 -0
  101. package/lib/test/Integration/Services/DebitServiceTest.js +154 -0
  102. package/lib/test/Integration/Services/EBTServiceTest.d.ts +1 -0
  103. package/lib/test/Integration/Services/EBTServiceTest.js +135 -0
  104. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.d.ts +1 -0
  105. package/lib/test/Unit/Builders/AuthorizationBuilder/ValidationTest.js +161 -0
  106. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.d.ts +1 -0
  107. package/lib/test/Unit/Builders/ReportBuilder/ValidationTest.js +139 -0
  108. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.d.ts +1 -0
  109. package/lib/test/Unit/Gateways/PorticoConnector/InputValidationTest.js +202 -0
  110. package/lib/test/Unit/Gateways/RealexConnector/CreditTest.d.ts +1 -0
  111. package/lib/test/Unit/Gateways/RealexConnector/CreditTest.js +29 -0
  112. package/package.json +62 -62
@@ -0,0 +1,2031 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (_) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ var ava_1 = require("ava");
40
+ var src_1 = require("../../../../../src/");
41
+ var throttle = function () { return new Promise(function (resolve) { return setTimeout(resolve, 1500); }); };
42
+ ava_1.default.beforeEach(function () { return __awaiter(void 0, void 0, void 0, function () {
43
+ return __generator(this, function (_a) {
44
+ switch (_a.label) {
45
+ case 0: return [4 /*yield*/, throttle()];
46
+ case 1:
47
+ _a.sent();
48
+ return [2 /*return*/];
49
+ }
50
+ });
51
+ }); });
52
+ ava_1.default("JAVA_Void_Sample", function (t) { return __awaiter(void 0, void 0, void 0, function () {
53
+ var config, card, saleResponse, response;
54
+ return __generator(this, function (_a) {
55
+ switch (_a.label) {
56
+ case 0:
57
+ t.plan(2);
58
+ config = new src_1.ServicesConfig();
59
+ config.merchantId = "heartlandgpsandbox";
60
+ config.accountId = "api";
61
+ config.sharedSecret = "secret";
62
+ config.refundPassword = "refund";
63
+ config.rebatePassword = "rebate";
64
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
65
+ config.timeout = 5000;
66
+ config.channel = "ECOM";
67
+ src_1.ServicesContainer.configure(config);
68
+ card = new src_1.CreditCardData();
69
+ card.number = "4263970000005262";
70
+ card.expMonth = "12";
71
+ card.expYear = "2020";
72
+ card.cvn = "123";
73
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
74
+ card.cardHolderName = "James Mason";
75
+ return [4 /*yield*/, card
76
+ .charge(10)
77
+ .withCurrency("EUR")
78
+ .execute()];
79
+ case 1:
80
+ saleResponse = _a.sent();
81
+ t.truthy(saleResponse);
82
+ t.is("00", saleResponse.responseCode);
83
+ return [4 /*yield*/, throttle()];
84
+ case 2:
85
+ _a.sent();
86
+ return [4 /*yield*/, saleResponse
87
+ .void()
88
+ .withDescription("JAVA-Void")
89
+ .execute()];
90
+ case 3:
91
+ response = _a.sent();
92
+ t.truthy(response);
93
+ t.is("00", response.responseCode);
94
+ return [2 /*return*/];
95
+ }
96
+ });
97
+ }); });
98
+ ava_1.default("JAVA_Void_006a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
99
+ var config, card, saleResponse, response;
100
+ return __generator(this, function (_a) {
101
+ switch (_a.label) {
102
+ case 0:
103
+ t.plan(2);
104
+ config = new src_1.ServicesConfig();
105
+ config.merchantId = "heartlandgpsandbox";
106
+ config.accountId = "api";
107
+ config.sharedSecret = "secret";
108
+ config.refundPassword = "refund";
109
+ config.rebatePassword = "rebate";
110
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
111
+ config.timeout = 5000;
112
+ config.channel = "ECOM";
113
+ src_1.ServicesContainer.configure(config);
114
+ card = new src_1.CreditCardData();
115
+ card.number = "4263970000005262";
116
+ card.expMonth = "12";
117
+ card.expYear = "2020";
118
+ card.cvn = "123";
119
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
120
+ card.cardHolderName = "James Mason";
121
+ return [4 /*yield*/, card
122
+ .charge(10)
123
+ .withCurrency("EUR")
124
+ .execute()];
125
+ case 1:
126
+ saleResponse = _a.sent();
127
+ t.truthy(saleResponse);
128
+ t.is("00", saleResponse.responseCode);
129
+ return [4 /*yield*/, throttle()];
130
+ case 2:
131
+ _a.sent();
132
+ return [4 /*yield*/, saleResponse
133
+ .void()
134
+ .withDescription("JAVA-Void")
135
+ .execute()];
136
+ case 3:
137
+ response = _a.sent();
138
+ t.truthy(response);
139
+ t.is("00", response.responseCode);
140
+ return [2 /*return*/];
141
+ }
142
+ });
143
+ }); });
144
+ ava_1.default("JAVA_Void_006b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
145
+ var config, card, saleResponse, response;
146
+ return __generator(this, function (_a) {
147
+ switch (_a.label) {
148
+ case 0:
149
+ t.plan(2);
150
+ config = new src_1.ServicesConfig();
151
+ config.merchantId = "heartlandgpsandbox";
152
+ config.accountId = "api";
153
+ config.sharedSecret = "secret";
154
+ config.refundPassword = "refund";
155
+ config.rebatePassword = "rebate";
156
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
157
+ config.timeout = 5000;
158
+ config.channel = "ECOM";
159
+ src_1.ServicesContainer.configure(config);
160
+ card = new src_1.CreditCardData();
161
+ card.number = "4263970000005262";
162
+ card.expMonth = "12";
163
+ card.expYear = "2020";
164
+ card.cvn = "123";
165
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
166
+ card.cardHolderName = "James Mason";
167
+ return [4 /*yield*/, card
168
+ .charge(10)
169
+ .withCurrency("EUR")
170
+ .execute()];
171
+ case 1:
172
+ saleResponse = _a.sent();
173
+ t.truthy(saleResponse);
174
+ t.is("00", saleResponse.responseCode);
175
+ return [4 /*yield*/, throttle()];
176
+ case 2:
177
+ _a.sent();
178
+ return [4 /*yield*/, saleResponse
179
+ .void()
180
+ .withDescription("JAVA-Void")
181
+ .execute()];
182
+ case 3:
183
+ response = _a.sent();
184
+ t.truthy(response);
185
+ t.is("00", response.responseCode);
186
+ return [2 /*return*/];
187
+ }
188
+ });
189
+ }); });
190
+ ava_1.default("JAVA_Void_006c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
191
+ var config, card, saleResponse, response;
192
+ return __generator(this, function (_a) {
193
+ switch (_a.label) {
194
+ case 0:
195
+ t.plan(2);
196
+ config = new src_1.ServicesConfig();
197
+ config.merchantId = "heartlandgpsandbox";
198
+ config.accountId = "api";
199
+ config.sharedSecret = "secret";
200
+ config.refundPassword = "refund";
201
+ config.rebatePassword = "rebate";
202
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
203
+ config.timeout = 5000;
204
+ config.channel = "ECOM";
205
+ src_1.ServicesContainer.configure(config);
206
+ card = new src_1.CreditCardData();
207
+ card.number = "4263970000005262";
208
+ card.expMonth = "12";
209
+ card.expYear = "2020";
210
+ card.cvn = "123";
211
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
212
+ card.cardHolderName = "James Mason";
213
+ return [4 /*yield*/, card
214
+ .charge(10)
215
+ .withCurrency("EUR")
216
+ .execute()];
217
+ case 1:
218
+ saleResponse = _a.sent();
219
+ t.truthy(saleResponse);
220
+ t.is("00", saleResponse.responseCode);
221
+ return [4 /*yield*/, throttle()];
222
+ case 2:
223
+ _a.sent();
224
+ return [4 /*yield*/, saleResponse
225
+ .void()
226
+ .withDescription("JAVA-Void")
227
+ .execute()];
228
+ case 3:
229
+ response = _a.sent();
230
+ t.truthy(response);
231
+ t.is("00", response.responseCode);
232
+ return [2 /*return*/];
233
+ }
234
+ });
235
+ }); });
236
+ ava_1.default("JAVA_Void_006d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
237
+ var config, card, saleResponse, response;
238
+ return __generator(this, function (_a) {
239
+ switch (_a.label) {
240
+ case 0:
241
+ t.plan(2);
242
+ config = new src_1.ServicesConfig();
243
+ config.merchantId = "heartlandgpsandbox";
244
+ config.accountId = "api";
245
+ config.sharedSecret = "secret";
246
+ config.refundPassword = "refund";
247
+ config.rebatePassword = "rebate";
248
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
249
+ config.timeout = 5000;
250
+ config.channel = "ECOM";
251
+ src_1.ServicesContainer.configure(config);
252
+ card = new src_1.CreditCardData();
253
+ card.number = "4263970000005262";
254
+ card.expMonth = "12";
255
+ card.expYear = "2020";
256
+ card.cvn = "123";
257
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
258
+ card.cardHolderName = "James Mason";
259
+ return [4 /*yield*/, card
260
+ .charge(10)
261
+ .withCurrency("EUR")
262
+ .execute()];
263
+ case 1:
264
+ saleResponse = _a.sent();
265
+ t.truthy(saleResponse);
266
+ t.is("00", saleResponse.responseCode);
267
+ return [4 /*yield*/, throttle()];
268
+ case 2:
269
+ _a.sent();
270
+ return [4 /*yield*/, saleResponse
271
+ .void()
272
+ .withDescription("JAVA-Void")
273
+ .execute()];
274
+ case 3:
275
+ response = _a.sent();
276
+ t.truthy(response);
277
+ t.is("00", response.responseCode);
278
+ return [2 /*return*/];
279
+ }
280
+ });
281
+ }); });
282
+ ava_1.default("JAVA_Void_006e", function (t) { return __awaiter(void 0, void 0, void 0, function () {
283
+ var config, card, saleResponse, response;
284
+ return __generator(this, function (_a) {
285
+ switch (_a.label) {
286
+ case 0:
287
+ t.plan(2);
288
+ config = new src_1.ServicesConfig();
289
+ config.merchantId = "heartlandgpsandbox";
290
+ config.accountId = "api";
291
+ config.sharedSecret = "secret";
292
+ config.refundPassword = "refund";
293
+ config.rebatePassword = "rebate";
294
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
295
+ config.timeout = 5000;
296
+ config.channel = "ECOM";
297
+ src_1.ServicesContainer.configure(config);
298
+ card = new src_1.CreditCardData();
299
+ card.number = "4263970000005262";
300
+ card.expMonth = "12";
301
+ card.expYear = "2020";
302
+ card.cvn = "123";
303
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
304
+ card.cardHolderName = "James Mason";
305
+ return [4 /*yield*/, card
306
+ .charge(10)
307
+ .withCurrency("EUR")
308
+ .execute()];
309
+ case 1:
310
+ saleResponse = _a.sent();
311
+ t.truthy(saleResponse);
312
+ t.is("00", saleResponse.responseCode);
313
+ return [4 /*yield*/, throttle()];
314
+ case 2:
315
+ _a.sent();
316
+ return [4 /*yield*/, saleResponse
317
+ .void()
318
+ .withDescription("JAVA-Void")
319
+ .execute()];
320
+ case 3:
321
+ response = _a.sent();
322
+ t.truthy(response);
323
+ t.is("00", response.responseCode);
324
+ return [2 /*return*/];
325
+ }
326
+ });
327
+ }); });
328
+ ava_1.default("JAVA_Void_006f", function (t) { return __awaiter(void 0, void 0, void 0, function () {
329
+ var config, card, saleResponse, response;
330
+ return __generator(this, function (_a) {
331
+ switch (_a.label) {
332
+ case 0:
333
+ t.plan(2);
334
+ config = new src_1.ServicesConfig();
335
+ config.merchantId = "heartlandgpsandbox";
336
+ config.accountId = "api";
337
+ config.sharedSecret = "secret";
338
+ config.refundPassword = "refund";
339
+ config.rebatePassword = "rebate";
340
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
341
+ config.timeout = 5000;
342
+ config.channel = "ECOM";
343
+ src_1.ServicesContainer.configure(config);
344
+ card = new src_1.CreditCardData();
345
+ card.number = "4263970000005262";
346
+ card.expMonth = "12";
347
+ card.expYear = "2020";
348
+ card.cvn = "123";
349
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
350
+ card.cardHolderName = "James Mason";
351
+ return [4 /*yield*/, card
352
+ .charge(10)
353
+ .withCurrency("EUR")
354
+ .execute()];
355
+ case 1:
356
+ saleResponse = _a.sent();
357
+ t.truthy(saleResponse);
358
+ t.is("00", saleResponse.responseCode);
359
+ return [4 /*yield*/, throttle()];
360
+ case 2:
361
+ _a.sent();
362
+ return [4 /*yield*/, saleResponse
363
+ .void()
364
+ .withDescription("JAVA-Void")
365
+ .execute()];
366
+ case 3:
367
+ response = _a.sent();
368
+ t.truthy(response);
369
+ t.is("00", response.responseCode);
370
+ return [2 /*return*/];
371
+ }
372
+ });
373
+ }); });
374
+ ava_1.default("JAVA_Void_006g", function (t) { return __awaiter(void 0, void 0, void 0, function () {
375
+ var config, card, saleResponse, response;
376
+ return __generator(this, function (_a) {
377
+ switch (_a.label) {
378
+ case 0:
379
+ t.plan(2);
380
+ config = new src_1.ServicesConfig();
381
+ config.merchantId = "heartlandgpsandbox";
382
+ config.accountId = "api";
383
+ config.sharedSecret = "secret";
384
+ config.refundPassword = "refund";
385
+ config.rebatePassword = "rebate";
386
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
387
+ config.timeout = 5000;
388
+ config.channel = "ECOM";
389
+ src_1.ServicesContainer.configure(config);
390
+ card = new src_1.CreditCardData();
391
+ card.number = "4263970000005262";
392
+ card.expMonth = "12";
393
+ card.expYear = "2020";
394
+ card.cvn = "123";
395
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
396
+ card.cardHolderName = "James Mason";
397
+ return [4 /*yield*/, card
398
+ .charge(10)
399
+ .withCurrency("EUR")
400
+ .execute()];
401
+ case 1:
402
+ saleResponse = _a.sent();
403
+ t.truthy(saleResponse);
404
+ t.is("00", saleResponse.responseCode);
405
+ return [4 /*yield*/, throttle()];
406
+ case 2:
407
+ _a.sent();
408
+ return [4 /*yield*/, saleResponse
409
+ .void()
410
+ .withDescription("JAVA-Void")
411
+ .execute()];
412
+ case 3:
413
+ response = _a.sent();
414
+ t.truthy(response);
415
+ t.is("00", response.responseCode);
416
+ return [2 /*return*/];
417
+ }
418
+ });
419
+ }); });
420
+ ava_1.default("JAVA_Void_006h", function (t) { return __awaiter(void 0, void 0, void 0, function () {
421
+ var config, card, saleResponse, response;
422
+ return __generator(this, function (_a) {
423
+ switch (_a.label) {
424
+ case 0:
425
+ t.plan(2);
426
+ config = new src_1.ServicesConfig();
427
+ config.merchantId = "heartlandgpsandbox";
428
+ config.accountId = "api";
429
+ config.sharedSecret = "secret";
430
+ config.refundPassword = "refund";
431
+ config.rebatePassword = "rebate";
432
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
433
+ config.timeout = 5000;
434
+ config.channel = "ECOM";
435
+ src_1.ServicesContainer.configure(config);
436
+ card = new src_1.CreditCardData();
437
+ card.number = "4263970000005262";
438
+ card.expMonth = "12";
439
+ card.expYear = "2020";
440
+ card.cvn = "123";
441
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
442
+ card.cardHolderName = "James Mason";
443
+ return [4 /*yield*/, card
444
+ .charge(10)
445
+ .withCurrency("EUR")
446
+ .execute()];
447
+ case 1:
448
+ saleResponse = _a.sent();
449
+ t.truthy(saleResponse);
450
+ t.is("00", saleResponse.responseCode);
451
+ return [4 /*yield*/, throttle()];
452
+ case 2:
453
+ _a.sent();
454
+ return [4 /*yield*/, saleResponse
455
+ .void()
456
+ .withDescription("JAVA-Void")
457
+ .execute()];
458
+ case 3:
459
+ response = _a.sent();
460
+ t.truthy(response);
461
+ t.is("00", response.responseCode);
462
+ return [2 /*return*/];
463
+ }
464
+ });
465
+ }); });
466
+ ava_1.default("JAVA_Void_006i", function (t) { return __awaiter(void 0, void 0, void 0, function () {
467
+ var config, card, saleResponse, response;
468
+ return __generator(this, function (_a) {
469
+ switch (_a.label) {
470
+ case 0:
471
+ t.plan(2);
472
+ config = new src_1.ServicesConfig();
473
+ config.merchantId = "heartlandgpsandbox";
474
+ config.accountId = "api";
475
+ config.sharedSecret = "secret";
476
+ config.refundPassword = "refund";
477
+ config.rebatePassword = "rebate";
478
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
479
+ config.timeout = 5000;
480
+ config.channel = "ECOM";
481
+ src_1.ServicesContainer.configure(config);
482
+ card = new src_1.CreditCardData();
483
+ card.number = "4263970000005262";
484
+ card.expMonth = "12";
485
+ card.expYear = "2020";
486
+ card.cvn = "123";
487
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
488
+ card.cardHolderName = "James Mason";
489
+ return [4 /*yield*/, card
490
+ .charge(10)
491
+ .withCurrency("EUR")
492
+ .execute()];
493
+ case 1:
494
+ saleResponse = _a.sent();
495
+ t.truthy(saleResponse);
496
+ t.is("00", saleResponse.responseCode);
497
+ return [4 /*yield*/, throttle()];
498
+ case 2:
499
+ _a.sent();
500
+ return [4 /*yield*/, saleResponse
501
+ .void()
502
+ .withDescription("JAVA-Void")
503
+ .execute()];
504
+ case 3:
505
+ response = _a.sent();
506
+ t.truthy(response);
507
+ t.is("00", response.responseCode);
508
+ return [2 /*return*/];
509
+ }
510
+ });
511
+ }); });
512
+ ava_1.default("JAVA_Void_006k", function (t) { return __awaiter(void 0, void 0, void 0, function () {
513
+ var config, card, saleResponse, response;
514
+ return __generator(this, function (_a) {
515
+ switch (_a.label) {
516
+ case 0:
517
+ t.plan(2);
518
+ config = new src_1.ServicesConfig();
519
+ config.merchantId = "heartlandgpsandbox";
520
+ config.accountId = "api";
521
+ config.sharedSecret = "secret";
522
+ config.refundPassword = "refund";
523
+ config.rebatePassword = "rebate";
524
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
525
+ config.timeout = 5000;
526
+ config.channel = "ECOM";
527
+ src_1.ServicesContainer.configure(config);
528
+ card = new src_1.CreditCardData();
529
+ card.number = "4263970000005262";
530
+ card.expMonth = "12";
531
+ card.expYear = "2020";
532
+ card.cvn = "123";
533
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
534
+ card.cardHolderName = "James Mason";
535
+ return [4 /*yield*/, card
536
+ .charge(10)
537
+ .withCurrency("EUR")
538
+ .execute()];
539
+ case 1:
540
+ saleResponse = _a.sent();
541
+ t.truthy(saleResponse);
542
+ t.is("00", saleResponse.responseCode);
543
+ return [4 /*yield*/, throttle()];
544
+ case 2:
545
+ _a.sent();
546
+ return [4 /*yield*/, saleResponse
547
+ .void()
548
+ .withDescription("JAVA-Void")
549
+ .execute()];
550
+ case 3:
551
+ response = _a.sent();
552
+ t.truthy(response);
553
+ t.is("00", response.responseCode);
554
+ return [2 /*return*/];
555
+ }
556
+ });
557
+ }); });
558
+ ava_1.default("JAVA_Void_007a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
559
+ var config, card, saleResponse, response;
560
+ return __generator(this, function (_a) {
561
+ switch (_a.label) {
562
+ case 0:
563
+ t.plan(2);
564
+ config = new src_1.ServicesConfig();
565
+ config.merchantId = "heartlandgpsandbox";
566
+ config.accountId = "api";
567
+ config.sharedSecret = "secret";
568
+ config.refundPassword = "refund";
569
+ config.rebatePassword = "rebate";
570
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
571
+ config.timeout = 5000;
572
+ config.channel = "ECOM";
573
+ src_1.ServicesContainer.configure(config);
574
+ card = new src_1.CreditCardData();
575
+ card.number = "4263970000005262";
576
+ card.expMonth = "12";
577
+ card.expYear = "2020";
578
+ card.cvn = "123";
579
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
580
+ card.cardHolderName = "James Mason";
581
+ return [4 /*yield*/, card
582
+ .charge(10)
583
+ .withCurrency("EUR")
584
+ .execute()];
585
+ case 1:
586
+ saleResponse = _a.sent();
587
+ t.truthy(saleResponse);
588
+ t.is("00", saleResponse.responseCode);
589
+ return [4 /*yield*/, throttle()];
590
+ case 2:
591
+ _a.sent();
592
+ return [4 /*yield*/, saleResponse
593
+ .void()
594
+ .withDescription("JAVA-Void")
595
+ .execute()];
596
+ case 3:
597
+ response = _a.sent();
598
+ t.truthy(response);
599
+ t.is("00", response.responseCode);
600
+ return [2 /*return*/];
601
+ }
602
+ });
603
+ }); });
604
+ ava_1.default("JAVA_Void_007b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
605
+ var config, card, saleResponse, response;
606
+ return __generator(this, function (_a) {
607
+ switch (_a.label) {
608
+ case 0:
609
+ t.plan(2);
610
+ config = new src_1.ServicesConfig();
611
+ config.merchantId = "heartlandgpsandbox";
612
+ config.accountId = "api";
613
+ config.sharedSecret = "secret";
614
+ config.refundPassword = "refund";
615
+ config.rebatePassword = "rebate";
616
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
617
+ config.timeout = 5000;
618
+ config.channel = "ECOM";
619
+ src_1.ServicesContainer.configure(config);
620
+ card = new src_1.CreditCardData();
621
+ card.number = "4263970000005262";
622
+ card.expMonth = "12";
623
+ card.expYear = "2020";
624
+ card.cvn = "123";
625
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
626
+ card.cardHolderName = "James Mason";
627
+ return [4 /*yield*/, card
628
+ .charge(10)
629
+ .withCurrency("EUR")
630
+ .execute()];
631
+ case 1:
632
+ saleResponse = _a.sent();
633
+ t.truthy(saleResponse);
634
+ t.is("00", saleResponse.responseCode);
635
+ return [4 /*yield*/, throttle()];
636
+ case 2:
637
+ _a.sent();
638
+ return [4 /*yield*/, saleResponse
639
+ .void()
640
+ .withDescription("JAVA-Void")
641
+ .execute()];
642
+ case 3:
643
+ response = _a.sent();
644
+ t.truthy(response);
645
+ t.is("00", response.responseCode);
646
+ return [2 /*return*/];
647
+ }
648
+ });
649
+ }); });
650
+ ava_1.default("JAVA_Void_007c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
651
+ var config, card, saleResponse, response;
652
+ return __generator(this, function (_a) {
653
+ switch (_a.label) {
654
+ case 0:
655
+ t.plan(2);
656
+ config = new src_1.ServicesConfig();
657
+ config.merchantId = "heartlandgpsandbox";
658
+ config.accountId = "api";
659
+ config.sharedSecret = "secret";
660
+ config.refundPassword = "refund";
661
+ config.rebatePassword = "rebate";
662
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
663
+ config.timeout = 5000;
664
+ config.channel = "ECOM";
665
+ src_1.ServicesContainer.configure(config);
666
+ card = new src_1.CreditCardData();
667
+ card.number = "4263970000005262";
668
+ card.expMonth = "12";
669
+ card.expYear = "2020";
670
+ card.cvn = "123";
671
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
672
+ card.cardHolderName = "James Mason";
673
+ return [4 /*yield*/, card
674
+ .charge(10)
675
+ .withCurrency("EUR")
676
+ .execute()];
677
+ case 1:
678
+ saleResponse = _a.sent();
679
+ t.truthy(saleResponse);
680
+ t.is("00", saleResponse.responseCode);
681
+ return [4 /*yield*/, throttle()];
682
+ case 2:
683
+ _a.sent();
684
+ return [4 /*yield*/, saleResponse
685
+ .void()
686
+ .withDescription("JAVA-Void")
687
+ .execute()];
688
+ case 3:
689
+ response = _a.sent();
690
+ t.truthy(response);
691
+ t.is("00", response.responseCode);
692
+ return [2 /*return*/];
693
+ }
694
+ });
695
+ }); });
696
+ ava_1.default("JAVA_Void_007d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
697
+ var config, card, saleResponse, response;
698
+ return __generator(this, function (_a) {
699
+ switch (_a.label) {
700
+ case 0:
701
+ t.plan(2);
702
+ config = new src_1.ServicesConfig();
703
+ config.merchantId = "heartlandgpsandbox";
704
+ config.accountId = "api";
705
+ config.sharedSecret = "secret";
706
+ config.refundPassword = "refund";
707
+ config.rebatePassword = "rebate";
708
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
709
+ config.timeout = 5000;
710
+ config.channel = "ECOM";
711
+ src_1.ServicesContainer.configure(config);
712
+ card = new src_1.CreditCardData();
713
+ card.number = "4263970000005262";
714
+ card.expMonth = "12";
715
+ card.expYear = "2020";
716
+ card.cvn = "123";
717
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
718
+ card.cardHolderName = "James Mason";
719
+ return [4 /*yield*/, card
720
+ .charge(10)
721
+ .withCurrency("EUR")
722
+ .execute()];
723
+ case 1:
724
+ saleResponse = _a.sent();
725
+ t.truthy(saleResponse);
726
+ t.is("00", saleResponse.responseCode);
727
+ return [4 /*yield*/, throttle()];
728
+ case 2:
729
+ _a.sent();
730
+ return [4 /*yield*/, saleResponse
731
+ .void()
732
+ .withDescription("JAVA-Void")
733
+ .execute()];
734
+ case 3:
735
+ response = _a.sent();
736
+ t.truthy(response);
737
+ t.is("00", response.responseCode);
738
+ return [2 /*return*/];
739
+ }
740
+ });
741
+ }); });
742
+ ava_1.default("JAVA_Void_007e", function (t) { return __awaiter(void 0, void 0, void 0, function () {
743
+ var config, card, saleResponse, response;
744
+ return __generator(this, function (_a) {
745
+ switch (_a.label) {
746
+ case 0:
747
+ t.plan(2);
748
+ config = new src_1.ServicesConfig();
749
+ config.merchantId = "heartlandgpsandbox";
750
+ config.accountId = "api";
751
+ config.sharedSecret = "secret";
752
+ config.refundPassword = "refund";
753
+ config.rebatePassword = "rebate";
754
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
755
+ config.timeout = 5000;
756
+ config.channel = "ECOM";
757
+ src_1.ServicesContainer.configure(config);
758
+ card = new src_1.CreditCardData();
759
+ card.number = "4263970000005262";
760
+ card.expMonth = "12";
761
+ card.expYear = "2020";
762
+ card.cvn = "123";
763
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
764
+ card.cardHolderName = "James Mason";
765
+ return [4 /*yield*/, card
766
+ .charge(10)
767
+ .withCurrency("EUR")
768
+ .execute()];
769
+ case 1:
770
+ saleResponse = _a.sent();
771
+ t.truthy(saleResponse);
772
+ t.is("00", saleResponse.responseCode);
773
+ return [4 /*yield*/, throttle()];
774
+ case 2:
775
+ _a.sent();
776
+ return [4 /*yield*/, saleResponse
777
+ .void()
778
+ .withDescription("JAVA-Void")
779
+ .execute()];
780
+ case 3:
781
+ response = _a.sent();
782
+ t.truthy(response);
783
+ t.is("00", response.responseCode);
784
+ return [2 /*return*/];
785
+ }
786
+ });
787
+ }); });
788
+ ava_1.default("JAVA_Void_008a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
789
+ var config, card, saleResponse, response;
790
+ return __generator(this, function (_a) {
791
+ switch (_a.label) {
792
+ case 0:
793
+ t.plan(2);
794
+ config = new src_1.ServicesConfig();
795
+ config.merchantId = "heartlandgpsandbox";
796
+ config.accountId = "api";
797
+ config.sharedSecret = "secret";
798
+ config.refundPassword = "refund";
799
+ config.rebatePassword = "rebate";
800
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
801
+ config.timeout = 5000;
802
+ config.channel = "ECOM";
803
+ src_1.ServicesContainer.configure(config);
804
+ card = new src_1.CreditCardData();
805
+ card.number = "4263970000005262";
806
+ card.expMonth = "12";
807
+ card.expYear = "2020";
808
+ card.cvn = "123";
809
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
810
+ card.cardHolderName = "James Mason";
811
+ return [4 /*yield*/, card
812
+ .charge(10)
813
+ .withCurrency("EUR")
814
+ .execute()];
815
+ case 1:
816
+ saleResponse = _a.sent();
817
+ t.truthy(saleResponse);
818
+ t.is("00", saleResponse.responseCode);
819
+ return [4 /*yield*/, throttle()];
820
+ case 2:
821
+ _a.sent();
822
+ return [4 /*yield*/, saleResponse
823
+ .void()
824
+ .withDescription("JAVA-Void")
825
+ .execute()];
826
+ case 3:
827
+ response = _a.sent();
828
+ t.truthy(response);
829
+ t.is("00", response.responseCode);
830
+ return [2 /*return*/];
831
+ }
832
+ });
833
+ }); });
834
+ ava_1.default("JAVA_Void_008b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
835
+ var config, card, saleResponse, response;
836
+ return __generator(this, function (_a) {
837
+ switch (_a.label) {
838
+ case 0:
839
+ t.plan(2);
840
+ config = new src_1.ServicesConfig();
841
+ config.merchantId = "heartlandgpsandbox";
842
+ config.accountId = "api";
843
+ config.sharedSecret = "secret";
844
+ config.refundPassword = "refund";
845
+ config.rebatePassword = "rebate";
846
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
847
+ config.timeout = 5000;
848
+ config.channel = "ECOM";
849
+ src_1.ServicesContainer.configure(config);
850
+ card = new src_1.CreditCardData();
851
+ card.number = "4263970000005262";
852
+ card.expMonth = "12";
853
+ card.expYear = "2020";
854
+ card.cvn = "123";
855
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
856
+ card.cardHolderName = "James Mason";
857
+ return [4 /*yield*/, card
858
+ .charge(10)
859
+ .withCurrency("EUR")
860
+ .execute()];
861
+ case 1:
862
+ saleResponse = _a.sent();
863
+ t.truthy(saleResponse);
864
+ t.is("00", saleResponse.responseCode);
865
+ return [4 /*yield*/, throttle()];
866
+ case 2:
867
+ _a.sent();
868
+ return [4 /*yield*/, saleResponse
869
+ .void()
870
+ .withDescription("JAVA-Void")
871
+ .execute()];
872
+ case 3:
873
+ response = _a.sent();
874
+ t.truthy(response);
875
+ t.is("00", response.responseCode);
876
+ return [2 /*return*/];
877
+ }
878
+ });
879
+ }); });
880
+ ava_1.default("JAVA_Void_008c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
881
+ var config, card, saleResponse, response;
882
+ return __generator(this, function (_a) {
883
+ switch (_a.label) {
884
+ case 0:
885
+ t.plan(2);
886
+ config = new src_1.ServicesConfig();
887
+ config.merchantId = "heartlandgpsandbox";
888
+ config.accountId = "api";
889
+ config.sharedSecret = "secret";
890
+ config.refundPassword = "refund";
891
+ config.rebatePassword = "rebate";
892
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
893
+ config.timeout = 5000;
894
+ config.channel = "ECOM";
895
+ src_1.ServicesContainer.configure(config);
896
+ card = new src_1.CreditCardData();
897
+ card.number = "4263970000005262";
898
+ card.expMonth = "12";
899
+ card.expYear = "2020";
900
+ card.cvn = "123";
901
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
902
+ card.cardHolderName = "James Mason";
903
+ return [4 /*yield*/, card
904
+ .charge(10)
905
+ .withCurrency("EUR")
906
+ .execute()];
907
+ case 1:
908
+ saleResponse = _a.sent();
909
+ t.truthy(saleResponse);
910
+ t.is("00", saleResponse.responseCode);
911
+ return [4 /*yield*/, throttle()];
912
+ case 2:
913
+ _a.sent();
914
+ return [4 /*yield*/, saleResponse
915
+ .void()
916
+ .withDescription("JAVA-Void")
917
+ .execute()];
918
+ case 3:
919
+ response = _a.sent();
920
+ t.truthy(response);
921
+ t.is("00", response.responseCode);
922
+ return [2 /*return*/];
923
+ }
924
+ });
925
+ }); });
926
+ ava_1.default("JAVA_Void_008d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
927
+ var config, card, saleResponse, response;
928
+ return __generator(this, function (_a) {
929
+ switch (_a.label) {
930
+ case 0:
931
+ t.plan(2);
932
+ config = new src_1.ServicesConfig();
933
+ config.merchantId = "heartlandgpsandbox";
934
+ config.accountId = "api";
935
+ config.sharedSecret = "secret";
936
+ config.refundPassword = "refund";
937
+ config.rebatePassword = "rebate";
938
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
939
+ config.timeout = 5000;
940
+ config.channel = "ECOM";
941
+ src_1.ServicesContainer.configure(config);
942
+ card = new src_1.CreditCardData();
943
+ card.number = "4263970000005262";
944
+ card.expMonth = "12";
945
+ card.expYear = "2020";
946
+ card.cvn = "123";
947
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
948
+ card.cardHolderName = "James Mason";
949
+ return [4 /*yield*/, card
950
+ .charge(10)
951
+ .withCurrency("EUR")
952
+ .execute()];
953
+ case 1:
954
+ saleResponse = _a.sent();
955
+ t.truthy(saleResponse);
956
+ t.is("00", saleResponse.responseCode);
957
+ return [4 /*yield*/, throttle()];
958
+ case 2:
959
+ _a.sent();
960
+ return [4 /*yield*/, saleResponse
961
+ .void()
962
+ .withDescription("JAVA-Void")
963
+ .execute()];
964
+ case 3:
965
+ response = _a.sent();
966
+ t.truthy(response);
967
+ t.is("00", response.responseCode);
968
+ return [2 /*return*/];
969
+ }
970
+ });
971
+ }); });
972
+ ava_1.default("JAVA_Void_009e", function (t) { return __awaiter(void 0, void 0, void 0, function () {
973
+ var config, card, saleResponse, error;
974
+ return __generator(this, function (_a) {
975
+ switch (_a.label) {
976
+ case 0:
977
+ t.plan(2);
978
+ config = new src_1.ServicesConfig();
979
+ config.merchantId = "heartlandgpsandbox";
980
+ config.accountId = "api";
981
+ config.sharedSecret = "secret";
982
+ config.refundPassword = "refund";
983
+ config.rebatePassword = "rebate";
984
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
985
+ config.timeout = 5000;
986
+ config.channel = "EC";
987
+ src_1.ServicesContainer.configure(config);
988
+ card = new src_1.CreditCardData();
989
+ card.number = "4263970000005262";
990
+ card.expMonth = "12";
991
+ card.expYear = "2020";
992
+ card.cvn = "123";
993
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
994
+ card.cardHolderName = "James Mason";
995
+ return [4 /*yield*/, card
996
+ .charge(10)
997
+ .withCurrency("EUR")
998
+ .execute()];
999
+ case 1:
1000
+ saleResponse = _a.sent();
1001
+ t.truthy(saleResponse);
1002
+ t.is("00", saleResponse.responseCode);
1003
+ return [4 /*yield*/, throttle()];
1004
+ case 2:
1005
+ _a.sent();
1006
+ return [4 /*yield*/, t.throws(saleResponse
1007
+ .void()
1008
+ .withDescription("JAVA-Void")
1009
+ .execute(), src_1.GatewayError)];
1010
+ case 3:
1011
+ error = _a.sent();
1012
+ t.truthy(error.message);
1013
+ return [2 /*return*/];
1014
+ }
1015
+ });
1016
+ }); });
1017
+ ava_1.default("JAVA_Void_009a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1018
+ var config, card, saleResponse, response;
1019
+ return __generator(this, function (_a) {
1020
+ switch (_a.label) {
1021
+ case 0:
1022
+ t.plan(2);
1023
+ config = new src_1.ServicesConfig();
1024
+ config.merchantId = "heartlandgpsandbox";
1025
+ config.accountId = "api";
1026
+ config.sharedSecret = "secret";
1027
+ config.refundPassword = "refund";
1028
+ config.rebatePassword = "rebate";
1029
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1030
+ config.timeout = 5000;
1031
+ config.channel = "ECOM";
1032
+ src_1.ServicesContainer.configure(config);
1033
+ card = new src_1.CreditCardData();
1034
+ card.number = "4263970000005262";
1035
+ card.expMonth = "12";
1036
+ card.expYear = "2020";
1037
+ card.cvn = "123";
1038
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1039
+ card.cardHolderName = "James Mason";
1040
+ return [4 /*yield*/, card
1041
+ .charge(10)
1042
+ .withCurrency("EUR")
1043
+ .execute()];
1044
+ case 1:
1045
+ saleResponse = _a.sent();
1046
+ t.truthy(saleResponse);
1047
+ t.is("00", saleResponse.responseCode);
1048
+ return [4 /*yield*/, throttle()];
1049
+ case 2:
1050
+ _a.sent();
1051
+ return [4 /*yield*/, saleResponse
1052
+ .void()
1053
+ .withDescription("JAVA-Void")
1054
+ .execute()];
1055
+ case 3:
1056
+ response = _a.sent();
1057
+ t.truthy(response);
1058
+ t.is("00", response.responseCode);
1059
+ return [2 /*return*/];
1060
+ }
1061
+ });
1062
+ }); });
1063
+ ava_1.default("JAVA_Void_009b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1064
+ var config, card, saleResponse, response;
1065
+ return __generator(this, function (_a) {
1066
+ switch (_a.label) {
1067
+ case 0:
1068
+ t.plan(2);
1069
+ config = new src_1.ServicesConfig();
1070
+ config.merchantId = "heartlandgpsandbox";
1071
+ config.accountId = "api";
1072
+ config.sharedSecret = "secret";
1073
+ config.refundPassword = "refund";
1074
+ config.rebatePassword = "rebate";
1075
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1076
+ config.timeout = 5000;
1077
+ config.channel = "ECOM";
1078
+ src_1.ServicesContainer.configure(config);
1079
+ card = new src_1.CreditCardData();
1080
+ card.number = "4263970000005262";
1081
+ card.expMonth = "12";
1082
+ card.expYear = "2020";
1083
+ card.cvn = "123";
1084
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1085
+ card.cardHolderName = "James Mason";
1086
+ return [4 /*yield*/, card
1087
+ .charge(10)
1088
+ .withCurrency("EUR")
1089
+ .execute()];
1090
+ case 1:
1091
+ saleResponse = _a.sent();
1092
+ t.truthy(saleResponse);
1093
+ t.is("00", saleResponse.responseCode);
1094
+ return [4 /*yield*/, throttle()];
1095
+ case 2:
1096
+ _a.sent();
1097
+ return [4 /*yield*/, saleResponse
1098
+ .void()
1099
+ .withDescription("JAVA-Void")
1100
+ .execute()];
1101
+ case 3:
1102
+ response = _a.sent();
1103
+ t.truthy(response);
1104
+ t.is("00", response.responseCode);
1105
+ return [2 /*return*/];
1106
+ }
1107
+ });
1108
+ }); });
1109
+ ava_1.default("JAVA_Void_009c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1110
+ var config, card, saleResponse, error;
1111
+ return __generator(this, function (_a) {
1112
+ switch (_a.label) {
1113
+ case 0:
1114
+ t.plan(2);
1115
+ config = new src_1.ServicesConfig();
1116
+ config.merchantId = "heartlandgpsandbox";
1117
+ config.accountId = "api";
1118
+ config.sharedSecret = "secret";
1119
+ config.refundPassword = "refund";
1120
+ config.rebatePassword = "rebate";
1121
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1122
+ config.timeout = 5000;
1123
+ // tslint:disable:max-line-length
1124
+ config.channel =
1125
+ "ECOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOm";
1126
+ // tslint:enable:max-line-length
1127
+ src_1.ServicesContainer.configure(config);
1128
+ card = new src_1.CreditCardData();
1129
+ card.number = "4263970000005262";
1130
+ card.expMonth = "12";
1131
+ card.expYear = "2020";
1132
+ card.cvn = "123";
1133
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1134
+ card.cardHolderName = "James Mason";
1135
+ return [4 /*yield*/, card
1136
+ .charge(10)
1137
+ .withCurrency("EUR")
1138
+ .execute()];
1139
+ case 1:
1140
+ saleResponse = _a.sent();
1141
+ t.truthy(saleResponse);
1142
+ t.is("00", saleResponse.responseCode);
1143
+ return [4 /*yield*/, throttle()];
1144
+ case 2:
1145
+ _a.sent();
1146
+ return [4 /*yield*/, t.throws(saleResponse
1147
+ .void()
1148
+ .withDescription("JAVA-Void")
1149
+ .execute(), src_1.GatewayError)];
1150
+ case 3:
1151
+ error = _a.sent();
1152
+ t.truthy(error.message);
1153
+ return [2 /*return*/];
1154
+ }
1155
+ });
1156
+ }); });
1157
+ ava_1.default("JAVA_Void_009d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1158
+ var config, card, saleResponse, error;
1159
+ return __generator(this, function (_a) {
1160
+ switch (_a.label) {
1161
+ case 0:
1162
+ t.plan(2);
1163
+ config = new src_1.ServicesConfig();
1164
+ config.merchantId = "heartlandgpsandbox";
1165
+ config.accountId = "api";
1166
+ config.sharedSecret = "secret";
1167
+ config.refundPassword = "refund";
1168
+ config.rebatePassword = "rebate";
1169
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1170
+ config.timeout = 5000;
1171
+ config.channel = "ECO#";
1172
+ src_1.ServicesContainer.configure(config);
1173
+ card = new src_1.CreditCardData();
1174
+ card.number = "4263970000005262";
1175
+ card.expMonth = "12";
1176
+ card.expYear = "2020";
1177
+ card.cvn = "123";
1178
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1179
+ card.cardHolderName = "James Mason";
1180
+ return [4 /*yield*/, card
1181
+ .charge(10)
1182
+ .withCurrency("EUR")
1183
+ .execute()];
1184
+ case 1:
1185
+ saleResponse = _a.sent();
1186
+ t.truthy(saleResponse);
1187
+ t.is("00", saleResponse.responseCode);
1188
+ return [4 /*yield*/, throttle()];
1189
+ case 2:
1190
+ _a.sent();
1191
+ return [4 /*yield*/, t.throws(saleResponse
1192
+ .void()
1193
+ .withDescription("JAVA-Void")
1194
+ .execute(), src_1.GatewayError)];
1195
+ case 3:
1196
+ error = _a.sent();
1197
+ t.truthy(error.message);
1198
+ return [2 /*return*/];
1199
+ }
1200
+ });
1201
+ }); });
1202
+ ava_1.default("JAVA_Void_010c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1203
+ var config, card, saleResponse, response;
1204
+ return __generator(this, function (_a) {
1205
+ switch (_a.label) {
1206
+ case 0:
1207
+ t.plan(2);
1208
+ config = new src_1.ServicesConfig();
1209
+ config.merchantId = "heartlandgpsandbox";
1210
+ config.accountId = "api";
1211
+ config.sharedSecret = "secret";
1212
+ config.refundPassword = "refund";
1213
+ config.rebatePassword = "rebate";
1214
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1215
+ config.timeout = 5000;
1216
+ config.channel = "ECOM";
1217
+ src_1.ServicesContainer.configure(config);
1218
+ card = new src_1.CreditCardData();
1219
+ card.number = "4263970000005262";
1220
+ card.expMonth = "12";
1221
+ card.expYear = "2020";
1222
+ card.cvn = "123";
1223
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1224
+ card.cardHolderName = "James Mason";
1225
+ return [4 /*yield*/, card
1226
+ .charge(10)
1227
+ .withCurrency("EUR")
1228
+ .execute()];
1229
+ case 1:
1230
+ saleResponse = _a.sent();
1231
+ t.truthy(saleResponse);
1232
+ t.is("00", saleResponse.responseCode);
1233
+ return [4 /*yield*/, throttle()];
1234
+ case 2:
1235
+ _a.sent();
1236
+ return [4 /*yield*/, saleResponse
1237
+ .void()
1238
+ .withDescription("JAVA-Void")
1239
+ .execute()];
1240
+ case 3:
1241
+ response = _a.sent();
1242
+ t.truthy(response);
1243
+ t.is("00", response.responseCode);
1244
+ return [2 /*return*/];
1245
+ }
1246
+ });
1247
+ }); });
1248
+ ava_1.default("JAVA_Void_010d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1249
+ var config, card, saleResponse, response;
1250
+ return __generator(this, function (_a) {
1251
+ switch (_a.label) {
1252
+ case 0:
1253
+ t.plan(2);
1254
+ config = new src_1.ServicesConfig();
1255
+ config.merchantId = "heartlandgpsandbox";
1256
+ config.accountId = "api";
1257
+ config.sharedSecret = "secret";
1258
+ config.refundPassword = "refund";
1259
+ config.rebatePassword = "rebate";
1260
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1261
+ config.timeout = 5000;
1262
+ config.channel = "ECOM";
1263
+ src_1.ServicesContainer.configure(config);
1264
+ card = new src_1.CreditCardData();
1265
+ card.number = "4263970000005262";
1266
+ card.expMonth = "12";
1267
+ card.expYear = "2020";
1268
+ card.cvn = "123";
1269
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1270
+ card.cardHolderName = "James Mason";
1271
+ return [4 /*yield*/, card
1272
+ .charge(10)
1273
+ .withCurrency("EUR")
1274
+ .execute()];
1275
+ case 1:
1276
+ saleResponse = _a.sent();
1277
+ t.truthy(saleResponse);
1278
+ t.is("00", saleResponse.responseCode);
1279
+ return [4 /*yield*/, throttle()];
1280
+ case 2:
1281
+ _a.sent();
1282
+ return [4 /*yield*/, saleResponse
1283
+ .void()
1284
+ .withDescription("JAVA-Void")
1285
+ .execute()];
1286
+ case 3:
1287
+ response = _a.sent();
1288
+ t.truthy(response);
1289
+ t.is("00", response.responseCode);
1290
+ return [2 /*return*/];
1291
+ }
1292
+ });
1293
+ }); });
1294
+ ava_1.default("JAVA_Void_010e", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1295
+ var config, card, saleResponse, response;
1296
+ return __generator(this, function (_a) {
1297
+ switch (_a.label) {
1298
+ case 0:
1299
+ t.plan(2);
1300
+ config = new src_1.ServicesConfig();
1301
+ config.merchantId = "heartlandgpsandbox";
1302
+ config.accountId = "api";
1303
+ config.sharedSecret = "secret";
1304
+ config.refundPassword = "refund";
1305
+ config.rebatePassword = "rebate";
1306
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1307
+ config.timeout = 5000;
1308
+ config.channel = "ECOM";
1309
+ src_1.ServicesContainer.configure(config);
1310
+ card = new src_1.CreditCardData();
1311
+ card.number = "4263970000005262";
1312
+ card.expMonth = "12";
1313
+ card.expYear = "2020";
1314
+ card.cvn = "123";
1315
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1316
+ card.cardHolderName = "James Mason";
1317
+ return [4 /*yield*/, card
1318
+ .charge(10)
1319
+ .withCurrency("EUR")
1320
+ .execute()];
1321
+ case 1:
1322
+ saleResponse = _a.sent();
1323
+ t.truthy(saleResponse);
1324
+ t.is("00", saleResponse.responseCode);
1325
+ return [4 /*yield*/, throttle()];
1326
+ case 2:
1327
+ _a.sent();
1328
+ return [4 /*yield*/, saleResponse
1329
+ .void()
1330
+ .withDescription("JAVA-Void")
1331
+ .execute()];
1332
+ case 3:
1333
+ response = _a.sent();
1334
+ t.truthy(response);
1335
+ t.is("00", response.responseCode);
1336
+ return [2 /*return*/];
1337
+ }
1338
+ });
1339
+ }); });
1340
+ ava_1.default("JAVA_Void_011a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1341
+ var config, card, saleResponse, response;
1342
+ return __generator(this, function (_a) {
1343
+ switch (_a.label) {
1344
+ case 0:
1345
+ t.plan(2);
1346
+ config = new src_1.ServicesConfig();
1347
+ config.merchantId = "heartlandgpsandbox";
1348
+ config.accountId = "api";
1349
+ config.sharedSecret = "secret";
1350
+ config.refundPassword = "refund";
1351
+ config.rebatePassword = "rebate";
1352
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1353
+ config.timeout = 5000;
1354
+ config.channel = "ECOM";
1355
+ src_1.ServicesContainer.configure(config);
1356
+ card = new src_1.CreditCardData();
1357
+ card.number = "4263970000005262";
1358
+ card.expMonth = "12";
1359
+ card.expYear = "2020";
1360
+ card.cvn = "123";
1361
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1362
+ card.cardHolderName = "James Mason";
1363
+ return [4 /*yield*/, card
1364
+ .charge(10)
1365
+ .withCurrency("EUR")
1366
+ .execute()];
1367
+ case 1:
1368
+ saleResponse = _a.sent();
1369
+ t.truthy(saleResponse);
1370
+ t.is("00", saleResponse.responseCode);
1371
+ return [4 /*yield*/, throttle()];
1372
+ case 2:
1373
+ _a.sent();
1374
+ return [4 /*yield*/, saleResponse
1375
+ .void()
1376
+ .withDescription("JAVA-Void")
1377
+ .execute()];
1378
+ case 3:
1379
+ response = _a.sent();
1380
+ t.truthy(response);
1381
+ t.is("00", response.responseCode);
1382
+ return [2 /*return*/];
1383
+ }
1384
+ });
1385
+ }); });
1386
+ ava_1.default("JAVA_Void_011b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1387
+ var config, card, saleResponse, response;
1388
+ return __generator(this, function (_a) {
1389
+ switch (_a.label) {
1390
+ case 0:
1391
+ t.plan(2);
1392
+ config = new src_1.ServicesConfig();
1393
+ config.merchantId = "heartlandgpsandbox";
1394
+ config.accountId = "api";
1395
+ config.sharedSecret = "secret";
1396
+ config.refundPassword = "refund";
1397
+ config.rebatePassword = "rebate";
1398
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1399
+ config.timeout = 5000;
1400
+ config.channel = "ECOM";
1401
+ src_1.ServicesContainer.configure(config);
1402
+ card = new src_1.CreditCardData();
1403
+ card.number = "4263970000005262";
1404
+ card.expMonth = "12";
1405
+ card.expYear = "2020";
1406
+ card.cvn = "123";
1407
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1408
+ card.cardHolderName = "James Mason";
1409
+ return [4 /*yield*/, card
1410
+ .charge(10)
1411
+ .withCurrency("EUR")
1412
+ .execute()];
1413
+ case 1:
1414
+ saleResponse = _a.sent();
1415
+ t.truthy(saleResponse);
1416
+ t.is("00", saleResponse.responseCode);
1417
+ return [4 /*yield*/, throttle()];
1418
+ case 2:
1419
+ _a.sent();
1420
+ return [4 /*yield*/, saleResponse
1421
+ .void()
1422
+ .withDescription("JAVA-Void")
1423
+ .execute()];
1424
+ case 3:
1425
+ response = _a.sent();
1426
+ t.truthy(response);
1427
+ t.is("00", response.responseCode);
1428
+ return [2 /*return*/];
1429
+ }
1430
+ });
1431
+ }); });
1432
+ ava_1.default("JAVA_Void_011c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1433
+ var config, card, saleResponse, response;
1434
+ return __generator(this, function (_a) {
1435
+ switch (_a.label) {
1436
+ case 0:
1437
+ t.plan(2);
1438
+ config = new src_1.ServicesConfig();
1439
+ config.merchantId = "heartlandgpsandbox";
1440
+ config.accountId = "api";
1441
+ config.sharedSecret = "secret";
1442
+ config.refundPassword = "refund";
1443
+ config.rebatePassword = "rebate";
1444
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1445
+ config.timeout = 5000;
1446
+ config.channel = "ECOM";
1447
+ src_1.ServicesContainer.configure(config);
1448
+ card = new src_1.CreditCardData();
1449
+ card.number = "4263970000005262";
1450
+ card.expMonth = "12";
1451
+ card.expYear = "2020";
1452
+ card.cvn = "123";
1453
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1454
+ card.cardHolderName = "James Mason";
1455
+ return [4 /*yield*/, card
1456
+ .charge(10)
1457
+ .withCurrency("EUR")
1458
+ .execute()];
1459
+ case 1:
1460
+ saleResponse = _a.sent();
1461
+ t.truthy(saleResponse);
1462
+ t.is("00", saleResponse.responseCode);
1463
+ return [4 /*yield*/, throttle()];
1464
+ case 2:
1465
+ _a.sent();
1466
+ return [4 /*yield*/, saleResponse
1467
+ .void()
1468
+ .withDescription("JAVA-Void")
1469
+ .execute()];
1470
+ case 3:
1471
+ response = _a.sent();
1472
+ t.truthy(response);
1473
+ t.is("00", response.responseCode);
1474
+ return [2 /*return*/];
1475
+ }
1476
+ });
1477
+ }); });
1478
+ ava_1.default("JAVA_Void_011d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1479
+ var config, card, saleResponse, response;
1480
+ return __generator(this, function (_a) {
1481
+ switch (_a.label) {
1482
+ case 0:
1483
+ t.plan(2);
1484
+ config = new src_1.ServicesConfig();
1485
+ config.merchantId = "heartlandgpsandbox";
1486
+ config.accountId = "api";
1487
+ config.sharedSecret = "secret";
1488
+ config.refundPassword = "refund";
1489
+ config.rebatePassword = "rebate";
1490
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1491
+ config.timeout = 5000;
1492
+ config.channel = "ECOM";
1493
+ src_1.ServicesContainer.configure(config);
1494
+ card = new src_1.CreditCardData();
1495
+ card.number = "4263970000005262";
1496
+ card.expMonth = "12";
1497
+ card.expYear = "2020";
1498
+ card.cvn = "123";
1499
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1500
+ card.cardHolderName = "James Mason";
1501
+ return [4 /*yield*/, card
1502
+ .charge(10)
1503
+ .withCurrency("EUR")
1504
+ .execute()];
1505
+ case 1:
1506
+ saleResponse = _a.sent();
1507
+ t.truthy(saleResponse);
1508
+ t.is("00", saleResponse.responseCode);
1509
+ return [4 /*yield*/, throttle()];
1510
+ case 2:
1511
+ _a.sent();
1512
+ return [4 /*yield*/, saleResponse
1513
+ .void()
1514
+ .withDescription("JAVA-Void")
1515
+ .execute()];
1516
+ case 3:
1517
+ response = _a.sent();
1518
+ t.truthy(response);
1519
+ t.is("00", response.responseCode);
1520
+ return [2 /*return*/];
1521
+ }
1522
+ });
1523
+ }); });
1524
+ ava_1.default("JAVA_Void_012a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1525
+ var config, card, saleResponse, response;
1526
+ return __generator(this, function (_a) {
1527
+ switch (_a.label) {
1528
+ case 0:
1529
+ t.plan(2);
1530
+ config = new src_1.ServicesConfig();
1531
+ config.merchantId = "heartlandgpsandbox";
1532
+ config.accountId = "api";
1533
+ config.sharedSecret = "secret";
1534
+ config.refundPassword = "refund";
1535
+ config.rebatePassword = "rebate";
1536
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1537
+ config.timeout = 5000;
1538
+ config.channel = "ECOM";
1539
+ src_1.ServicesContainer.configure(config);
1540
+ card = new src_1.CreditCardData();
1541
+ card.number = "4263970000005262";
1542
+ card.expMonth = "12";
1543
+ card.expYear = "2020";
1544
+ card.cvn = "123";
1545
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1546
+ card.cardHolderName = "James Mason";
1547
+ return [4 /*yield*/, card
1548
+ .charge(10)
1549
+ .withCurrency("EUR")
1550
+ .execute()];
1551
+ case 1:
1552
+ saleResponse = _a.sent();
1553
+ t.truthy(saleResponse);
1554
+ t.is("00", saleResponse.responseCode);
1555
+ return [4 /*yield*/, throttle()];
1556
+ case 2:
1557
+ _a.sent();
1558
+ return [4 /*yield*/, saleResponse
1559
+ .void()
1560
+ .withDescription("JAVA-Void")
1561
+ .execute()];
1562
+ case 3:
1563
+ response = _a.sent();
1564
+ t.truthy(response);
1565
+ t.is("00", response.responseCode);
1566
+ return [2 /*return*/];
1567
+ }
1568
+ });
1569
+ }); });
1570
+ ava_1.default("JAVA_Void_012b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1571
+ var config, card, saleResponse, response;
1572
+ return __generator(this, function (_a) {
1573
+ switch (_a.label) {
1574
+ case 0:
1575
+ t.plan(2);
1576
+ config = new src_1.ServicesConfig();
1577
+ config.merchantId = "heartlandgpsandbox";
1578
+ config.accountId = "api";
1579
+ config.sharedSecret = "secret";
1580
+ config.refundPassword = "refund";
1581
+ config.rebatePassword = "rebate";
1582
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1583
+ config.timeout = 5000;
1584
+ config.channel = "ECOM";
1585
+ src_1.ServicesContainer.configure(config);
1586
+ card = new src_1.CreditCardData();
1587
+ card.number = "4263970000005262";
1588
+ card.expMonth = "12";
1589
+ card.expYear = "2020";
1590
+ card.cvn = "123";
1591
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1592
+ card.cardHolderName = "James Mason";
1593
+ return [4 /*yield*/, card
1594
+ .charge(10)
1595
+ .withCurrency("EUR")
1596
+ .execute()];
1597
+ case 1:
1598
+ saleResponse = _a.sent();
1599
+ t.truthy(saleResponse);
1600
+ t.is("00", saleResponse.responseCode);
1601
+ return [4 /*yield*/, throttle()];
1602
+ case 2:
1603
+ _a.sent();
1604
+ return [4 /*yield*/, saleResponse
1605
+ .void()
1606
+ .withDescription("JAVA-Void")
1607
+ .execute()];
1608
+ case 3:
1609
+ response = _a.sent();
1610
+ t.truthy(response);
1611
+ t.is("00", response.responseCode);
1612
+ return [2 /*return*/];
1613
+ }
1614
+ });
1615
+ }); });
1616
+ ava_1.default("JAVA_Void_012c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1617
+ var config, card, saleResponse, response;
1618
+ return __generator(this, function (_a) {
1619
+ switch (_a.label) {
1620
+ case 0:
1621
+ t.plan(2);
1622
+ config = new src_1.ServicesConfig();
1623
+ config.merchantId = "heartlandgpsandbox";
1624
+ config.accountId = "api";
1625
+ config.sharedSecret = "secret";
1626
+ config.refundPassword = "refund";
1627
+ config.rebatePassword = "rebate";
1628
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1629
+ config.timeout = 5000;
1630
+ config.channel = "ECOM";
1631
+ src_1.ServicesContainer.configure(config);
1632
+ card = new src_1.CreditCardData();
1633
+ card.number = "4263970000005262";
1634
+ card.expMonth = "12";
1635
+ card.expYear = "2020";
1636
+ card.cvn = "123";
1637
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1638
+ card.cardHolderName = "James Mason";
1639
+ return [4 /*yield*/, card
1640
+ .charge(10)
1641
+ .withCurrency("EUR")
1642
+ .execute()];
1643
+ case 1:
1644
+ saleResponse = _a.sent();
1645
+ t.truthy(saleResponse);
1646
+ t.is("00", saleResponse.responseCode);
1647
+ return [4 /*yield*/, throttle()];
1648
+ case 2:
1649
+ _a.sent();
1650
+ return [4 /*yield*/, saleResponse
1651
+ .void()
1652
+ .withDescription("JAVA-Void")
1653
+ .execute()];
1654
+ case 3:
1655
+ response = _a.sent();
1656
+ t.truthy(response);
1657
+ t.is("00", response.responseCode);
1658
+ return [2 /*return*/];
1659
+ }
1660
+ });
1661
+ }); });
1662
+ ava_1.default("JAVA_Void_012d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1663
+ var config, card, saleResponse, response;
1664
+ return __generator(this, function (_a) {
1665
+ switch (_a.label) {
1666
+ case 0:
1667
+ t.plan(2);
1668
+ config = new src_1.ServicesConfig();
1669
+ config.merchantId = "heartlandgpsandbox";
1670
+ config.accountId = "api";
1671
+ config.sharedSecret = "secret";
1672
+ config.refundPassword = "refund";
1673
+ config.rebatePassword = "rebate";
1674
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1675
+ config.timeout = 5000;
1676
+ config.channel = "ECOM";
1677
+ src_1.ServicesContainer.configure(config);
1678
+ card = new src_1.CreditCardData();
1679
+ card.number = "4263970000005262";
1680
+ card.expMonth = "12";
1681
+ card.expYear = "2020";
1682
+ card.cvn = "123";
1683
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1684
+ card.cardHolderName = "James Mason";
1685
+ return [4 /*yield*/, card
1686
+ .charge(10)
1687
+ .withCurrency("EUR")
1688
+ .execute()];
1689
+ case 1:
1690
+ saleResponse = _a.sent();
1691
+ t.truthy(saleResponse);
1692
+ t.is("00", saleResponse.responseCode);
1693
+ return [4 /*yield*/, throttle()];
1694
+ case 2:
1695
+ _a.sent();
1696
+ return [4 /*yield*/, saleResponse
1697
+ .void()
1698
+ .withDescription("JAVA-Void")
1699
+ .execute()];
1700
+ case 3:
1701
+ response = _a.sent();
1702
+ t.truthy(response);
1703
+ t.is("00", response.responseCode);
1704
+ return [2 /*return*/];
1705
+ }
1706
+ });
1707
+ }); });
1708
+ ava_1.default("JAVA_Void_013a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1709
+ var config, card, saleResponse, response;
1710
+ return __generator(this, function (_a) {
1711
+ switch (_a.label) {
1712
+ case 0:
1713
+ t.plan(2);
1714
+ config = new src_1.ServicesConfig();
1715
+ config.merchantId = "heartlandgpsandbox";
1716
+ config.accountId = "api";
1717
+ config.sharedSecret = "secret";
1718
+ config.refundPassword = "refund";
1719
+ config.rebatePassword = "rebate";
1720
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1721
+ config.timeout = 5000;
1722
+ config.channel = "ECOM";
1723
+ src_1.ServicesContainer.configure(config);
1724
+ card = new src_1.CreditCardData();
1725
+ card.number = "4263970000005262";
1726
+ card.expMonth = "12";
1727
+ card.expYear = "2020";
1728
+ card.cvn = "123";
1729
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1730
+ card.cardHolderName = "James Mason";
1731
+ return [4 /*yield*/, card
1732
+ .charge(10)
1733
+ .withCurrency("EUR")
1734
+ .execute()];
1735
+ case 1:
1736
+ saleResponse = _a.sent();
1737
+ t.truthy(saleResponse);
1738
+ t.is("00", saleResponse.responseCode);
1739
+ return [4 /*yield*/, throttle()];
1740
+ case 2:
1741
+ _a.sent();
1742
+ return [4 /*yield*/, saleResponse
1743
+ .void()
1744
+ .withDescription("JAVA-Void")
1745
+ .execute()];
1746
+ case 3:
1747
+ response = _a.sent();
1748
+ t.truthy(response);
1749
+ t.is("00", response.responseCode);
1750
+ return [2 /*return*/];
1751
+ }
1752
+ });
1753
+ }); });
1754
+ ava_1.default("JAVA_Void_014a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1755
+ var config, card, saleResponse, response;
1756
+ return __generator(this, function (_a) {
1757
+ switch (_a.label) {
1758
+ case 0:
1759
+ t.plan(2);
1760
+ config = new src_1.ServicesConfig();
1761
+ config.merchantId = "heartlandgpsandbox";
1762
+ config.accountId = "api";
1763
+ config.sharedSecret = "secret";
1764
+ config.refundPassword = "refund";
1765
+ config.rebatePassword = "rebate";
1766
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1767
+ config.timeout = 5000;
1768
+ config.channel = "ECOM";
1769
+ src_1.ServicesContainer.configure(config);
1770
+ card = new src_1.CreditCardData();
1771
+ card.number = "4263970000005262";
1772
+ card.expMonth = "12";
1773
+ card.expYear = "2020";
1774
+ card.cvn = "123";
1775
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1776
+ card.cardHolderName = "James Mason";
1777
+ return [4 /*yield*/, card
1778
+ .charge(10)
1779
+ .withCurrency("EUR")
1780
+ .execute()];
1781
+ case 1:
1782
+ saleResponse = _a.sent();
1783
+ t.truthy(saleResponse);
1784
+ t.is("00", saleResponse.responseCode);
1785
+ return [4 /*yield*/, throttle()];
1786
+ case 2:
1787
+ _a.sent();
1788
+ return [4 /*yield*/, saleResponse
1789
+ .void()
1790
+ .withDescription("JAVA-Void")
1791
+ .execute()];
1792
+ case 3:
1793
+ response = _a.sent();
1794
+ t.truthy(response);
1795
+ t.is("00", response.responseCode);
1796
+ return [2 /*return*/];
1797
+ }
1798
+ });
1799
+ }); });
1800
+ ava_1.default("JAVA_Void_014b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1801
+ var config, card, saleResponse, response;
1802
+ return __generator(this, function (_a) {
1803
+ switch (_a.label) {
1804
+ case 0:
1805
+ t.plan(2);
1806
+ config = new src_1.ServicesConfig();
1807
+ config.merchantId = "heartlandgpsandbox";
1808
+ config.accountId = "api";
1809
+ config.sharedSecret = "secret";
1810
+ config.refundPassword = "refund";
1811
+ config.rebatePassword = "rebate";
1812
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1813
+ config.timeout = 5000;
1814
+ config.channel = "ECOM";
1815
+ src_1.ServicesContainer.configure(config);
1816
+ card = new src_1.CreditCardData();
1817
+ card.number = "4263970000005262";
1818
+ card.expMonth = "12";
1819
+ card.expYear = "2020";
1820
+ card.cvn = "123";
1821
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1822
+ card.cardHolderName = "James Mason";
1823
+ return [4 /*yield*/, card
1824
+ .charge(10)
1825
+ .withCurrency("EUR")
1826
+ .execute()];
1827
+ case 1:
1828
+ saleResponse = _a.sent();
1829
+ t.truthy(saleResponse);
1830
+ t.is("00", saleResponse.responseCode);
1831
+ return [4 /*yield*/, throttle()];
1832
+ case 2:
1833
+ _a.sent();
1834
+ return [4 /*yield*/, saleResponse
1835
+ .void()
1836
+ .withDescription("JAVA-Void")
1837
+ .execute()];
1838
+ case 3:
1839
+ response = _a.sent();
1840
+ t.truthy(response);
1841
+ t.is("00", response.responseCode);
1842
+ return [2 /*return*/];
1843
+ }
1844
+ });
1845
+ }); });
1846
+ ava_1.default("JAVA_Void_014c", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1847
+ var config, card, saleResponse, response;
1848
+ return __generator(this, function (_a) {
1849
+ switch (_a.label) {
1850
+ case 0:
1851
+ t.plan(2);
1852
+ config = new src_1.ServicesConfig();
1853
+ config.merchantId = "heartlandgpsandbox";
1854
+ config.accountId = "api";
1855
+ config.sharedSecret = "secret";
1856
+ config.refundPassword = "refund";
1857
+ config.rebatePassword = "rebate";
1858
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1859
+ config.timeout = 5000;
1860
+ config.channel = "ECOM";
1861
+ src_1.ServicesContainer.configure(config);
1862
+ card = new src_1.CreditCardData();
1863
+ card.number = "4263970000005262";
1864
+ card.expMonth = "12";
1865
+ card.expYear = "2020";
1866
+ card.cvn = "123";
1867
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1868
+ card.cardHolderName = "James Mason";
1869
+ return [4 /*yield*/, card
1870
+ .charge(10)
1871
+ .withCurrency("EUR")
1872
+ .execute()];
1873
+ case 1:
1874
+ saleResponse = _a.sent();
1875
+ t.truthy(saleResponse);
1876
+ t.is("00", saleResponse.responseCode);
1877
+ return [4 /*yield*/, throttle()];
1878
+ case 2:
1879
+ _a.sent();
1880
+ return [4 /*yield*/, saleResponse
1881
+ .void()
1882
+ // tslint:disable:max-line-length
1883
+ .withDescription("akshdfgakjdshfgjdshgfkjdsahgfjshagdfjshdagfkjdshgfjshdgfjdshgfkjhdsagfjdsgfdskjgfdsjkhgfdsjhgfkdsjgfkjdshgfkjdsahgfjdskhgfjhdsgfjkhsdgfjkhsdgfjhsdgfjhsdgfkjhgsadjfhgsakjdhgfsajdhgfkjsadgfjhsadgfjkhdsgafjhdsgfjhdsgfjhdsgfkjhdgsafjkhgsfjhsdagfkjsgdafjhsgdfjhgdskjfgdsjfhgjdskhgfjhdsgfjhdsgfkjhgdsfkjhgsdkjfgsdkjhgfkjsahgdfkjgdsajfhgdsjkgfjdshgfjkdsagfjkhdsgfjsdhgfjkdshgfkjhgdsfkjhgdskjfgdskjgfkjdsahgfjhgdsakjfgdsafjhgdsjkhgfkjdshgfakjadshgfjhdsagfjhgdsfjhgsdakjfgdsakjhgfjsdhgfjhdsgfjhdsgfkjgdsajkfhgjdshgfjdsahgfjkhdsagfjhdsgfjkgdsfjhdsgfjhgdsjfhgdsjhfgjdshgfkjdsgfkjsadgfjkgdsfkjhgdsajfkhgdsjkgfkjdsagfkjgdsakjfhgdsfjkhgdsafkjgsadkjgfdkjsahgfkjsagfkjdshgfkjshdgfjgdsfkjgsadkjhgfdsjhgfkjdsagfjhdsgfjhgdsakjfgdsakjhgfjsdahgfjkgdsfjhgdsajkhfgjhdsagfkjhsgdakjf")
1884
+ // tslint:enable:max-line-length
1885
+ .execute()];
1886
+ case 3:
1887
+ response = _a.sent();
1888
+ t.truthy(response);
1889
+ t.is("00", response.responseCode);
1890
+ return [2 /*return*/];
1891
+ }
1892
+ });
1893
+ }); });
1894
+ ava_1.default("JAVA_Void_014d", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1895
+ var config, card, saleResponse, response;
1896
+ return __generator(this, function (_a) {
1897
+ switch (_a.label) {
1898
+ case 0:
1899
+ t.plan(2);
1900
+ config = new src_1.ServicesConfig();
1901
+ config.merchantId = "heartlandgpsandbox";
1902
+ config.accountId = "api";
1903
+ config.sharedSecret = "secret";
1904
+ config.refundPassword = "refund";
1905
+ config.rebatePassword = "rebate";
1906
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1907
+ config.timeout = 5000;
1908
+ config.channel = "ECOM";
1909
+ src_1.ServicesContainer.configure(config);
1910
+ card = new src_1.CreditCardData();
1911
+ card.number = "4263970000005262";
1912
+ card.expMonth = "12";
1913
+ card.expYear = "2020";
1914
+ card.cvn = "123";
1915
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1916
+ card.cardHolderName = "James Mason";
1917
+ return [4 /*yield*/, card
1918
+ .charge(10)
1919
+ .withCurrency("EUR")
1920
+ .execute()];
1921
+ case 1:
1922
+ saleResponse = _a.sent();
1923
+ t.truthy(saleResponse);
1924
+ t.is("00", saleResponse.responseCode);
1925
+ return [4 /*yield*/, throttle()];
1926
+ case 2:
1927
+ _a.sent();
1928
+ return [4 /*yield*/, saleResponse
1929
+ .void()
1930
+ .withDescription("SDK#####")
1931
+ .execute()];
1932
+ case 3:
1933
+ response = _a.sent();
1934
+ t.truthy(response);
1935
+ t.is("00", response.responseCode);
1936
+ return [2 /*return*/];
1937
+ }
1938
+ });
1939
+ }); });
1940
+ ava_1.default("JAVA_Void_015a", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1941
+ var config, card, saleResponse, response;
1942
+ return __generator(this, function (_a) {
1943
+ switch (_a.label) {
1944
+ case 0:
1945
+ t.plan(2);
1946
+ config = new src_1.ServicesConfig();
1947
+ config.merchantId = "heartlandgpsandbox";
1948
+ config.accountId = "api";
1949
+ config.sharedSecret = "secret";
1950
+ config.refundPassword = "refund";
1951
+ config.rebatePassword = "rebate";
1952
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1953
+ config.timeout = 5000;
1954
+ config.channel = "ECOM";
1955
+ src_1.ServicesContainer.configure(config);
1956
+ card = new src_1.CreditCardData();
1957
+ card.number = "4263970000005262";
1958
+ card.expMonth = "12";
1959
+ card.expYear = "2020";
1960
+ card.cvn = "123";
1961
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
1962
+ card.cardHolderName = "James Mason";
1963
+ return [4 /*yield*/, card
1964
+ .charge(10)
1965
+ .withCurrency("EUR")
1966
+ .execute()];
1967
+ case 1:
1968
+ saleResponse = _a.sent();
1969
+ t.truthy(saleResponse);
1970
+ t.is("00", saleResponse.responseCode);
1971
+ return [4 /*yield*/, throttle()];
1972
+ case 2:
1973
+ _a.sent();
1974
+ return [4 /*yield*/, saleResponse
1975
+ .void()
1976
+ .withDescription("JAVA-Void")
1977
+ .execute()];
1978
+ case 3:
1979
+ response = _a.sent();
1980
+ t.truthy(response);
1981
+ t.is("00", response.responseCode);
1982
+ return [2 /*return*/];
1983
+ }
1984
+ });
1985
+ }); });
1986
+ ava_1.default("JAVA_Void_015b", function (t) { return __awaiter(void 0, void 0, void 0, function () {
1987
+ var config, card, saleResponse, response;
1988
+ return __generator(this, function (_a) {
1989
+ switch (_a.label) {
1990
+ case 0:
1991
+ t.plan(2);
1992
+ config = new src_1.ServicesConfig();
1993
+ config.merchantId = "heartlandgpsandbox";
1994
+ config.accountId = "api";
1995
+ config.sharedSecret = "secret";
1996
+ config.refundPassword = "refund";
1997
+ config.rebatePassword = "rebate";
1998
+ config.serviceUrl = "https://api.sandbox.realexpayments.com/epage-remote.cgi";
1999
+ config.timeout = 5000;
2000
+ config.channel = "ECOM";
2001
+ src_1.ServicesContainer.configure(config);
2002
+ card = new src_1.CreditCardData();
2003
+ card.number = "4263970000005262";
2004
+ card.expMonth = "12";
2005
+ card.expYear = "2020";
2006
+ card.cvn = "123";
2007
+ card.cvnPresenceIndicator = src_1.CvnPresenceIndicator.Present;
2008
+ card.cardHolderName = "James Mason";
2009
+ return [4 /*yield*/, card
2010
+ .charge(10)
2011
+ .withCurrency("EUR")
2012
+ .execute()];
2013
+ case 1:
2014
+ saleResponse = _a.sent();
2015
+ t.truthy(saleResponse);
2016
+ t.is("00", saleResponse.responseCode);
2017
+ return [4 /*yield*/, throttle()];
2018
+ case 2:
2019
+ _a.sent();
2020
+ return [4 /*yield*/, saleResponse
2021
+ .void()
2022
+ .withDescription("JAVA-Void")
2023
+ .execute()];
2024
+ case 3:
2025
+ response = _a.sent();
2026
+ t.truthy(response);
2027
+ t.is("00", response.responseCode);
2028
+ return [2 /*return*/];
2029
+ }
2030
+ });
2031
+ }); });