@medusajs/payment-stripe 0.0.3-snapshot-20240426112214 → 0.0.3-snapshot-20240520151134
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/core/stripe-base.js +234 -435
- package/dist/index.js +5 -5
- package/dist/services/stripe-bancontact.js +14 -35
- package/dist/services/stripe-blik.js +14 -35
- package/dist/services/stripe-giropay.js +14 -35
- package/dist/services/stripe-ideal.js +14 -35
- package/dist/services/stripe-provider.js +11 -32
- package/dist/services/stripe-przelewy24.js +14 -35
- package/package.json +4 -4
package/dist/core/stripe-base.js
CHANGED
@@ -1,471 +1,270 @@
|
|
1
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
|
-
var __assign = (this && this.__assign) || function () {
|
18
|
-
__assign = Object.assign || function(t) {
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
20
|
-
s = arguments[i];
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
22
|
-
t[p] = s[p];
|
23
|
-
}
|
24
|
-
return t;
|
25
|
-
};
|
26
|
-
return __assign.apply(this, arguments);
|
27
|
-
};
|
28
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
29
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
30
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
31
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
32
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
33
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
34
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
35
|
-
});
|
36
|
-
};
|
37
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
38
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
39
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
40
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
41
|
-
function step(op) {
|
42
|
-
if (f) throw new TypeError("Generator is already executing.");
|
43
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
44
|
-
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;
|
45
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
46
|
-
switch (op[0]) {
|
47
|
-
case 0: case 1: t = op; break;
|
48
|
-
case 4: _.label++; return { value: op[1], done: false };
|
49
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
50
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
51
|
-
default:
|
52
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
53
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
54
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
55
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
56
|
-
if (t[2]) _.ops.pop();
|
57
|
-
_.trys.pop(); continue;
|
58
|
-
}
|
59
|
-
op = body.call(thisArg, _);
|
60
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
61
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
62
|
-
}
|
63
|
-
};
|
64
|
-
var __read = (this && this.__read) || function (o, n) {
|
65
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
66
|
-
if (!m) return o;
|
67
|
-
var i = m.call(o), r, ar = [], e;
|
68
|
-
try {
|
69
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
70
|
-
}
|
71
|
-
catch (error) { e = { error: error }; }
|
72
|
-
finally {
|
73
|
-
try {
|
74
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
75
|
-
}
|
76
|
-
finally { if (e) throw e.error; }
|
77
|
-
}
|
78
|
-
return ar;
|
79
|
-
};
|
80
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
81
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
82
|
-
if (ar || !(i in from)) {
|
83
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
84
|
-
ar[i] = from[i];
|
85
|
-
}
|
86
|
-
}
|
87
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
88
|
-
};
|
89
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
90
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
91
4
|
};
|
92
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
return _this;
|
6
|
+
const os_1 = require("os");
|
7
|
+
const stripe_1 = __importDefault(require("stripe"));
|
8
|
+
const types_1 = require("@medusajs/types");
|
9
|
+
const utils_1 = require("@medusajs/utils");
|
10
|
+
const medusa_core_utils_1 = require("medusa-core-utils");
|
11
|
+
const types_2 = require("../types");
|
12
|
+
class StripeBase extends utils_1.AbstractPaymentProvider {
|
13
|
+
constructor(container, options) {
|
14
|
+
// @ts-ignore
|
15
|
+
super(...arguments);
|
16
|
+
this.container_ = container;
|
17
|
+
this.options_ = options;
|
18
|
+
this.stripe_ = this.init();
|
107
19
|
}
|
108
|
-
|
20
|
+
init() {
|
109
21
|
this.validateOptions(this.config);
|
110
22
|
return new stripe_1.default(this.config.apiKey);
|
111
|
-
}
|
112
|
-
|
23
|
+
}
|
24
|
+
validateOptions(options) {
|
113
25
|
if (!(0, medusa_core_utils_1.isDefined)(options.apiKey)) {
|
114
26
|
throw new Error("Required option `apiKey` is missing in Stripe plugin");
|
115
27
|
}
|
116
|
-
}
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
});
|
124
|
-
StripeBase.prototype.getPaymentIntentOptions = function () {
|
125
|
-
var _a, _b, _c;
|
126
|
-
var options = {};
|
127
|
-
if ((_a = this === null || this === void 0 ? void 0 : this.paymentIntentOptions) === null || _a === void 0 ? void 0 : _a.capture_method) {
|
28
|
+
}
|
29
|
+
get options() {
|
30
|
+
return this.options_;
|
31
|
+
}
|
32
|
+
getPaymentIntentOptions() {
|
33
|
+
const options = {};
|
34
|
+
if (this?.paymentIntentOptions?.capture_method) {
|
128
35
|
options.capture_method = this.paymentIntentOptions.capture_method;
|
129
36
|
}
|
130
|
-
if (
|
37
|
+
if (this?.paymentIntentOptions?.setup_future_usage) {
|
131
38
|
options.setup_future_usage = this.paymentIntentOptions.setup_future_usage;
|
132
39
|
}
|
133
|
-
if (
|
40
|
+
if (this?.paymentIntentOptions?.payment_method_types) {
|
134
41
|
options.payment_method_types =
|
135
42
|
this.paymentIntentOptions.payment_method_types;
|
136
43
|
}
|
137
44
|
return options;
|
138
|
-
}
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
status = _a.sent();
|
236
|
-
return [2 /*return*/, { data: paymentSessionData, status: status }];
|
237
|
-
}
|
238
|
-
});
|
239
|
-
});
|
240
|
-
};
|
241
|
-
StripeBase.prototype.cancelPayment = function (paymentSessionData) {
|
242
|
-
var _a;
|
243
|
-
return __awaiter(this, void 0, void 0, function () {
|
244
|
-
var id, error_1;
|
245
|
-
return __generator(this, function (_b) {
|
246
|
-
switch (_b.label) {
|
247
|
-
case 0:
|
248
|
-
_b.trys.push([0, 2, , 3]);
|
249
|
-
id = paymentSessionData.id;
|
250
|
-
return [4 /*yield*/, this.stripe_.paymentIntents.cancel(id)];
|
251
|
-
case 1: return [2 /*return*/, (_b.sent())];
|
252
|
-
case 2:
|
253
|
-
error_1 = _b.sent();
|
254
|
-
if (((_a = error_1.payment_intent) === null || _a === void 0 ? void 0 : _a.status) === types_2.ErrorIntentStatus.CANCELED) {
|
255
|
-
return [2 /*return*/, error_1.payment_intent];
|
256
|
-
}
|
257
|
-
return [2 /*return*/, this.buildError("An error occurred in cancelPayment", error_1)];
|
258
|
-
case 3: return [2 /*return*/];
|
259
|
-
}
|
260
|
-
});
|
261
|
-
});
|
262
|
-
};
|
263
|
-
StripeBase.prototype.capturePayment = function (paymentSessionData) {
|
264
|
-
var _a;
|
265
|
-
return __awaiter(this, void 0, void 0, function () {
|
266
|
-
var id, intent, error_2;
|
267
|
-
return __generator(this, function (_b) {
|
268
|
-
switch (_b.label) {
|
269
|
-
case 0:
|
270
|
-
id = paymentSessionData.id;
|
271
|
-
_b.label = 1;
|
272
|
-
case 1:
|
273
|
-
_b.trys.push([1, 3, , 4]);
|
274
|
-
return [4 /*yield*/, this.stripe_.paymentIntents.capture(id)];
|
275
|
-
case 2:
|
276
|
-
intent = _b.sent();
|
277
|
-
return [2 /*return*/, intent];
|
278
|
-
case 3:
|
279
|
-
error_2 = _b.sent();
|
280
|
-
if (error_2.code === types_2.ErrorCodes.PAYMENT_INTENT_UNEXPECTED_STATE) {
|
281
|
-
if (((_a = error_2.payment_intent) === null || _a === void 0 ? void 0 : _a.status) === types_2.ErrorIntentStatus.SUCCEEDED) {
|
282
|
-
return [2 /*return*/, error_2.payment_intent];
|
283
|
-
}
|
284
|
-
}
|
285
|
-
return [2 /*return*/, this.buildError("An error occurred in capturePayment", error_2)];
|
286
|
-
case 4: return [2 /*return*/];
|
287
|
-
}
|
288
|
-
});
|
289
|
-
});
|
290
|
-
};
|
291
|
-
StripeBase.prototype.deletePayment = function (paymentSessionData) {
|
292
|
-
return __awaiter(this, void 0, void 0, function () {
|
293
|
-
return __generator(this, function (_a) {
|
294
|
-
switch (_a.label) {
|
295
|
-
case 0: return [4 /*yield*/, this.cancelPayment(paymentSessionData)];
|
296
|
-
case 1: return [2 /*return*/, _a.sent()];
|
297
|
-
}
|
298
|
-
});
|
299
|
-
});
|
300
|
-
};
|
301
|
-
StripeBase.prototype.refundPayment = function (paymentSessionData, refundAmount) {
|
302
|
-
return __awaiter(this, void 0, void 0, function () {
|
303
|
-
var id, e_3;
|
304
|
-
return __generator(this, function (_a) {
|
305
|
-
switch (_a.label) {
|
306
|
-
case 0:
|
307
|
-
id = paymentSessionData.id;
|
308
|
-
_a.label = 1;
|
309
|
-
case 1:
|
310
|
-
_a.trys.push([1, 3, , 4]);
|
311
|
-
return [4 /*yield*/, this.stripe_.refunds.create({
|
312
|
-
amount: Math.round(refundAmount),
|
313
|
-
payment_intent: id,
|
314
|
-
})];
|
315
|
-
case 2:
|
316
|
-
_a.sent();
|
317
|
-
return [3 /*break*/, 4];
|
318
|
-
case 3:
|
319
|
-
e_3 = _a.sent();
|
320
|
-
return [2 /*return*/, this.buildError("An error occurred in refundPayment", e_3)];
|
321
|
-
case 4: return [2 /*return*/, paymentSessionData];
|
322
|
-
}
|
323
|
-
});
|
324
|
-
});
|
325
|
-
};
|
326
|
-
StripeBase.prototype.retrievePayment = function (paymentSessionData) {
|
327
|
-
return __awaiter(this, void 0, void 0, function () {
|
328
|
-
var id, intent, e_4;
|
329
|
-
return __generator(this, function (_a) {
|
330
|
-
switch (_a.label) {
|
331
|
-
case 0:
|
332
|
-
_a.trys.push([0, 2, , 3]);
|
333
|
-
id = paymentSessionData.id;
|
334
|
-
return [4 /*yield*/, this.stripe_.paymentIntents.retrieve(id)];
|
335
|
-
case 1:
|
336
|
-
intent = _a.sent();
|
337
|
-
return [2 /*return*/, intent];
|
338
|
-
case 2:
|
339
|
-
e_4 = _a.sent();
|
340
|
-
return [2 /*return*/, this.buildError("An error occurred in retrievePayment", e_4)];
|
341
|
-
case 3: return [2 /*return*/];
|
342
|
-
}
|
343
|
-
});
|
344
|
-
});
|
345
|
-
};
|
346
|
-
StripeBase.prototype.updatePayment = function (input) {
|
347
|
-
var _a, _b;
|
348
|
-
return __awaiter(this, void 0, void 0, function () {
|
349
|
-
var context, data, amount, amountNumeric, stripeId, result, id, sessionData, e_5;
|
350
|
-
return __generator(this, function (_c) {
|
351
|
-
switch (_c.label) {
|
352
|
-
case 0:
|
353
|
-
context = input.context, data = input.data, amount = input.amount;
|
354
|
-
amountNumeric = Math.round(new utils_1.BigNumber(amount).numeric);
|
355
|
-
stripeId = (_b = (_a = context.customer) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.stripe_id;
|
356
|
-
if (!(stripeId !== data.customer)) return [3 /*break*/, 2];
|
357
|
-
return [4 /*yield*/, this.initiatePayment(input)];
|
358
|
-
case 1:
|
359
|
-
result = _c.sent();
|
360
|
-
if ((0, utils_1.isPaymentProviderError)(result)) {
|
361
|
-
return [2 /*return*/, this.buildError("An error occurred in updatePayment during the initiate of the new payment for the new customer", result)];
|
362
|
-
}
|
363
|
-
return [2 /*return*/, result];
|
364
|
-
case 2:
|
365
|
-
if (amount && data.amount === amountNumeric) {
|
366
|
-
return [2 /*return*/, { data: data }];
|
367
|
-
}
|
368
|
-
_c.label = 3;
|
369
|
-
case 3:
|
370
|
-
_c.trys.push([3, 5, , 6]);
|
371
|
-
id = data.id;
|
372
|
-
return [4 /*yield*/, this.stripe_.paymentIntents.update(id, {
|
373
|
-
amount: amountNumeric,
|
374
|
-
})];
|
375
|
-
case 4:
|
376
|
-
sessionData = (_c.sent());
|
377
|
-
return [2 /*return*/, { data: sessionData }];
|
378
|
-
case 5:
|
379
|
-
e_5 = _c.sent();
|
380
|
-
return [2 /*return*/, this.buildError("An error occurred in updatePayment", e_5)];
|
381
|
-
case 6: return [2 /*return*/];
|
382
|
-
}
|
383
|
-
});
|
384
|
-
});
|
385
|
-
};
|
386
|
-
StripeBase.prototype.updatePaymentData = function (sessionId, data) {
|
387
|
-
return __awaiter(this, void 0, void 0, function () {
|
388
|
-
var e_6;
|
389
|
-
return __generator(this, function (_a) {
|
390
|
-
switch (_a.label) {
|
391
|
-
case 0:
|
392
|
-
_a.trys.push([0, 2, , 3]);
|
393
|
-
// Prevent from updating the amount from here as it should go through
|
394
|
-
// the updatePayment method to perform the correct logic
|
395
|
-
if (data.amount) {
|
396
|
-
throw new utils_1.MedusaError(utils_1.MedusaError.Types.INVALID_DATA, "Cannot update amount, use updatePayment instead");
|
397
|
-
}
|
398
|
-
return [4 /*yield*/, this.stripe_.paymentIntents.update(sessionId, __assign({}, data))];
|
399
|
-
case 1: return [2 /*return*/, (_a.sent())];
|
400
|
-
case 2:
|
401
|
-
e_6 = _a.sent();
|
402
|
-
return [2 /*return*/, this.buildError("An error occurred in updatePaymentData", e_6)];
|
403
|
-
case 3: return [2 /*return*/];
|
404
|
-
}
|
405
|
-
});
|
406
|
-
});
|
407
|
-
};
|
408
|
-
StripeBase.prototype.getWebhookActionAndData = function (webhookData) {
|
409
|
-
return __awaiter(this, void 0, void 0, function () {
|
410
|
-
var event, intent;
|
411
|
-
return __generator(this, function (_a) {
|
412
|
-
event = this.constructWebhookEvent(webhookData);
|
413
|
-
intent = event.data.object;
|
414
|
-
switch (event.type) {
|
415
|
-
case "payment_intent.amount_capturable_updated":
|
416
|
-
return [2 /*return*/, {
|
417
|
-
action: utils_1.PaymentActions.AUTHORIZED,
|
418
|
-
data: {
|
419
|
-
resource_id: intent.metadata.resource_id,
|
420
|
-
amount: intent.amount_capturable, // NOTE: revisit when implementing multicapture
|
421
|
-
},
|
422
|
-
}];
|
423
|
-
case "payment_intent.succeeded":
|
424
|
-
return [2 /*return*/, {
|
425
|
-
action: utils_1.PaymentActions.SUCCESSFUL,
|
426
|
-
data: {
|
427
|
-
resource_id: intent.metadata.resource_id,
|
428
|
-
amount: intent.amount_received,
|
429
|
-
},
|
430
|
-
}];
|
431
|
-
case "payment_intent.payment_failed":
|
432
|
-
return [2 /*return*/, {
|
433
|
-
action: utils_1.PaymentActions.FAILED,
|
434
|
-
data: {
|
435
|
-
resource_id: intent.metadata.resource_id,
|
436
|
-
amount: intent.amount,
|
437
|
-
},
|
438
|
-
}];
|
439
|
-
default:
|
440
|
-
return [2 /*return*/, { action: utils_1.PaymentActions.NOT_SUPPORTED }];
|
45
|
+
}
|
46
|
+
async getPaymentStatus(paymentSessionData) {
|
47
|
+
const id = paymentSessionData.id;
|
48
|
+
const paymentIntent = await this.stripe_.paymentIntents.retrieve(id);
|
49
|
+
switch (paymentIntent.status) {
|
50
|
+
case "requires_payment_method":
|
51
|
+
case "requires_confirmation":
|
52
|
+
case "processing":
|
53
|
+
return types_1.PaymentSessionStatus.PENDING;
|
54
|
+
case "requires_action":
|
55
|
+
return types_1.PaymentSessionStatus.REQUIRES_MORE;
|
56
|
+
case "canceled":
|
57
|
+
return types_1.PaymentSessionStatus.CANCELED;
|
58
|
+
case "requires_capture":
|
59
|
+
case "succeeded":
|
60
|
+
return types_1.PaymentSessionStatus.AUTHORIZED;
|
61
|
+
default:
|
62
|
+
return types_1.PaymentSessionStatus.PENDING;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
async initiatePayment(input) {
|
66
|
+
const intentRequestData = this.getPaymentIntentOptions();
|
67
|
+
const { email, extra, resource_id, customer } = input.context;
|
68
|
+
const { currency_code, amount } = input;
|
69
|
+
const description = (extra?.payment_description ??
|
70
|
+
this.options_?.payment_description);
|
71
|
+
const intentRequest = {
|
72
|
+
description,
|
73
|
+
amount: Math.round(new utils_1.BigNumber(amount).numeric),
|
74
|
+
currency: currency_code,
|
75
|
+
metadata: { resource_id: resource_id ?? "Medusa Payment" },
|
76
|
+
capture_method: this.options_.capture ? "automatic" : "manual",
|
77
|
+
...intentRequestData,
|
78
|
+
};
|
79
|
+
if (this.options_?.automatic_payment_methods) {
|
80
|
+
intentRequest.automatic_payment_methods = { enabled: true };
|
81
|
+
}
|
82
|
+
if (customer?.metadata?.stripe_id) {
|
83
|
+
intentRequest.customer = customer.metadata.stripe_id;
|
84
|
+
}
|
85
|
+
else {
|
86
|
+
let stripeCustomer;
|
87
|
+
try {
|
88
|
+
stripeCustomer = await this.stripe_.customers.create({
|
89
|
+
email,
|
90
|
+
});
|
91
|
+
}
|
92
|
+
catch (e) {
|
93
|
+
return this.buildError("An error occurred in initiatePayment when creating a Stripe customer", e);
|
94
|
+
}
|
95
|
+
intentRequest.customer = stripeCustomer.id;
|
96
|
+
}
|
97
|
+
let sessionData;
|
98
|
+
try {
|
99
|
+
sessionData = (await this.stripe_.paymentIntents.create(intentRequest));
|
100
|
+
}
|
101
|
+
catch (e) {
|
102
|
+
return this.buildError("An error occurred in InitiatePayment during the creation of the stripe payment intent", e);
|
103
|
+
}
|
104
|
+
return {
|
105
|
+
data: sessionData,
|
106
|
+
// TODO: REVISIT
|
107
|
+
// update_requests: customer?.metadata?.stripe_id
|
108
|
+
// ? undefined
|
109
|
+
// : {
|
110
|
+
// customer_metadata: {
|
111
|
+
// stripe_id: intentRequest.customer,
|
112
|
+
// },
|
113
|
+
// },
|
114
|
+
};
|
115
|
+
}
|
116
|
+
async authorizePayment(paymentSessionData, context) {
|
117
|
+
const status = await this.getPaymentStatus(paymentSessionData);
|
118
|
+
return { data: paymentSessionData, status };
|
119
|
+
}
|
120
|
+
async cancelPayment(paymentSessionData) {
|
121
|
+
try {
|
122
|
+
const id = paymentSessionData.id;
|
123
|
+
return (await this.stripe_.paymentIntents.cancel(id));
|
124
|
+
}
|
125
|
+
catch (error) {
|
126
|
+
if (error.payment_intent?.status === types_2.ErrorIntentStatus.CANCELED) {
|
127
|
+
return error.payment_intent;
|
128
|
+
}
|
129
|
+
return this.buildError("An error occurred in cancelPayment", error);
|
130
|
+
}
|
131
|
+
}
|
132
|
+
async capturePayment(paymentSessionData) {
|
133
|
+
const id = paymentSessionData.id;
|
134
|
+
try {
|
135
|
+
const intent = await this.stripe_.paymentIntents.capture(id);
|
136
|
+
return intent;
|
137
|
+
}
|
138
|
+
catch (error) {
|
139
|
+
if (error.code === types_2.ErrorCodes.PAYMENT_INTENT_UNEXPECTED_STATE) {
|
140
|
+
if (error.payment_intent?.status === types_2.ErrorIntentStatus.SUCCEEDED) {
|
141
|
+
return error.payment_intent;
|
441
142
|
}
|
442
|
-
|
143
|
+
}
|
144
|
+
return this.buildError("An error occurred in capturePayment", error);
|
145
|
+
}
|
146
|
+
}
|
147
|
+
async deletePayment(paymentSessionData) {
|
148
|
+
return await this.cancelPayment(paymentSessionData);
|
149
|
+
}
|
150
|
+
async refundPayment(paymentSessionData, refundAmount) {
|
151
|
+
const id = paymentSessionData.id;
|
152
|
+
try {
|
153
|
+
await this.stripe_.refunds.create({
|
154
|
+
amount: Math.round(refundAmount),
|
155
|
+
payment_intent: id,
|
443
156
|
});
|
444
|
-
}
|
445
|
-
|
157
|
+
}
|
158
|
+
catch (e) {
|
159
|
+
return this.buildError("An error occurred in refundPayment", e);
|
160
|
+
}
|
161
|
+
return paymentSessionData;
|
162
|
+
}
|
163
|
+
async retrievePayment(paymentSessionData) {
|
164
|
+
try {
|
165
|
+
const id = paymentSessionData.id;
|
166
|
+
const intent = await this.stripe_.paymentIntents.retrieve(id);
|
167
|
+
return intent;
|
168
|
+
}
|
169
|
+
catch (e) {
|
170
|
+
return this.buildError("An error occurred in retrievePayment", e);
|
171
|
+
}
|
172
|
+
}
|
173
|
+
async updatePayment(input) {
|
174
|
+
const { context, data, amount } = input;
|
175
|
+
const amountNumeric = Math.round(new utils_1.BigNumber(amount).numeric);
|
176
|
+
const stripeId = context.customer?.metadata?.stripe_id;
|
177
|
+
if (stripeId !== data.customer) {
|
178
|
+
const result = await this.initiatePayment(input);
|
179
|
+
if ((0, utils_1.isPaymentProviderError)(result)) {
|
180
|
+
return this.buildError("An error occurred in updatePayment during the initiate of the new payment for the new customer", result);
|
181
|
+
}
|
182
|
+
return result;
|
183
|
+
}
|
184
|
+
else {
|
185
|
+
if (amount && data.amount === amountNumeric) {
|
186
|
+
return { data };
|
187
|
+
}
|
188
|
+
try {
|
189
|
+
const id = data.id;
|
190
|
+
const sessionData = (await this.stripe_.paymentIntents.update(id, {
|
191
|
+
amount: amountNumeric,
|
192
|
+
}));
|
193
|
+
return { data: sessionData };
|
194
|
+
}
|
195
|
+
catch (e) {
|
196
|
+
return this.buildError("An error occurred in updatePayment", e);
|
197
|
+
}
|
198
|
+
}
|
199
|
+
}
|
200
|
+
async updatePaymentData(sessionId, data) {
|
201
|
+
try {
|
202
|
+
// Prevent from updating the amount from here as it should go through
|
203
|
+
// the updatePayment method to perform the correct logic
|
204
|
+
if (data.amount) {
|
205
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.INVALID_DATA, "Cannot update amount, use updatePayment instead");
|
206
|
+
}
|
207
|
+
return (await this.stripe_.paymentIntents.update(sessionId, {
|
208
|
+
...data,
|
209
|
+
}));
|
210
|
+
}
|
211
|
+
catch (e) {
|
212
|
+
return this.buildError("An error occurred in updatePaymentData", e);
|
213
|
+
}
|
214
|
+
}
|
215
|
+
async getWebhookActionAndData(webhookData) {
|
216
|
+
const event = this.constructWebhookEvent(webhookData);
|
217
|
+
const intent = event.data.object;
|
218
|
+
switch (event.type) {
|
219
|
+
case "payment_intent.amount_capturable_updated":
|
220
|
+
return {
|
221
|
+
action: utils_1.PaymentActions.AUTHORIZED,
|
222
|
+
data: {
|
223
|
+
resource_id: intent.metadata.resource_id,
|
224
|
+
amount: intent.amount_capturable, // NOTE: revisit when implementing multicapture
|
225
|
+
},
|
226
|
+
};
|
227
|
+
case "payment_intent.succeeded":
|
228
|
+
return {
|
229
|
+
action: utils_1.PaymentActions.SUCCESSFUL,
|
230
|
+
data: {
|
231
|
+
resource_id: intent.metadata.resource_id,
|
232
|
+
amount: intent.amount_received,
|
233
|
+
},
|
234
|
+
};
|
235
|
+
case "payment_intent.payment_failed":
|
236
|
+
return {
|
237
|
+
action: utils_1.PaymentActions.FAILED,
|
238
|
+
data: {
|
239
|
+
resource_id: intent.metadata.resource_id,
|
240
|
+
amount: intent.amount,
|
241
|
+
},
|
242
|
+
};
|
243
|
+
default:
|
244
|
+
return { action: utils_1.PaymentActions.NOT_SUPPORTED };
|
245
|
+
}
|
246
|
+
}
|
446
247
|
/**
|
447
248
|
* Constructs Stripe Webhook event
|
448
249
|
* @param {object} data - the data of the webhook request: req.body
|
449
250
|
* ensures integrity of the webhook event
|
450
251
|
* @return {object} Stripe Webhook event
|
451
252
|
*/
|
452
|
-
|
453
|
-
|
253
|
+
constructWebhookEvent(data) {
|
254
|
+
const signature = data.headers["stripe-signature"];
|
454
255
|
return this.stripe_.webhooks.constructEvent(data.rawData, signature, this.config.webhookSecret);
|
455
|
-
}
|
456
|
-
|
457
|
-
var _a, _b;
|
256
|
+
}
|
257
|
+
buildError(message, error) {
|
458
258
|
return {
|
459
259
|
error: message,
|
460
260
|
code: "code" in error ? error.code : "unknown",
|
461
261
|
detail: (0, utils_1.isPaymentProviderError)(error)
|
462
|
-
?
|
262
|
+
? `${error.error}${os_1.EOL}${error.detail ?? ""}`
|
463
263
|
: "detail" in error
|
464
264
|
? error.detail
|
465
|
-
:
|
265
|
+
: error.message ?? "",
|
466
266
|
};
|
467
|
-
}
|
468
|
-
|
469
|
-
}(utils_1.AbstractPaymentProvider));
|
267
|
+
}
|
268
|
+
}
|
470
269
|
exports.default = StripeBase;
|
471
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaXBlLWJhc2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29yZS9zdHJpcGUtYmFzZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7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UFBTSxDQUFDLGFBQWEsQ0FDMUIsQ0FBQTtJQUNILENBQUM7SUFDUyxVQUFVLENBQ2xCLE9BQWUsRUFDZixLQUEyRDtRQUUzRCxPQUFPO1lBQ0wsS0FBSyxFQUFFLE9BQU87WUFDZCxJQUFJLEVBQUUsTUFBTSxJQUFJLEtBQUssQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsU0FBUztZQUM5QyxNQUFNLEVBQUUsSUFBQSw4QkFBc0IsRUFBQyxLQUFLLENBQUM7Z0JBQ25DLENBQUMsQ0FBQyxHQUFHLEtBQUssQ0FBQyxLQUFLLEdBQUcsUUFBRyxHQUFHLEtBQUssQ0FBQyxNQUFNLElBQUksRUFBRSxFQUFFO2dCQUM3QyxDQUFDLENBQUMsUUFBUSxJQUFJLEtBQUs7b0JBQ25CLENBQUMsQ0FBQyxLQUFLLENBQUMsTUFBTTtvQkFDZCxDQUFDLENBQUMsS0FBSyxDQUFDLE9BQU8sSUFBSSxFQUFFO1NBQ3hCLENBQUE7SUFDSCxDQUFDO0NBQ0Y7QUFFRCxrQkFBZSxVQUFVLENBQUEifQ==
|
package/dist/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
|
4
|
-
|
3
|
+
const services_1 = require("./services");
|
4
|
+
const services = [
|
5
5
|
services_1.StripeBancontactService,
|
6
6
|
services_1.StripeBlikService,
|
7
7
|
services_1.StripeGiropayService,
|
@@ -9,8 +9,8 @@ var services = [
|
|
9
9
|
services_1.StripeProviderService,
|
10
10
|
services_1.StripePrzelewy24Service,
|
11
11
|
];
|
12
|
-
|
13
|
-
services
|
12
|
+
const providerExport = {
|
13
|
+
services,
|
14
14
|
};
|
15
15
|
exports.default = providerExport;
|
16
|
-
//# sourceMappingURL=data:application/json;base64,
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFDQSx5Q0FPbUI7QUFFbkIsTUFBTSxRQUFRLEdBQUc7SUFDZixrQ0FBdUI7SUFDdkIsNEJBQWlCO0lBQ2pCLCtCQUFvQjtJQUNwQiw2QkFBa0I7SUFDbEIsZ0NBQXFCO0lBQ3JCLGtDQUF1QjtDQUN4QixDQUFBO0FBRUQsTUFBTSxjQUFjLEdBQTBCO0lBQzVDLFFBQVE7Q0FDVCxDQUFBO0FBRUQsa0JBQWUsY0FBYyxDQUFBIn0=
|
@@ -1,42 +1,21 @@
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
18
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
19
4
|
};
|
20
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
return _super.call(this, _, options) || this;
|
6
|
+
const stripe_base_1 = __importDefault(require("../core/stripe-base"));
|
7
|
+
const types_1 = require("../types");
|
8
|
+
class BancontactProviderService extends stripe_base_1.default {
|
9
|
+
constructor(_, options) {
|
10
|
+
super(_, options);
|
27
11
|
}
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
configurable: true
|
37
|
-
});
|
38
|
-
BancontactProviderService.PROVIDER = types_1.PaymentProviderKeys.BAN_CONTACT;
|
39
|
-
return BancontactProviderService;
|
40
|
-
}(stripe_base_1.default));
|
12
|
+
get paymentIntentOptions() {
|
13
|
+
return {
|
14
|
+
payment_method_types: ["bancontact"],
|
15
|
+
capture_method: "automatic",
|
16
|
+
};
|
17
|
+
}
|
18
|
+
}
|
19
|
+
BancontactProviderService.PROVIDER = types_1.PaymentProviderKeys.BAN_CONTACT;
|
41
20
|
exports.default = BancontactProviderService;
|
42
|
-
//# sourceMappingURL=data:application/json;base64,
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaXBlLWJhbmNvbnRhY3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2VydmljZXMvc3RyaXBlLWJhbmNvbnRhY3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxzRUFBNEM7QUFDNUMsb0NBQW9FO0FBRXBFLE1BQU0seUJBQTBCLFNBQVEscUJBQVU7SUFHaEQsWUFBWSxDQUFDLEVBQUUsT0FBTztRQUNwQixLQUFLLENBQUMsQ0FBQyxFQUFFLE9BQU8sQ0FBQyxDQUFBO0lBQ25CLENBQUM7SUFFRCxJQUFJLG9CQUFvQjtRQUN0QixPQUFPO1lBQ0wsb0JBQW9CLEVBQUUsQ0FBQyxZQUFZLENBQUM7WUFDcEMsY0FBYyxFQUFFLFdBQVc7U0FDNUIsQ0FBQTtJQUNILENBQUM7O0FBWE0sa0NBQVEsR0FBRywyQkFBbUIsQ0FBQyxXQUFXLENBQUE7QUFjbkQsa0JBQWUseUJBQXlCLENBQUEifQ==
|
@@ -1,42 +1,21 @@
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
18
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
19
4
|
};
|
20
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
return _super.call(this, _, options) || this;
|
6
|
+
const stripe_base_1 = __importDefault(require("../core/stripe-base"));
|
7
|
+
const types_1 = require("../types");
|
8
|
+
class BlikProviderService extends stripe_base_1.default {
|
9
|
+
constructor(_, options) {
|
10
|
+
super(_, options);
|
27
11
|
}
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
configurable: true
|
37
|
-
});
|
38
|
-
BlikProviderService.PROVIDER = types_1.PaymentProviderKeys.BLIK;
|
39
|
-
return BlikProviderService;
|
40
|
-
}(stripe_base_1.default));
|
12
|
+
get paymentIntentOptions() {
|
13
|
+
return {
|
14
|
+
payment_method_types: ["blik"],
|
15
|
+
capture_method: "automatic",
|
16
|
+
};
|
17
|
+
}
|
18
|
+
}
|
19
|
+
BlikProviderService.PROVIDER = types_1.PaymentProviderKeys.BLIK;
|
41
20
|
exports.default = BlikProviderService;
|
42
|
-
//# sourceMappingURL=data:application/json;base64,
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaXBlLWJsaWsuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2VydmljZXMvc3RyaXBlLWJsaWsudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxzRUFBNEM7QUFDNUMsb0NBQW9FO0FBRXBFLE1BQU0sbUJBQW9CLFNBQVEscUJBQVU7SUFHMUMsWUFBWSxDQUFDLEVBQUUsT0FBTztRQUNwQixLQUFLLENBQUMsQ0FBQyxFQUFFLE9BQU8sQ0FBQyxDQUFBO0lBQ25CLENBQUM7SUFFRCxJQUFJLG9CQUFvQjtRQUN0QixPQUFPO1lBQ0wsb0JBQW9CLEVBQUUsQ0FBQyxNQUFNLENBQUM7WUFDOUIsY0FBYyxFQUFFLFdBQVc7U0FDNUIsQ0FBQTtJQUNILENBQUM7O0FBWE0sNEJBQVEsR0FBRywyQkFBbUIsQ0FBQyxJQUFJLENBQUE7QUFjNUMsa0JBQWUsbUJBQW1CLENBQUEifQ==
|
@@ -1,42 +1,21 @@
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
18
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
19
4
|
};
|
20
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
return _super.call(this, _, options) || this;
|
6
|
+
const stripe_base_1 = __importDefault(require("../core/stripe-base"));
|
7
|
+
const types_1 = require("../types");
|
8
|
+
class GiropayProviderService extends stripe_base_1.default {
|
9
|
+
constructor(_, options) {
|
10
|
+
super(_, options);
|
27
11
|
}
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
configurable: true
|
37
|
-
});
|
38
|
-
GiropayProviderService.PROVIDER = types_1.PaymentProviderKeys.GIROPAY;
|
39
|
-
return GiropayProviderService;
|
40
|
-
}(stripe_base_1.default));
|
12
|
+
get paymentIntentOptions() {
|
13
|
+
return {
|
14
|
+
payment_method_types: ["giropay"],
|
15
|
+
capture_method: "automatic",
|
16
|
+
};
|
17
|
+
}
|
18
|
+
}
|
19
|
+
GiropayProviderService.PROVIDER = types_1.PaymentProviderKeys.GIROPAY;
|
41
20
|
exports.default = GiropayProviderService;
|
42
|
-
//# sourceMappingURL=data:application/json;base64,
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaXBlLWdpcm9wYXkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2VydmljZXMvc3RyaXBlLWdpcm9wYXkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxzRUFBNEM7QUFDNUMsb0NBQW9FO0FBRXBFLE1BQU0sc0JBQXVCLFNBQVEscUJBQVU7SUFHN0MsWUFBWSxDQUFDLEVBQUUsT0FBTztRQUNwQixLQUFLLENBQUMsQ0FBQyxFQUFFLE9BQU8sQ0FBQyxDQUFBO0lBQ25CLENBQUM7SUFFRCxJQUFJLG9CQUFvQjtRQUN0QixPQUFPO1lBQ0wsb0JBQW9CLEVBQUUsQ0FBQyxTQUFTLENBQUM7WUFDakMsY0FBYyxFQUFFLFdBQVc7U0FDNUIsQ0FBQTtJQUNILENBQUM7O0FBWE0sK0JBQVEsR0FBRywyQkFBbUIsQ0FBQyxPQUFPLENBQUE7QUFjL0Msa0JBQWUsc0JBQXNCLENBQUEifQ==
|
@@ -1,42 +1,21 @@
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
18
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
19
4
|
};
|
20
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
return _super.call(this, _, options) || this;
|
6
|
+
const stripe_base_1 = __importDefault(require("../core/stripe-base"));
|
7
|
+
const types_1 = require("../types");
|
8
|
+
class IdealProviderService extends stripe_base_1.default {
|
9
|
+
constructor(_, options) {
|
10
|
+
super(_, options);
|
27
11
|
}
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
configurable: true
|
37
|
-
});
|
38
|
-
IdealProviderService.PROVIDER = types_1.PaymentProviderKeys.IDEAL;
|
39
|
-
return IdealProviderService;
|
40
|
-
}(stripe_base_1.default));
|
12
|
+
get paymentIntentOptions() {
|
13
|
+
return {
|
14
|
+
payment_method_types: ["ideal"],
|
15
|
+
capture_method: "automatic",
|
16
|
+
};
|
17
|
+
}
|
18
|
+
}
|
19
|
+
IdealProviderService.PROVIDER = types_1.PaymentProviderKeys.IDEAL;
|
41
20
|
exports.default = IdealProviderService;
|
42
|
-
//# sourceMappingURL=data:application/json;base64,
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaXBlLWlkZWFsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3NlcnZpY2VzL3N0cmlwZS1pZGVhbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHNFQUE0QztBQUM1QyxvQ0FBb0U7QUFFcEUsTUFBTSxvQkFBcUIsU0FBUSxxQkFBVTtJQUczQyxZQUFZLENBQUMsRUFBRSxPQUFPO1FBQ3BCLEtBQUssQ0FBQyxDQUFDLEVBQUUsT0FBTyxDQUFDLENBQUE7SUFDbkIsQ0FBQztJQUVELElBQUksb0JBQW9CO1FBQ3RCLE9BQU87WUFDTCxvQkFBb0IsRUFBRSxDQUFDLE9BQU8sQ0FBQztZQUMvQixjQUFjLEVBQUUsV0FBVztTQUM1QixDQUFBO0lBQ0gsQ0FBQzs7QUFYTSw2QkFBUSxHQUFHLDJCQUFtQixDQUFDLEtBQUssQ0FBQTtBQWM3QyxrQkFBZSxvQkFBb0IsQ0FBQSJ9
|
@@ -1,39 +1,18 @@
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
18
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
19
4
|
};
|
20
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
return _super.call(this, _, options) || this;
|
6
|
+
const stripe_base_1 = __importDefault(require("../core/stripe-base"));
|
7
|
+
const types_1 = require("../types");
|
8
|
+
class StripeProviderService extends stripe_base_1.default {
|
9
|
+
constructor(_, options) {
|
10
|
+
super(_, options);
|
27
11
|
}
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
configurable: true
|
34
|
-
});
|
35
|
-
StripeProviderService.PROVIDER = types_1.PaymentProviderKeys.STRIPE;
|
36
|
-
return StripeProviderService;
|
37
|
-
}(stripe_base_1.default));
|
12
|
+
get paymentIntentOptions() {
|
13
|
+
return {};
|
14
|
+
}
|
15
|
+
}
|
16
|
+
StripeProviderService.PROVIDER = types_1.PaymentProviderKeys.STRIPE;
|
38
17
|
exports.default = StripeProviderService;
|
39
|
-
//# sourceMappingURL=data:application/json;base64,
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaXBlLXByb3ZpZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3NlcnZpY2VzL3N0cmlwZS1wcm92aWRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHNFQUE0QztBQUM1QyxvQ0FBb0U7QUFFcEUsTUFBTSxxQkFBc0IsU0FBUSxxQkFBVTtJQUc1QyxZQUFZLENBQUMsRUFBRSxPQUFPO1FBQ3BCLEtBQUssQ0FBQyxDQUFDLEVBQUUsT0FBTyxDQUFDLENBQUE7SUFDbkIsQ0FBQztJQUVELElBQUksb0JBQW9CO1FBQ3RCLE9BQU8sRUFBRSxDQUFBO0lBQ1gsQ0FBQzs7QUFSTSw4QkFBUSxHQUFHLDJCQUFtQixDQUFDLE1BQU0sQ0FBQTtBQVc5QyxrQkFBZSxxQkFBcUIsQ0FBQSJ9
|
@@ -1,42 +1,21 @@
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
18
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
19
4
|
};
|
20
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
return _super.call(this, _, options) || this;
|
6
|
+
const stripe_base_1 = __importDefault(require("../core/stripe-base"));
|
7
|
+
const types_1 = require("../types");
|
8
|
+
class Przelewy24ProviderService extends stripe_base_1.default {
|
9
|
+
constructor(_, options) {
|
10
|
+
super(_, options);
|
27
11
|
}
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
configurable: true
|
37
|
-
});
|
38
|
-
Przelewy24ProviderService.PROVIDER = types_1.PaymentProviderKeys.PRZELEWY_24;
|
39
|
-
return Przelewy24ProviderService;
|
40
|
-
}(stripe_base_1.default));
|
12
|
+
get paymentIntentOptions() {
|
13
|
+
return {
|
14
|
+
payment_method_types: ["p24"],
|
15
|
+
capture_method: "automatic",
|
16
|
+
};
|
17
|
+
}
|
18
|
+
}
|
19
|
+
Przelewy24ProviderService.PROVIDER = types_1.PaymentProviderKeys.PRZELEWY_24;
|
41
20
|
exports.default = Przelewy24ProviderService;
|
42
|
-
//# sourceMappingURL=data:application/json;base64,
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyaXBlLXByemVsZXd5MjQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2VydmljZXMvc3RyaXBlLXByemVsZXd5MjQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxzRUFBNEM7QUFDNUMsb0NBQW9FO0FBRXBFLE1BQU0seUJBQTBCLFNBQVEscUJBQVU7SUFHaEQsWUFBWSxDQUFDLEVBQUUsT0FBTztRQUNwQixLQUFLLENBQUMsQ0FBQyxFQUFFLE9BQU8sQ0FBQyxDQUFBO0lBQ25CLENBQUM7SUFFRCxJQUFJLG9CQUFvQjtRQUN0QixPQUFPO1lBQ0wsb0JBQW9CLEVBQUUsQ0FBQyxLQUFLLENBQUM7WUFDN0IsY0FBYyxFQUFFLFdBQVc7U0FDNUIsQ0FBQTtJQUNILENBQUM7O0FBWE0sa0NBQVEsR0FBRywyQkFBbUIsQ0FBQyxXQUFXLENBQUE7QUFjbkQsa0JBQWUseUJBQXlCLENBQUEifQ==
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@medusajs/payment-stripe",
|
3
|
-
"version": "0.0.3-snapshot-
|
3
|
+
"version": "0.0.3-snapshot-20240520151134",
|
4
4
|
"description": "Stripe payment provider for Medusa",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"repository": {
|
@@ -23,7 +23,7 @@
|
|
23
23
|
"watch": "tsc --watch"
|
24
24
|
},
|
25
25
|
"devDependencies": {
|
26
|
-
"@medusajs/medusa": "1.
|
26
|
+
"@medusajs/medusa": "1.20.6-snapshot-20240520151134",
|
27
27
|
"@types/stripe": "^8.0.417",
|
28
28
|
"awilix": "^8.0.1",
|
29
29
|
"cross-env": "^5.2.1",
|
@@ -32,10 +32,10 @@
|
|
32
32
|
"typescript": "^4.9.5"
|
33
33
|
},
|
34
34
|
"peerDependencies": {
|
35
|
-
"@medusajs/medusa": "1.
|
35
|
+
"@medusajs/medusa": "1.20.6-snapshot-20240520151134"
|
36
36
|
},
|
37
37
|
"dependencies": {
|
38
|
-
"@medusajs/utils": "1.12.0-snapshot-
|
38
|
+
"@medusajs/utils": "1.12.0-snapshot-20240520151134",
|
39
39
|
"body-parser": "^1.19.0",
|
40
40
|
"express": "^4.17.1",
|
41
41
|
"stripe": "latest"
|