@chevre/domain 21.20.0-alpha.49 → 21.20.0-alpha.50
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.
|
@@ -27,7 +27,8 @@ exports.credentials = {
|
|
|
27
27
|
},
|
|
28
28
|
gmo: {
|
|
29
29
|
// tslint:disable-next-line:no-magic-numbers
|
|
30
|
-
timeout: (typeof process.env.GMO_TIMEOUT === 'string') ? Number(process.env.GMO_TIMEOUT) : 10000
|
|
30
|
+
timeout: (typeof process.env.GMO_TIMEOUT === 'string') ? Number(process.env.GMO_TIMEOUT) : 10000,
|
|
31
|
+
useFetch: process.env.GMO_USE_FETCH === '1'
|
|
31
32
|
},
|
|
32
33
|
lineNotify: {
|
|
33
34
|
url: process.env.LINE_NOTIFY_URL,
|
|
@@ -87,7 +87,10 @@ function authorize(params, paymentServiceId, options) {
|
|
|
87
87
|
const searchTrade4accountId = (options === null || options === void 0 ? void 0 : options.searchTrade4accountId) === true;
|
|
88
88
|
if (searchTrade4accountId) {
|
|
89
89
|
try {
|
|
90
|
-
const creditCardService = new GMO.service.Credit({
|
|
90
|
+
const creditCardService = new GMO.service.Credit({
|
|
91
|
+
endpoint: String(availableChannel.serviceUrl),
|
|
92
|
+
useFetch: credentials_1.credentials.gmo.useFetch
|
|
93
|
+
}, { timeout: credentials_1.credentials.gmo.timeout });
|
|
91
94
|
// ベストエフォートでクレジットカード詳細情報を取得
|
|
92
95
|
const startSearchTradeDate = Date.now();
|
|
93
96
|
debug('searchTrade processing...orderId:', orderId, startSearchTradeDate);
|
|
@@ -118,7 +121,10 @@ function processAuthorizeCreditCard(params) {
|
|
|
118
121
|
let entryTranResult;
|
|
119
122
|
let execTranArgs;
|
|
120
123
|
let execTranResult;
|
|
121
|
-
const creditCardService = new GMO.service.Credit({
|
|
124
|
+
const creditCardService = new GMO.service.Credit({
|
|
125
|
+
endpoint: String(params.availableChannel.serviceUrl),
|
|
126
|
+
useFetch: credentials_1.credentials.gmo.useFetch
|
|
127
|
+
}, { timeout: credentials_1.credentials.gmo.timeout });
|
|
122
128
|
const creditCard = params.object.creditCard;
|
|
123
129
|
const memberId = creditCard.memberId;
|
|
124
130
|
const cardSeq = creditCard.cardSeq;
|
|
@@ -219,7 +225,10 @@ function processAuthorizeCreditCard(params) {
|
|
|
219
225
|
}
|
|
220
226
|
function processAuthorizeCreditCard3ds(params) {
|
|
221
227
|
return () => __awaiter(this, void 0, void 0, function* () {
|
|
222
|
-
const creditCardService = new GMO.service.Credit({
|
|
228
|
+
const creditCardService = new GMO.service.Credit({
|
|
229
|
+
endpoint: String(params.availableChannel.serviceUrl),
|
|
230
|
+
useFetch: credentials_1.credentials.gmo.useFetch
|
|
231
|
+
}, { timeout: credentials_1.credentials.gmo.timeout });
|
|
223
232
|
const { entryTranArgs, entryTranResult, execTranArgs, execTranResult } = params.pendingPaymentAgencyTransaction;
|
|
224
233
|
const { accessId, accessPass } = entryTranResult;
|
|
225
234
|
const secureTran2Result = yield creditCardService.secureTran2({ accessId, accessPass });
|
|
@@ -291,7 +300,10 @@ function voidTransaction(params) {
|
|
|
291
300
|
throw new factory.errors.ArgumentNull('object.recipient.id');
|
|
292
301
|
}
|
|
293
302
|
const { shopId, shopPass } = yield getGMOInfoFromSeller({ paymentMethodType, seller: { id: sellerId }, paymentServiceId })(repos);
|
|
294
|
-
const creditCardService = new GMO.service.Credit({
|
|
303
|
+
const creditCardService = new GMO.service.Credit({
|
|
304
|
+
endpoint: String(availableChannel.serviceUrl),
|
|
305
|
+
useFetch: credentials_1.credentials.gmo.useFetch
|
|
306
|
+
}, { timeout: credentials_1.credentials.gmo.timeout });
|
|
295
307
|
// オーソリ取消
|
|
296
308
|
// 現時点では、ここで失敗したらオーソリ取消をあきらめる
|
|
297
309
|
// GMO混雑エラーはここでも発生する(取消処理でも混雑エラーが発生することは確認済)
|
|
@@ -348,7 +360,10 @@ function payCreditCard(params) {
|
|
|
348
360
|
let action = yield repos.action.start(params);
|
|
349
361
|
const alterTranResults = [];
|
|
350
362
|
try {
|
|
351
|
-
const creditCardService = new GMO.service.Credit({
|
|
363
|
+
const creditCardService = new GMO.service.Credit({
|
|
364
|
+
endpoint: String(availableChannel.serviceUrl),
|
|
365
|
+
useFetch: credentials_1.credentials.gmo.useFetch
|
|
366
|
+
}, { timeout: credentials_1.credentials.gmo.timeout });
|
|
352
367
|
yield Promise.all(payObject.map((paymentMethod) => __awaiter(this, void 0, void 0, function* () {
|
|
353
368
|
alterTranResults.push(...yield processAlterTran({ shopId, shopPass, availableChannel, paymentMethod })({ creditCardService }));
|
|
354
369
|
})));
|
|
@@ -500,7 +515,10 @@ function processChangeTransaction(params) {
|
|
|
500
515
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
501
516
|
return __awaiter(this, void 0, void 0, function* () {
|
|
502
517
|
const alterTranResult = [];
|
|
503
|
-
const creditCardService = new GMO.service.Credit({
|
|
518
|
+
const creditCardService = new GMO.service.Credit({
|
|
519
|
+
endpoint: String(params.availableChannel.serviceUrl),
|
|
520
|
+
useFetch: credentials_1.credentials.gmo.useFetch
|
|
521
|
+
}, { timeout: credentials_1.credentials.gmo.timeout });
|
|
504
522
|
// 取引状態参照
|
|
505
523
|
const searchTradeResult = yield creditCardService.searchTrade({
|
|
506
524
|
shopId: params.shopId,
|
|
@@ -604,7 +622,10 @@ exports.getGMOInfoFromSeller = getGMOInfoFromSeller;
|
|
|
604
622
|
function searchGMOTrade(params) {
|
|
605
623
|
var _a, _b;
|
|
606
624
|
return __awaiter(this, void 0, void 0, function* () {
|
|
607
|
-
const creditCardService = new GMO.service.Credit({
|
|
625
|
+
const creditCardService = new GMO.service.Credit({
|
|
626
|
+
endpoint: String(params.availableChannel.serviceUrl),
|
|
627
|
+
useFetch: credentials_1.credentials.gmo.useFetch
|
|
628
|
+
}, { timeout: credentials_1.credentials.gmo.timeout });
|
|
608
629
|
// 取引状態参照
|
|
609
630
|
debug('searching trade...', params.paymentMethodId);
|
|
610
631
|
const searchTradeResult = yield creditCardService.searchTrade({
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@chevre/factory": "4.352.0-alpha.7",
|
|
14
14
|
"@cinerino/sdk": "5.9.0-alpha.1",
|
|
15
15
|
"@motionpicture/coa-service": "9.3.0-alpha.0",
|
|
16
|
-
"@motionpicture/gmo-service": "5.3.0-alpha.
|
|
16
|
+
"@motionpicture/gmo-service": "5.3.0-alpha.1",
|
|
17
17
|
"@sendgrid/mail": "6.4.0",
|
|
18
18
|
"@surfrock/sdk": "1.2.0",
|
|
19
19
|
"@waiter/domain": "6.4.0-alpha.4",
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"postversion": "git push origin --tags",
|
|
113
113
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
114
114
|
},
|
|
115
|
-
"version": "21.20.0-alpha.
|
|
115
|
+
"version": "21.20.0-alpha.50"
|
|
116
116
|
}
|