@chevre/domain 21.20.0-alpha.33 → 21.20.0-alpha.35
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.
- package/lib/chevre/service/assetTransaction/pay/potentialActions.d.ts +8 -1
- package/lib/chevre/service/assetTransaction/pay/potentialActions.js +2 -1
- package/lib/chevre/service/assetTransaction/pay.d.ts +21 -1
- package/lib/chevre/service/assetTransaction/pay.js +39 -16
- package/lib/chevre/service/order/confirmPayTransaction.d.ts +3 -1
- package/lib/chevre/service/order/confirmPayTransaction.js +2 -2
- package/lib/chevre/service/payment/creditCard.d.ts +1 -1
- package/lib/chevre/service/payment/faceToFace.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket.d.ts +1 -1
- package/lib/chevre/service/payment/paymentCard.d.ts +1 -1
- package/lib/chevre/service/payment.d.ts +5 -0
- package/lib/chevre/service/payment.js +40 -5
- package/lib/chevre/service/task/confirmPayTransaction.js +1 -1
- package/lib/chevre/service/task/pay.js +6 -0
- package/package.json +2 -2
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import * as factory from '../../../factory';
|
|
2
2
|
import { IAcceptedOfferMovieTicketUsed } from './potentialActions/createPayObjectServiceOutput';
|
|
3
|
+
declare function createPayActions(params: {
|
|
4
|
+
transaction: factory.assetTransaction.ITransaction<factory.assetTransactionType.Pay>;
|
|
5
|
+
potentialActions?: factory.assetTransaction.pay.IPotentialActionsParams;
|
|
6
|
+
order: Pick<factory.order.IOrder, 'typeOf' | 'confirmationNumber' | 'orderNumber'> & {
|
|
7
|
+
acceptedOffersMovieTicketUsed: IAcceptedOfferMovieTicketUsed[];
|
|
8
|
+
};
|
|
9
|
+
}): factory.action.trade.pay.IAttributes[];
|
|
3
10
|
/**
|
|
4
11
|
* 取引のポストアクションを作成する
|
|
5
12
|
*/
|
|
@@ -10,4 +17,4 @@ declare function createPotentialActions(params: {
|
|
|
10
17
|
acceptedOffersMovieTicketUsed: IAcceptedOfferMovieTicketUsed[];
|
|
11
18
|
};
|
|
12
19
|
}): factory.assetTransaction.IPotentialActions<factory.assetTransactionType.Pay>;
|
|
13
|
-
export { createPotentialActions, IAcceptedOfferMovieTicketUsed };
|
|
20
|
+
export { createPayActions, createPotentialActions, IAcceptedOfferMovieTicketUsed };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createPotentialActions = void 0;
|
|
3
|
+
exports.createPotentialActions = exports.createPayActions = void 0;
|
|
4
4
|
const factory = require("../../../factory");
|
|
5
5
|
const createPayObjectServiceOutput_1 = require("./potentialActions/createPayObjectServiceOutput");
|
|
6
6
|
function createPayActions(params) {
|
|
@@ -28,6 +28,7 @@ function createPayActions(params) {
|
|
|
28
28
|
}
|
|
29
29
|
return payActions;
|
|
30
30
|
}
|
|
31
|
+
exports.createPayActions = createPayActions;
|
|
31
32
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
32
33
|
function createPayObject(params) {
|
|
33
34
|
var _a;
|
|
@@ -17,6 +17,7 @@ import type { MongoRepository as PaymentAcceptedRepo } from '../../repo/sellerPa
|
|
|
17
17
|
import type { MongoRepository as TaskRepo } from '../../repo/task';
|
|
18
18
|
import * as CreditCardPayment from '../payment/creditCard';
|
|
19
19
|
import * as MovieTicketPayment from '../payment/movieTicket';
|
|
20
|
+
import { IAcceptedOfferMovieTicketUsed } from './pay/potentialActions';
|
|
20
21
|
export interface IStartOperationRepos {
|
|
21
22
|
accountingReport: AccountingReportRepo;
|
|
22
23
|
action: ActionRepo;
|
|
@@ -102,7 +103,26 @@ export declare function start(params: factory.assetTransaction.pay.IStartParamsW
|
|
|
102
103
|
/**
|
|
103
104
|
* 取引確定
|
|
104
105
|
*/
|
|
105
|
-
export declare function confirm(params: factory.assetTransaction.pay.IConfirmParams
|
|
106
|
+
export declare function confirm(params: factory.assetTransaction.pay.IConfirmParams & {
|
|
107
|
+
options: {
|
|
108
|
+
minimizePotentialActions: boolean;
|
|
109
|
+
};
|
|
110
|
+
}): IConfirmOperation<void>;
|
|
111
|
+
export declare function fixOrderAsPurpose(params: {
|
|
112
|
+
potentialActions: {
|
|
113
|
+
pay: {
|
|
114
|
+
purpose: {
|
|
115
|
+
confirmationNumber: string;
|
|
116
|
+
orderNumber: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
}, transaction: factory.assetTransaction.pay.ITransaction): (repos: {
|
|
121
|
+
acceptedOffer: AcceptedOfferRepo;
|
|
122
|
+
order: OrderRepo;
|
|
123
|
+
}) => Promise<Pick<factory.order.IOrder, "typeOf" | "confirmationNumber" | "orderNumber"> & {
|
|
124
|
+
acceptedOffersMovieTicketUsed: IAcceptedOfferMovieTicketUsed[];
|
|
125
|
+
}>;
|
|
106
126
|
/**
|
|
107
127
|
* 取引中止
|
|
108
128
|
*/
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.searchGMOTrade = exports.exportTasksById = exports.cancel = exports.confirm = exports.start = exports.check = exports.invalidatePaymentUrl = exports.publishPaymentUrl = void 0;
|
|
12
|
+
exports.searchGMOTrade = exports.exportTasksById = exports.cancel = exports.fixOrderAsPurpose = exports.confirm = exports.start = exports.check = exports.invalidatePaymentUrl = exports.publishPaymentUrl = void 0;
|
|
13
13
|
const createDebug = require("debug");
|
|
14
14
|
const moment = require("moment");
|
|
15
15
|
const factory = require("../../factory");
|
|
@@ -342,7 +342,7 @@ function saveAuthorizeResult(params) {
|
|
|
342
342
|
*/
|
|
343
343
|
function confirm(params) {
|
|
344
344
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
345
|
-
var _a, _b;
|
|
345
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
346
346
|
let transaction;
|
|
347
347
|
// 取引存在確認
|
|
348
348
|
if (typeof params.id === 'string') {
|
|
@@ -366,15 +366,41 @@ function confirm(params) {
|
|
|
366
366
|
if (typeof specifiedPaymentMethodIdentifire === 'string' && specifiedPaymentMethodIdentifire.length > 0) {
|
|
367
367
|
overwritingPaymentMethodIdentifier = specifiedPaymentMethodIdentifire;
|
|
368
368
|
transaction.object.paymentMethod.identifier = overwritingPaymentMethodIdentifier;
|
|
369
|
-
// transaction.object.paymentMethod.typeOf = overwritingPaymentMethodIdentifier;
|
|
370
369
|
}
|
|
371
370
|
}
|
|
372
|
-
const
|
|
373
|
-
const
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
}
|
|
371
|
+
const confirmationNumber = (_e = (_d = (_c = params.potentialActions) === null || _c === void 0 ? void 0 : _c.pay) === null || _d === void 0 ? void 0 : _d.purpose) === null || _e === void 0 ? void 0 : _e.confirmationNumber;
|
|
372
|
+
const orderNumber = (_h = (_g = (_f = params.potentialActions) === null || _f === void 0 ? void 0 : _f.pay) === null || _g === void 0 ? void 0 : _g.purpose) === null || _h === void 0 ? void 0 : _h.orderNumber;
|
|
373
|
+
if (typeof confirmationNumber !== 'string' || confirmationNumber.length === 0
|
|
374
|
+
|| typeof orderNumber !== 'string' || orderNumber.length === 0) {
|
|
375
|
+
throw new factory.errors.ArgumentNull('potentialActions.pay.purpose');
|
|
376
|
+
}
|
|
377
|
+
let potentialActions;
|
|
378
|
+
if (params.options.minimizePotentialActions) {
|
|
379
|
+
// 注文検証
|
|
380
|
+
const existingOrders = yield repos.order.search({
|
|
381
|
+
limit: 1,
|
|
382
|
+
page: 1,
|
|
383
|
+
project: { id: { $eq: transaction.project.id } },
|
|
384
|
+
confirmationNumbers: [confirmationNumber],
|
|
385
|
+
orderNumbers: [orderNumber]
|
|
386
|
+
}, { orderNumber: 1 });
|
|
387
|
+
if (existingOrders.length === 0) {
|
|
388
|
+
throw new factory.errors.NotFound(factory.order.OrderType.Order);
|
|
389
|
+
}
|
|
390
|
+
const payActionData4order = {
|
|
391
|
+
object: { paymentMethod: { paymentMethodId: transaction.transactionNumber } },
|
|
392
|
+
purpose: { confirmationNumber, orderNumber, typeOf: factory.order.OrderType.Order }
|
|
393
|
+
};
|
|
394
|
+
potentialActions = { pay: [payActionData4order] };
|
|
395
|
+
}
|
|
396
|
+
else {
|
|
397
|
+
const order = yield fixOrderAsPurpose({ potentialActions: { pay: { purpose: { confirmationNumber, orderNumber } } } }, transaction)(repos);
|
|
398
|
+
potentialActions = (0, potentialActions_1.createPotentialActions)({
|
|
399
|
+
transaction: transaction,
|
|
400
|
+
potentialActions: params.potentialActions,
|
|
401
|
+
order
|
|
402
|
+
});
|
|
403
|
+
}
|
|
378
404
|
yield repos.assetTransaction.confirm(Object.assign({ typeOf: factory.assetTransactionType.Pay, id: transaction.id, result: {}, potentialActions: potentialActions }, (typeof overwritingPaymentMethodIdentifier === 'string')
|
|
379
405
|
? { object: { paymentMethod: { identifier: overwritingPaymentMethodIdentifier } } }
|
|
380
406
|
: undefined));
|
|
@@ -383,13 +409,9 @@ function confirm(params) {
|
|
|
383
409
|
exports.confirm = confirm;
|
|
384
410
|
function fixOrderAsPurpose(params, transaction) {
|
|
385
411
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
386
|
-
var _a
|
|
387
|
-
const payPurposeConfirmationNumber =
|
|
388
|
-
const payPurposeOrderNumber = (
|
|
389
|
-
if (typeof payPurposeConfirmationNumber !== 'string' || payPurposeConfirmationNumber.length === 0
|
|
390
|
-
|| typeof payPurposeOrderNumber !== 'string' || payPurposeOrderNumber.length === 0) {
|
|
391
|
-
throw new factory.errors.ArgumentNull('potentialActions.pay.purpose');
|
|
392
|
-
}
|
|
412
|
+
var _a;
|
|
413
|
+
const payPurposeConfirmationNumber = params.potentialActions.pay.purpose.confirmationNumber;
|
|
414
|
+
const payPurposeOrderNumber = (_a = params.potentialActions.pay.purpose) === null || _a === void 0 ? void 0 : _a.orderNumber;
|
|
393
415
|
const ordersWithoutAcceptedOffers = yield repos.order.search({
|
|
394
416
|
limit: 1,
|
|
395
417
|
page: 1,
|
|
@@ -425,6 +447,7 @@ function fixOrderAsPurpose(params, transaction) {
|
|
|
425
447
|
return Object.assign(Object.assign({}, orderWithoutAcceptedOffers), { acceptedOffersMovieTicketUsed });
|
|
426
448
|
});
|
|
427
449
|
}
|
|
450
|
+
exports.fixOrderAsPurpose = fixOrderAsPurpose;
|
|
428
451
|
/**
|
|
429
452
|
* 取引中止
|
|
430
453
|
*/
|
|
@@ -8,7 +8,9 @@ import type { MongoRepository as OrderRepo } from '../../repo/order';
|
|
|
8
8
|
import type { MongoRepository as ProjectRepo } from '../../repo/project';
|
|
9
9
|
import type { MongoRepository as TaskRepo } from '../../repo/task';
|
|
10
10
|
import type { MongoRepository as TransactionRepo } from '../../repo/transaction';
|
|
11
|
-
declare function confirmPayTransaction(data: factory.task.IData<factory.taskName.ConfirmPayTransaction
|
|
11
|
+
declare function confirmPayTransaction(data: factory.task.IData<factory.taskName.ConfirmPayTransaction>, options: {
|
|
12
|
+
minimizePotentialActions: boolean;
|
|
13
|
+
}): (repos: {
|
|
12
14
|
acceptedOffer: AcceptedOfferRepo;
|
|
13
15
|
action: ActionRepo;
|
|
14
16
|
assetTransaction: AssetTransactionRepo;
|
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.confirmPayTransaction = void 0;
|
|
13
13
|
const factory = require("../../factory");
|
|
14
14
|
const PayTransactionService = require("../assetTransaction/pay");
|
|
15
|
-
function confirmPayTransaction(data) {
|
|
15
|
+
function confirmPayTransaction(data, options) {
|
|
16
16
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
17
17
|
var _a, _b;
|
|
18
18
|
// アクション開始
|
|
@@ -27,7 +27,7 @@ function confirmPayTransaction(data) {
|
|
|
27
27
|
orderNumber: data.purpose.orderNumber
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
} }, (typeof ((_b = (_a = confirmingTransaction.object) === null || _a === void 0 ? void 0 : _a.paymentMethod) === null || _b === void 0 ? void 0 : _b.identifier) === 'string')
|
|
30
|
+
}, options }, (typeof ((_b = (_a = confirmingTransaction.object) === null || _a === void 0 ? void 0 : _a.paymentMethod) === null || _b === void 0 ? void 0 : _b.identifier) === 'string')
|
|
31
31
|
? { object: { paymentMethod: { identifier: confirmingTransaction.object.paymentMethod.identifier } } }
|
|
32
32
|
: undefined))({
|
|
33
33
|
acceptedOffer: repos.acceptedOffer,
|
|
@@ -46,7 +46,7 @@ declare function voidTransaction(params: factory.task.voidPayment.IData): (repos
|
|
|
46
46
|
/**
|
|
47
47
|
* クレジットカード決済
|
|
48
48
|
*/
|
|
49
|
-
declare function payCreditCard(params: factory.task.pay.
|
|
49
|
+
declare function payCreditCard(params: factory.task.pay.IPayActionData): (repos: {
|
|
50
50
|
action: ActionRepo;
|
|
51
51
|
accountingReport: AccountingReportRepo;
|
|
52
52
|
paymentAccepted: PaymentAcceptedRepo;
|
|
@@ -9,7 +9,7 @@ import type { MongoRepository as TaskRepo } from '../../repo/task';
|
|
|
9
9
|
declare function voidTransaction(__: factory.task.voidPayment.IData): (___: {
|
|
10
10
|
product: ProductRepo;
|
|
11
11
|
}) => Promise<void>;
|
|
12
|
-
declare function payFaceToFace(params: factory.task.pay.
|
|
12
|
+
declare function payFaceToFace(params: factory.task.pay.IPayActionData): (repos: {
|
|
13
13
|
action: ActionRepo;
|
|
14
14
|
accountingReport: AccountingReportRepo;
|
|
15
15
|
product: ProductRepo;
|
|
@@ -66,7 +66,7 @@ type IPayAction = factory.action.trade.pay.IAction;
|
|
|
66
66
|
/**
|
|
67
67
|
* MovieTicket着券
|
|
68
68
|
*/
|
|
69
|
-
declare function payMovieTicket(params: factory.task.pay.
|
|
69
|
+
declare function payMovieTicket(params: factory.task.pay.IPayActionData): IPayOperation<IPayAction>;
|
|
70
70
|
/**
|
|
71
71
|
* MovieTicket着券取消
|
|
72
72
|
*/
|
|
@@ -16,7 +16,7 @@ declare function authorize(params: factory.assetTransaction.pay.IStartParamsWith
|
|
|
16
16
|
declare function voidTransaction(params: factory.task.voidPayment.IData): (repos: {
|
|
17
17
|
product: ProductRepo;
|
|
18
18
|
}) => Promise<void>;
|
|
19
|
-
declare function payPaymentCard(params: factory.task.pay.
|
|
19
|
+
declare function payPaymentCard(params: factory.task.pay.IPayActionData): (repos: {
|
|
20
20
|
action: ActionRepo;
|
|
21
21
|
accountingReport: AccountingReportRepo;
|
|
22
22
|
product: ProductRepo;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 決済サービス
|
|
3
3
|
*/
|
|
4
|
+
import type { MongoRepository as AcceptedOfferRepo } from '../repo/acceptedOffer';
|
|
4
5
|
import type { MongoRepository as AccountingReportRepo } from '../repo/accountingReport';
|
|
5
6
|
import type { MongoRepository as ActionRepo } from '../repo/action';
|
|
6
7
|
import type { MongoRepository as AssetTransactionRepo } from '../repo/assetTransaction';
|
|
7
8
|
import type { MongoRepository as EventRepo } from '../repo/event';
|
|
9
|
+
import type { MongoRepository as OrderRepo } from '../repo/order';
|
|
8
10
|
import type { MongoRepository as PaymentServiceRepo } from '../repo/paymentService';
|
|
9
11
|
import type { MongoRepository as PaymentServiceProviderRepo } from '../repo/paymentServiceProvider';
|
|
10
12
|
import type { MongoRepository as ProductRepo } from '../repo/product';
|
|
@@ -17,9 +19,12 @@ import * as factory from '../factory';
|
|
|
17
19
|
* 決済確定
|
|
18
20
|
*/
|
|
19
21
|
export declare function pay(params: factory.task.pay.IData): (repos: {
|
|
22
|
+
acceptedOffer: AcceptedOfferRepo;
|
|
20
23
|
action: ActionRepo;
|
|
21
24
|
accountingReport: AccountingReportRepo;
|
|
25
|
+
assetTransaction: AssetTransactionRepo;
|
|
22
26
|
event: EventRepo;
|
|
27
|
+
order: OrderRepo;
|
|
23
28
|
paymentAccepted: PaymentAcceptedRepo;
|
|
24
29
|
paymentService: PaymentServiceRepo;
|
|
25
30
|
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
@@ -11,29 +11,64 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.refund = exports.voidPayment = exports.pay = void 0;
|
|
13
13
|
const factory = require("../factory");
|
|
14
|
+
const pay_1 = require("./assetTransaction/pay");
|
|
15
|
+
const potentialActions_1 = require("./assetTransaction/pay/potentialActions");
|
|
14
16
|
const CreditCardPaymentService = require("./payment/creditCard");
|
|
15
17
|
const FaceToFacePaymentService = require("./payment/faceToFace");
|
|
16
18
|
const MovieTicketPaymentService = require("./payment/movieTicket");
|
|
17
19
|
const PaymentCardPaymentService = require("./payment/paymentCard");
|
|
20
|
+
function payTask2payActionAttributes(params) {
|
|
21
|
+
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
let transaction;
|
|
23
|
+
if (typeof params.object.paymentMethod.paymentMethodId === 'string') {
|
|
24
|
+
transaction = yield repos.assetTransaction.findByTransactionNumber({
|
|
25
|
+
typeOf: factory.assetTransactionType.Pay,
|
|
26
|
+
transactionNumber: params.object.paymentMethod.paymentMethodId
|
|
27
|
+
});
|
|
28
|
+
if (transaction.status !== factory.transactionStatusType.Confirmed) {
|
|
29
|
+
throw new factory.errors.Argument('object.paymentMethod.paymentMethodId', `invalid transaction status: ${transaction.transactionNumber} ${transaction.status}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
throw new factory.errors.ArgumentNull('object.paymentMethod.paymentMethodId');
|
|
34
|
+
}
|
|
35
|
+
const order = yield (0, pay_1.fixOrderAsPurpose)({ potentialActions: { pay: { purpose: params.purpose } } }, transaction)(repos);
|
|
36
|
+
const payActions = (0, potentialActions_1.createPayActions)({
|
|
37
|
+
transaction: transaction,
|
|
38
|
+
potentialActions: { pay: { purpose: params.purpose } },
|
|
39
|
+
order
|
|
40
|
+
});
|
|
41
|
+
return payActions[0];
|
|
42
|
+
});
|
|
43
|
+
}
|
|
18
44
|
/**
|
|
19
45
|
* 決済確定
|
|
20
46
|
*/
|
|
21
47
|
function pay(params) {
|
|
22
48
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
23
49
|
var _a;
|
|
24
|
-
|
|
50
|
+
let payActionAttributes;
|
|
51
|
+
if (params.typeOf === factory.actionType.PayAction) {
|
|
52
|
+
// タスクにPayActionそのものが指定されていればそのまま処理
|
|
53
|
+
payActionAttributes = params;
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
// 最適化されたタスクに対応(2024-01-19~)
|
|
57
|
+
payActionAttributes = yield payTask2payActionAttributes(params)(repos);
|
|
58
|
+
}
|
|
59
|
+
const paymentServiceType = (_a = payActionAttributes.object[0]) === null || _a === void 0 ? void 0 : _a.typeOf;
|
|
25
60
|
switch (paymentServiceType) {
|
|
26
61
|
case factory.service.paymentService.PaymentServiceType.FaceToFace:
|
|
27
|
-
yield FaceToFacePaymentService.payFaceToFace(
|
|
62
|
+
yield FaceToFacePaymentService.payFaceToFace(payActionAttributes)(repos);
|
|
28
63
|
break;
|
|
29
64
|
case factory.service.paymentService.PaymentServiceType.PaymentCard:
|
|
30
|
-
yield PaymentCardPaymentService.payPaymentCard(
|
|
65
|
+
yield PaymentCardPaymentService.payPaymentCard(payActionAttributes)(repos);
|
|
31
66
|
break;
|
|
32
67
|
case factory.service.paymentService.PaymentServiceType.CreditCard:
|
|
33
|
-
yield CreditCardPaymentService.payCreditCard(
|
|
68
|
+
yield CreditCardPaymentService.payCreditCard(payActionAttributes)(repos);
|
|
34
69
|
break;
|
|
35
70
|
case factory.service.paymentService.PaymentServiceType.MovieTicket:
|
|
36
|
-
yield MovieTicketPaymentService.payMovieTicket(
|
|
71
|
+
yield MovieTicketPaymentService.payMovieTicket(payActionAttributes)(repos);
|
|
37
72
|
break;
|
|
38
73
|
default:
|
|
39
74
|
throw new factory.errors.NotImplemented(`Payment service '${paymentServiceType}' not implemented`);
|
|
@@ -29,7 +29,7 @@ function call(data) {
|
|
|
29
29
|
if (settings.redisClient === undefined) {
|
|
30
30
|
throw new factory.errors.Argument('settings', 'redisClient required');
|
|
31
31
|
}
|
|
32
|
-
yield (0, confirmPayTransaction_1.confirmPayTransaction)(data)({
|
|
32
|
+
yield (0, confirmPayTransaction_1.confirmPayTransaction)(data, { minimizePotentialActions: false })({
|
|
33
33
|
acceptedOffer: new acceptedOffer_1.MongoRepository(settings.connection),
|
|
34
34
|
action: new action_1.MongoRepository(settings.connection),
|
|
35
35
|
assetTransaction: new assetTransaction_1.MongoRepository(settings.connection),
|
|
@@ -10,9 +10,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.call = void 0;
|
|
13
|
+
const acceptedOffer_1 = require("../../repo/acceptedOffer");
|
|
13
14
|
const accountingReport_1 = require("../../repo/accountingReport");
|
|
14
15
|
const action_1 = require("../../repo/action");
|
|
16
|
+
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
15
17
|
const event_1 = require("../../repo/event");
|
|
18
|
+
const order_1 = require("../../repo/order");
|
|
16
19
|
const paymentService_1 = require("../../repo/paymentService");
|
|
17
20
|
const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
|
|
18
21
|
const product_1 = require("../../repo/product");
|
|
@@ -26,9 +29,12 @@ const PaymentService = require("../payment");
|
|
|
26
29
|
function call(data) {
|
|
27
30
|
return (settings) => __awaiter(this, void 0, void 0, function* () {
|
|
28
31
|
yield PaymentService.pay(data)({
|
|
32
|
+
acceptedOffer: new acceptedOffer_1.MongoRepository(settings.connection),
|
|
29
33
|
accountingReport: new accountingReport_1.MongoRepository(settings.connection),
|
|
30
34
|
action: new action_1.MongoRepository(settings.connection),
|
|
35
|
+
assetTransaction: new assetTransaction_1.MongoRepository(settings.connection),
|
|
31
36
|
event: new event_1.MongoRepository(settings.connection),
|
|
37
|
+
order: new order_1.MongoRepository(settings.connection),
|
|
32
38
|
paymentAccepted: new sellerPaymentAccepted_1.MongoRepository(settings.connection),
|
|
33
39
|
paymentService: new paymentService_1.MongoRepository(settings.connection),
|
|
34
40
|
paymentServiceProvider: new paymentServiceProvider_1.MongoRepository(settings.connection),
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@aws-sdk/credential-providers": "3.433.0",
|
|
13
|
-
"@chevre/factory": "4.352.0-alpha.
|
|
13
|
+
"@chevre/factory": "4.352.0-alpha.1",
|
|
14
14
|
"@cinerino/sdk": "5.9.0-alpha.0",
|
|
15
15
|
"@motionpicture/coa-service": "9.2.0",
|
|
16
16
|
"@motionpicture/gmo-service": "5.3.0-alpha.0",
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
"postversion": "git push origin --tags",
|
|
116
116
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
117
117
|
},
|
|
118
|
-
"version": "21.20.0-alpha.
|
|
118
|
+
"version": "21.20.0-alpha.35"
|
|
119
119
|
}
|