@chevre/domain 21.33.0-alpha.23 → 21.33.0-alpha.24
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.d.ts +1 -0
- package/lib/chevre/service/payment/any.d.ts +2 -0
- package/lib/chevre/service/payment/creditCard/factory.d.ts +18 -2
- package/lib/chevre/service/payment/creditCard/factory.js +37 -3
- package/lib/chevre/service/payment/creditCard.d.ts +1 -0
- package/lib/chevre/service/payment/creditCard.js +36 -19
- package/lib/chevre/service/payment/movieTicket/factory.d.ts +18 -3
- package/lib/chevre/service/payment/movieTicket/factory.js +58 -3
- package/lib/chevre/service/payment/movieTicket.d.ts +2 -0
- package/lib/chevre/service/payment/movieTicket.js +9 -1
- package/lib/chevre/service/payment.d.ts +2 -0
- package/lib/chevre/service/task/refund.js +2 -0
- package/lib/chevre/service/task/voidPayTransaction.js +2 -2
- package/lib/chevre/service/task/voidPayment.js +2 -0
- package/package.json +3 -3
|
@@ -66,6 +66,7 @@ export type IPublishPaymentUrlOperation<T> = (repos: {
|
|
|
66
66
|
export type IInvalidatePaymentUrlOperation<T> = (repos: {
|
|
67
67
|
accountingReport: AccountingReportRepo;
|
|
68
68
|
action: ActionRepo;
|
|
69
|
+
actionRecipe: ActionRecipeRepo;
|
|
69
70
|
paymentAccepted: PaymentAcceptedRepo;
|
|
70
71
|
paymentService: PaymentServiceRepo;
|
|
71
72
|
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
@@ -28,6 +28,7 @@ import { person2username } from './any/person2username';
|
|
|
28
28
|
declare function voidPayTransaction(params: factory.task.IData<factory.taskName.VoidPayTransaction>): (repos: {
|
|
29
29
|
accountingReport: AccountingReportRepo;
|
|
30
30
|
action: ActionRepo;
|
|
31
|
+
actionRecipe: ActionRecipeRepo;
|
|
31
32
|
assetTransaction: AssetTransactionRepo;
|
|
32
33
|
paymentAccepted: PaymentAcceptedRepo;
|
|
33
34
|
paymentService: PaymentServiceRepo;
|
|
@@ -38,6 +39,7 @@ declare function voidPayTransaction(params: factory.task.IData<factory.taskName.
|
|
|
38
39
|
declare function invalidatePaymentUrl(params: factory.task.IData<factory.taskName.VoidPayTransaction>): (repos: {
|
|
39
40
|
accountingReport: AccountingReportRepo;
|
|
40
41
|
action: ActionRepo;
|
|
42
|
+
actionRecipe: ActionRecipeRepo;
|
|
41
43
|
assetTransaction: AssetTransactionRepo;
|
|
42
44
|
paymentAccepted: PaymentAcceptedRepo;
|
|
43
45
|
paymentService: PaymentServiceRepo;
|
|
@@ -6,7 +6,13 @@ interface IProcessAlterTranResult {
|
|
|
6
6
|
alterTranArgs?: GMO.factory.credit.IAlterTranArgs & GMO.factory.credit.IOptionalSiteArgs;
|
|
7
7
|
alterTranResult: GMO.factory.credit.IAlterTranResult;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
interface IProcessAlterTranResult4refund {
|
|
10
|
+
searchTradeArgs: GMO.factory.credit.ISearchTradeArgs & GMO.factory.credit.IOptionalSiteArgs;
|
|
11
|
+
searchTradeResult: GMO.factory.credit.ISearchTradeResult;
|
|
12
|
+
alterTranArgs?: GMO.factory.credit.IAlterTranArgs & GMO.factory.credit.IOptionalSiteArgs;
|
|
13
|
+
alterTranResult: GMO.factory.credit.IAlterTranResult | factory.action.trade.refund.IAlterTranResultAsError;
|
|
14
|
+
}
|
|
15
|
+
declare function processAlterTranResult2payRecipe(params: {
|
|
10
16
|
processAlterTranResults: IProcessAlterTranResult[];
|
|
11
17
|
project: {
|
|
12
18
|
id: string;
|
|
@@ -16,4 +22,14 @@ declare function processAlterTranResult2recipe(params: {
|
|
|
16
22
|
typeOf: factory.actionType;
|
|
17
23
|
};
|
|
18
24
|
}): factory.action.trade.pay.IPayCreditCardRecipe;
|
|
19
|
-
|
|
25
|
+
declare function processAlterTranResult2refundRecipe(params: {
|
|
26
|
+
processAlterTranResult: IProcessAlterTranResult4refund;
|
|
27
|
+
project: {
|
|
28
|
+
id: string;
|
|
29
|
+
};
|
|
30
|
+
action: {
|
|
31
|
+
id: string;
|
|
32
|
+
typeOf: factory.actionType;
|
|
33
|
+
};
|
|
34
|
+
}): factory.action.trade.refund.IRefundCreditCardRecipe;
|
|
35
|
+
export { IProcessAlterTranResult, IProcessAlterTranResult4refund, processAlterTranResult2payRecipe, processAlterTranResult2refundRecipe };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.processAlterTranResult2refundRecipe = exports.processAlterTranResult2payRecipe = void 0;
|
|
4
4
|
const factory = require("../../../factory");
|
|
5
|
-
function
|
|
5
|
+
function processAlterTranResult2payRecipe(params) {
|
|
6
6
|
const { processAlterTranResults, project, action } = params;
|
|
7
7
|
return {
|
|
8
8
|
project: { id: project.id, typeOf: factory.organizationType.Project },
|
|
@@ -35,4 +35,38 @@ function processAlterTranResult2recipe(params) {
|
|
|
35
35
|
})
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
exports.
|
|
38
|
+
exports.processAlterTranResult2payRecipe = processAlterTranResult2payRecipe;
|
|
39
|
+
function processAlterTranResult2refundRecipe(params) {
|
|
40
|
+
const { processAlterTranResult, project, action } = params;
|
|
41
|
+
return {
|
|
42
|
+
project: { id: project.id, typeOf: factory.organizationType.Project },
|
|
43
|
+
typeOf: 'Recipe',
|
|
44
|
+
recipeCategory: factory.recipe.RecipeCategory.refundCreditCard,
|
|
45
|
+
recipeFor: { id: action.id, typeOf: action.typeOf },
|
|
46
|
+
step: [{
|
|
47
|
+
typeOf: 'HowToSection',
|
|
48
|
+
itemListElement: [
|
|
49
|
+
{
|
|
50
|
+
typeOf: 'HowToStep',
|
|
51
|
+
identifier: factory.recipe.StepIdentifier.searchTrade,
|
|
52
|
+
itemListElement: [{
|
|
53
|
+
typeOf: 'HowToDirection',
|
|
54
|
+
beforeMedia: processAlterTranResult.searchTradeArgs,
|
|
55
|
+
afterMedia: processAlterTranResult.searchTradeResult
|
|
56
|
+
// text: 'entryTran'
|
|
57
|
+
}]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
typeOf: 'HowToStep',
|
|
61
|
+
identifier: factory.recipe.StepIdentifier.alterTran,
|
|
62
|
+
itemListElement: [Object.assign({ typeOf: 'HowToDirection', afterMedia: processAlterTranResult.alterTranResult }, (processAlterTranResult.alterTranArgs !== undefined)
|
|
63
|
+
? { beforeMedia: processAlterTranResult.alterTranArgs }
|
|
64
|
+
: undefined
|
|
65
|
+
// text: 'execTran'
|
|
66
|
+
)]
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}]
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
exports.processAlterTranResult2refundRecipe = processAlterTranResult2refundRecipe;
|
|
@@ -76,6 +76,7 @@ declare function refundCreditCard(params: factory.task.refund.IData & {
|
|
|
76
76
|
requirePayAction: boolean;
|
|
77
77
|
}): (repos: {
|
|
78
78
|
action: ActionRepo;
|
|
79
|
+
actionRecipe: ActionRecipeRepo;
|
|
79
80
|
accountingReport: AccountingReportRepo;
|
|
80
81
|
paymentAccepted: PaymentAcceptedRepo;
|
|
81
82
|
paymentService: PaymentServiceRepo;
|
|
@@ -338,7 +338,7 @@ function payCreditCard(params) {
|
|
|
338
338
|
})));
|
|
339
339
|
// add recipe(2024-06-03~)
|
|
340
340
|
if (settings_1.USE_EXPERIMENTAL_FEATURE) {
|
|
341
|
-
yield repos.actionRecipe.saveOne((0, factory_1.
|
|
341
|
+
yield repos.actionRecipe.saveOne((0, factory_1.processAlterTranResult2payRecipe)({
|
|
342
342
|
processAlterTranResults,
|
|
343
343
|
project: { id: params.project.id },
|
|
344
344
|
action: { id: action.id, typeOf: action.typeOf }
|
|
@@ -465,17 +465,10 @@ function refundCreditCard(params, options) {
|
|
|
465
465
|
typeOf: factory.service.paymentService.PaymentServiceType.CreditCard,
|
|
466
466
|
id: paymentServiceId
|
|
467
467
|
});
|
|
468
|
-
let action = yield repos.action.start(Object.assign(Object.assign({}, params), (typeof ((_e = params.sameAs) === null || _e === void 0 ? void 0 : _e.id) === 'string')
|
|
469
|
-
|
|
470
|
-
sameAs: {
|
|
471
|
-
id: params.sameAs.id,
|
|
472
|
-
typeOf: 'Task'
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
: undefined));
|
|
476
|
-
let alterTranResult = [];
|
|
468
|
+
let action = yield repos.action.start(Object.assign(Object.assign({}, params), (typeof ((_e = params.sameAs) === null || _e === void 0 ? void 0 : _e.id) === 'string') ? { sameAs: { id: params.sameAs.id, typeOf: 'Task' } } : undefined));
|
|
469
|
+
const alterTranResult = [];
|
|
477
470
|
try {
|
|
478
|
-
|
|
471
|
+
const processAlterTranResult = yield processChangeTransaction({
|
|
479
472
|
availableChannel,
|
|
480
473
|
payAction: payAction,
|
|
481
474
|
paymentMethodId: paymentMethodId,
|
|
@@ -483,6 +476,17 @@ function refundCreditCard(params, options) {
|
|
|
483
476
|
shopPass: shopPass,
|
|
484
477
|
refundFee: (_f = params.object[0]) === null || _f === void 0 ? void 0 : _f.refundFee
|
|
485
478
|
});
|
|
479
|
+
if (processAlterTranResult.alterTranResult !== undefined) {
|
|
480
|
+
alterTranResult.push(processAlterTranResult.alterTranResult);
|
|
481
|
+
}
|
|
482
|
+
// add recipe(2024-06-04~)
|
|
483
|
+
if (settings_1.USE_EXPERIMENTAL_FEATURE) {
|
|
484
|
+
yield repos.actionRecipe.saveOne((0, factory_1.processAlterTranResult2refundRecipe)({
|
|
485
|
+
processAlterTranResult,
|
|
486
|
+
project: { id: params.project.id },
|
|
487
|
+
action: { id: action.id, typeOf: action.typeOf }
|
|
488
|
+
}));
|
|
489
|
+
}
|
|
486
490
|
}
|
|
487
491
|
catch (error) {
|
|
488
492
|
try {
|
|
@@ -500,22 +504,26 @@ function refundCreditCard(params, options) {
|
|
|
500
504
|
});
|
|
501
505
|
}
|
|
502
506
|
exports.refundCreditCard = refundCreditCard;
|
|
507
|
+
// tslint:disable-next-line:max-func-body-length
|
|
503
508
|
function processChangeTransaction(params) {
|
|
504
509
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
505
510
|
return __awaiter(this, void 0, void 0, function* () {
|
|
506
|
-
|
|
511
|
+
let alterTranArgs;
|
|
512
|
+
let alterTranResult;
|
|
513
|
+
let alterTranError;
|
|
507
514
|
const creditCardService = new GMO.service.Credit({
|
|
508
515
|
endpoint: String(params.availableChannel.serviceUrl),
|
|
509
516
|
useFetch: credentials_1.credentials.gmo.useFetch
|
|
510
517
|
}, { timeout: credentials_1.credentials.gmo.timeout });
|
|
511
518
|
// 取引状態参照
|
|
512
|
-
const
|
|
519
|
+
const searchTradeArgs = {
|
|
513
520
|
shopId: params.shopId,
|
|
514
521
|
shopPass: params.shopPass,
|
|
515
522
|
orderId: params.paymentMethodId,
|
|
516
523
|
siteId: (_a = params.availableChannel.credentials) === null || _a === void 0 ? void 0 : _a.siteId,
|
|
517
524
|
sitePass: (_b = params.availableChannel.credentials) === null || _b === void 0 ? void 0 : _b.sitePass
|
|
518
|
-
}
|
|
525
|
+
};
|
|
526
|
+
const searchTradeResult = yield creditCardService.searchTrade(searchTradeArgs);
|
|
519
527
|
// 冪等性の担保をいったん保留
|
|
520
528
|
let creditCardSalesBefore;
|
|
521
529
|
if (Array.isArray((_d = (_c = params.payAction) === null || _c === void 0 ? void 0 : _c.result) === null || _d === void 0 ? void 0 : _d.creditCardSales)) {
|
|
@@ -536,20 +544,20 @@ function processChangeTransaction(params) {
|
|
|
536
544
|
}
|
|
537
545
|
}
|
|
538
546
|
if (alreadyRefunded) {
|
|
539
|
-
alterTranResult
|
|
547
|
+
alterTranResult = {
|
|
540
548
|
accessId: searchTradeResult.accessId,
|
|
541
549
|
accessPass: searchTradeResult.accessPass,
|
|
542
550
|
forward: searchTradeResult.forward,
|
|
543
551
|
approve: searchTradeResult.approve,
|
|
544
552
|
tranId: searchTradeResult.tranId,
|
|
545
553
|
tranDate: ''
|
|
546
|
-
}
|
|
554
|
+
};
|
|
547
555
|
}
|
|
548
556
|
else {
|
|
549
557
|
try {
|
|
550
558
|
// 手数料決済については、取消→即時売上の流れ
|
|
551
559
|
debug('alterTran processing... searchTradeResult:', searchTradeResult);
|
|
552
|
-
|
|
560
|
+
alterTranArgs = {
|
|
553
561
|
shopId: params.shopId,
|
|
554
562
|
shopPass: params.shopPass,
|
|
555
563
|
accessId: searchTradeResult.accessId,
|
|
@@ -557,7 +565,8 @@ function processChangeTransaction(params) {
|
|
|
557
565
|
jobCd: GMO.utils.util.JobCd.Void,
|
|
558
566
|
siteId: (_g = params.availableChannel.credentials) === null || _g === void 0 ? void 0 : _g.siteId,
|
|
559
567
|
sitePass: (_h = params.availableChannel.credentials) === null || _h === void 0 ? void 0 : _h.sitePass
|
|
560
|
-
}
|
|
568
|
+
};
|
|
569
|
+
alterTranResult = yield creditCardService.alterTran(alterTranArgs);
|
|
561
570
|
debug('alterTran processed.');
|
|
562
571
|
}
|
|
563
572
|
catch (error) {
|
|
@@ -569,6 +578,7 @@ function processChangeTransaction(params) {
|
|
|
569
578
|
debug('creditCardService.alterTran:E01050004:', 'orderId:', searchTradeResult.orderId, 'status:', searchTradeResult.status);
|
|
570
579
|
if (searchTradeResult.status === GMO.utils.util.Status.Authenticated
|
|
571
580
|
|| searchTradeResult.status === GMO.utils.util.Status.Void) {
|
|
581
|
+
alterTranError = error;
|
|
572
582
|
throwsError = false;
|
|
573
583
|
}
|
|
574
584
|
}
|
|
@@ -578,7 +588,14 @@ function processChangeTransaction(params) {
|
|
|
578
588
|
}
|
|
579
589
|
}
|
|
580
590
|
}
|
|
581
|
-
|
|
591
|
+
if (alterTranResult === undefined && alterTranError !== undefined) {
|
|
592
|
+
alterTranResult = alterTranError;
|
|
593
|
+
}
|
|
594
|
+
if (alterTranResult === undefined) {
|
|
595
|
+
// impossible path
|
|
596
|
+
throw new factory.errors.NotImplemented('alterTranResult undefined not implemented');
|
|
597
|
+
}
|
|
598
|
+
return { searchTradeArgs, searchTradeResult, alterTranArgs, alterTranResult };
|
|
582
599
|
});
|
|
583
600
|
}
|
|
584
601
|
function getGMOInfoFromSeller(params) {
|
|
@@ -15,9 +15,13 @@ declare function createSeatInfoSyncIn(params: {
|
|
|
15
15
|
declare function createStartingPayAction(params: factory.task.pay.IPayActionData, seatInfoSyncIn: surfrock.factory.service.seat.seatInfoSync.ISeatInfoSyncIn): factory.action.trade.pay.IAttributes;
|
|
16
16
|
interface IProcessSeatInfoSyncResult {
|
|
17
17
|
seatInfoSyncIn: factory.action.trade.pay.ISeatInfoSyncIn;
|
|
18
|
-
seatInfoSyncResult: factory.action.trade.pay.ISeatInfoSyncResult;
|
|
18
|
+
seatInfoSyncResult: factory.action.trade.pay.ISeatInfoSyncResult | factory.action.trade.refund.ISeatInfoSyncResultAsError;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
interface IProcessSeatInfoSyncCancelResult {
|
|
21
|
+
seatInfoSyncCancelIn: factory.action.trade.refund.ISeatInfoSyncCancelIn;
|
|
22
|
+
seatInfoSyncCancelResult: factory.action.trade.refund.ISeatInfoSyncCancelResult | factory.action.trade.refund.ISeatInfoSyncResultAsError;
|
|
23
|
+
}
|
|
24
|
+
declare function processSeatInfoSyncResult2payRecipe(params: {
|
|
21
25
|
processSeatInfoSyncResult: IProcessSeatInfoSyncResult;
|
|
22
26
|
project: {
|
|
23
27
|
id: string;
|
|
@@ -27,4 +31,15 @@ declare function processSeatInfoSyncResult2recipe(params: {
|
|
|
27
31
|
typeOf: factory.actionType;
|
|
28
32
|
};
|
|
29
33
|
}): factory.action.trade.pay.IPayMovieTicketRecipe;
|
|
30
|
-
|
|
34
|
+
declare function processSeatInfoSyncResult2refundRecipe(params: {
|
|
35
|
+
processSeatInfoSyncResult?: IProcessSeatInfoSyncResult;
|
|
36
|
+
processSeatInfoSyncCancelResult?: IProcessSeatInfoSyncCancelResult;
|
|
37
|
+
project: {
|
|
38
|
+
id: string;
|
|
39
|
+
};
|
|
40
|
+
action: {
|
|
41
|
+
id: string;
|
|
42
|
+
typeOf: factory.actionType;
|
|
43
|
+
};
|
|
44
|
+
}): factory.action.trade.refund.IRefundMovieTicketRecipe;
|
|
45
|
+
export { createSeatInfoSyncIn, createStartingPayAction, processSeatInfoSyncResult2payRecipe, processSeatInfoSyncResult2refundRecipe };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.processSeatInfoSyncResult2refundRecipe = exports.processSeatInfoSyncResult2payRecipe = exports.createStartingPayAction = exports.createSeatInfoSyncIn = void 0;
|
|
4
4
|
const surfrock = require("@surfrock/sdk");
|
|
5
5
|
const moment = require("moment-timezone");
|
|
6
6
|
const factory = require("../../../factory");
|
|
@@ -91,7 +91,7 @@ function createStartingPayAction(params, seatInfoSyncIn) {
|
|
|
91
91
|
instrument });
|
|
92
92
|
}
|
|
93
93
|
exports.createStartingPayAction = createStartingPayAction;
|
|
94
|
-
function
|
|
94
|
+
function processSeatInfoSyncResult2payRecipe(params) {
|
|
95
95
|
const { processSeatInfoSyncResult, project, action } = params;
|
|
96
96
|
const { seatInfoSyncIn, seatInfoSyncResult } = processSeatInfoSyncResult;
|
|
97
97
|
return {
|
|
@@ -116,4 +116,59 @@ function processSeatInfoSyncResult2recipe(params) {
|
|
|
116
116
|
}]
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
|
-
exports.
|
|
119
|
+
exports.processSeatInfoSyncResult2payRecipe = processSeatInfoSyncResult2payRecipe;
|
|
120
|
+
function processSeatInfoSyncResult2refundRecipe(params) {
|
|
121
|
+
const { processSeatInfoSyncResult, processSeatInfoSyncCancelResult, project, action } = params;
|
|
122
|
+
if (processSeatInfoSyncResult !== undefined) {
|
|
123
|
+
const { seatInfoSyncIn, seatInfoSyncResult } = processSeatInfoSyncResult;
|
|
124
|
+
return {
|
|
125
|
+
project: { id: project.id, typeOf: factory.organizationType.Project },
|
|
126
|
+
typeOf: 'Recipe',
|
|
127
|
+
recipeCategory: factory.recipe.RecipeCategory.refundMovieTicket,
|
|
128
|
+
recipeFor: { id: action.id, typeOf: action.typeOf },
|
|
129
|
+
step: [{
|
|
130
|
+
typeOf: 'HowToSection',
|
|
131
|
+
itemListElement: [
|
|
132
|
+
{
|
|
133
|
+
typeOf: 'HowToStep',
|
|
134
|
+
identifier: factory.recipe.StepIdentifier.seatInfoSync,
|
|
135
|
+
itemListElement: [{
|
|
136
|
+
typeOf: 'HowToDirection',
|
|
137
|
+
beforeMedia: seatInfoSyncIn,
|
|
138
|
+
afterMedia: seatInfoSyncResult
|
|
139
|
+
// text: 'entryTran'
|
|
140
|
+
}]
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
}]
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
else if (processSeatInfoSyncCancelResult !== undefined) {
|
|
147
|
+
const { seatInfoSyncCancelIn, seatInfoSyncCancelResult } = processSeatInfoSyncCancelResult;
|
|
148
|
+
return {
|
|
149
|
+
project: { id: project.id, typeOf: factory.organizationType.Project },
|
|
150
|
+
typeOf: 'Recipe',
|
|
151
|
+
recipeCategory: factory.recipe.RecipeCategory.refundMovieTicket,
|
|
152
|
+
recipeFor: { id: action.id, typeOf: action.typeOf },
|
|
153
|
+
step: [{
|
|
154
|
+
typeOf: 'HowToSection',
|
|
155
|
+
itemListElement: [
|
|
156
|
+
{
|
|
157
|
+
typeOf: 'HowToStep',
|
|
158
|
+
identifier: factory.recipe.StepIdentifier.seatInfoSyncCancel,
|
|
159
|
+
itemListElement: [{
|
|
160
|
+
typeOf: 'HowToDirection',
|
|
161
|
+
beforeMedia: seatInfoSyncCancelIn,
|
|
162
|
+
afterMedia: seatInfoSyncCancelResult
|
|
163
|
+
// text: 'entryTran'
|
|
164
|
+
}]
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
}]
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
throw new factory.errors.ArgumentNull('', 'processSeatInfoSyncResult or processSeatInfoSyncCancelResult required');
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
exports.processSeatInfoSyncResult2refundRecipe = processSeatInfoSyncResult2refundRecipe;
|
|
@@ -29,6 +29,7 @@ interface IPayOperationRepos {
|
|
|
29
29
|
type IPayOperation<T> = (repos: IPayOperationRepos) => Promise<T>;
|
|
30
30
|
interface IRefundOperationRepos {
|
|
31
31
|
action: ActionRepo;
|
|
32
|
+
actionRecipe: ActionRecipeRepo;
|
|
32
33
|
accountingReport: AccountingReportRepo;
|
|
33
34
|
paymentService: PaymentServiceRepo;
|
|
34
35
|
task: TaskRepo;
|
|
@@ -72,6 +73,7 @@ declare function authorize(params: factory.assetTransaction.pay.IStartParamsWith
|
|
|
72
73
|
}) => Promise<IAuthorizeResult>;
|
|
73
74
|
declare function voidTransaction(params: factory.task.voidPayment.IData): (repos: {
|
|
74
75
|
action: ActionRepo;
|
|
76
|
+
actionRecipe: ActionRecipeRepo;
|
|
75
77
|
accountingReport: AccountingReportRepo;
|
|
76
78
|
paymentService: PaymentServiceRepo;
|
|
77
79
|
task: TaskRepo;
|
|
@@ -277,7 +277,7 @@ function payMovieTicket(params) {
|
|
|
277
277
|
}
|
|
278
278
|
// add recipe(2024-06-03~)
|
|
279
279
|
if (settings_1.USE_EXPERIMENTAL_FEATURE) {
|
|
280
|
-
yield repos.actionRecipe.saveOne((0, factory_1.
|
|
280
|
+
yield repos.actionRecipe.saveOne((0, factory_1.processSeatInfoSyncResult2payRecipe)({
|
|
281
281
|
processSeatInfoSyncResult: { seatInfoSyncIn, seatInfoSyncResult },
|
|
282
282
|
project: { id: params.project.id },
|
|
283
283
|
action: { id: action.id, typeOf: action.typeOf }
|
|
@@ -493,6 +493,14 @@ function refundMovieTicket(params) {
|
|
|
493
493
|
action = (yield repos.action.giveUpWithObject({ typeOf: action.typeOf, id: action.id, error: seatInfoSyncResultAsError }));
|
|
494
494
|
}
|
|
495
495
|
else {
|
|
496
|
+
// add recipe(2024-06-04~)
|
|
497
|
+
if (settings_1.USE_EXPERIMENTAL_FEATURE) {
|
|
498
|
+
yield repos.actionRecipe.saveOne((0, factory_1.processSeatInfoSyncResult2refundRecipe)(Object.assign(Object.assign({ project: { id: params.project.id }, action: { id: action.id, typeOf: action.typeOf } }, (seatInfoSyncIn !== undefined && seatInfoSyncResult !== undefined)
|
|
499
|
+
? { processSeatInfoSyncResult: { seatInfoSyncIn, seatInfoSyncResult } }
|
|
500
|
+
: undefined), (seatInfoSyncCancelIn !== undefined && seatInfoSyncCancelResult !== undefined)
|
|
501
|
+
? { processSeatInfoSyncCancelResult: { seatInfoSyncCancelIn, seatInfoSyncCancelResult } }
|
|
502
|
+
: undefined)));
|
|
503
|
+
}
|
|
496
504
|
const actionResult = Object.assign(Object.assign({}, (seatInfoSyncResult !== undefined) ? { seatInfoSyncResult } : undefined), (seatInfoSyncCancelResult !== undefined) ? { seatInfoSyncCancelResult } : undefined);
|
|
497
505
|
action = (yield repos.action.complete({ typeOf: action.typeOf, id: action.id, result: actionResult }));
|
|
498
506
|
}
|
|
@@ -44,6 +44,7 @@ export declare function pay(params: factory.task.pay.IData & {
|
|
|
44
44
|
}) => Promise<void>;
|
|
45
45
|
export declare function voidPayment(params: factory.task.voidPayment.IData): (repos: {
|
|
46
46
|
action: ActionRepo;
|
|
47
|
+
actionRecipe: ActionRecipeRepo;
|
|
47
48
|
accountingReport: AccountingReportRepo;
|
|
48
49
|
paymentAccepted: PaymentAcceptedRepo;
|
|
49
50
|
paymentService: PaymentServiceRepo;
|
|
@@ -61,6 +62,7 @@ export declare function refund(params: factory.task.refund.IData & {
|
|
|
61
62
|
};
|
|
62
63
|
}): (repos: {
|
|
63
64
|
action: ActionRepo;
|
|
65
|
+
actionRecipe: ActionRecipeRepo;
|
|
64
66
|
accountingReport: AccountingReportRepo;
|
|
65
67
|
paymentAccepted: PaymentAcceptedRepo;
|
|
66
68
|
paymentService: PaymentServiceRepo;
|
|
@@ -13,6 +13,7 @@ exports.call = void 0;
|
|
|
13
13
|
const factory = require("../../factory");
|
|
14
14
|
const accountingReport_1 = require("../../repo/accountingReport");
|
|
15
15
|
const action_1 = require("../../repo/action");
|
|
16
|
+
const actionRecipe_1 = require("../../repo/actionRecipe");
|
|
16
17
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
17
18
|
const paymentService_1 = require("../../repo/paymentService");
|
|
18
19
|
const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
|
|
@@ -41,6 +42,7 @@ function call(params) {
|
|
|
41
42
|
yield PaymentService.refund(data)({
|
|
42
43
|
accountingReport: new accountingReport_1.MongoRepository(settings.connection),
|
|
43
44
|
action: new action_1.MongoRepository(settings.connection),
|
|
45
|
+
actionRecipe: new actionRecipe_1.ActionRecipeRepo(settings.connection),
|
|
44
46
|
paymentAccepted: new sellerPaymentAccepted_1.MongoRepository(settings.connection),
|
|
45
47
|
paymentService: new paymentService_1.MongoRepository(settings.connection),
|
|
46
48
|
paymentServiceProvider: new paymentServiceProvider_1.MongoRepository(settings.connection),
|
|
@@ -12,10 +12,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.call = void 0;
|
|
13
13
|
const accountingReport_1 = require("../../repo/accountingReport");
|
|
14
14
|
const action_1 = require("../../repo/action");
|
|
15
|
+
const actionRecipe_1 = require("../../repo/actionRecipe");
|
|
15
16
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
16
17
|
const paymentService_1 = require("../../repo/paymentService");
|
|
17
18
|
const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
|
|
18
|
-
// import { MongoRepository as ProjectRepo } from '../../repo/project';
|
|
19
19
|
const sellerPaymentAccepted_1 = require("../../repo/sellerPaymentAccepted");
|
|
20
20
|
const task_1 = require("../../repo/task");
|
|
21
21
|
const transaction_1 = require("../../repo/transaction");
|
|
@@ -28,11 +28,11 @@ function call(data) {
|
|
|
28
28
|
yield AnyPaymentService.voidPayTransaction(data)({
|
|
29
29
|
accountingReport: new accountingReport_1.MongoRepository(settings.connection),
|
|
30
30
|
action: new action_1.MongoRepository(settings.connection),
|
|
31
|
+
actionRecipe: new actionRecipe_1.ActionRecipeRepo(settings.connection),
|
|
31
32
|
assetTransaction: new assetTransaction_1.MongoRepository(settings.connection),
|
|
32
33
|
paymentAccepted: new sellerPaymentAccepted_1.MongoRepository(settings.connection),
|
|
33
34
|
paymentService: new paymentService_1.MongoRepository(settings.connection),
|
|
34
35
|
paymentServiceProvider: new paymentServiceProvider_1.MongoRepository(settings.connection),
|
|
35
|
-
// project: new ProjectRepo(settings.connection),
|
|
36
36
|
task: new task_1.MongoRepository(settings.connection),
|
|
37
37
|
transaction: new transaction_1.MongoRepository(settings.connection)
|
|
38
38
|
});
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.call = void 0;
|
|
13
13
|
const accountingReport_1 = require("../../repo/accountingReport");
|
|
14
14
|
const action_1 = require("../../repo/action");
|
|
15
|
+
const actionRecipe_1 = require("../../repo/actionRecipe");
|
|
15
16
|
const paymentService_1 = require("../../repo/paymentService");
|
|
16
17
|
const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
|
|
17
18
|
const product_1 = require("../../repo/product");
|
|
@@ -27,6 +28,7 @@ function call(data) {
|
|
|
27
28
|
yield PaymentService.voidPayment(data)({
|
|
28
29
|
accountingReport: new accountingReport_1.MongoRepository(settings.connection),
|
|
29
30
|
action: new action_1.MongoRepository(settings.connection),
|
|
31
|
+
actionRecipe: new actionRecipe_1.ActionRecipeRepo(settings.connection),
|
|
30
32
|
paymentAccepted: new sellerPaymentAccepted_1.MongoRepository(settings.connection),
|
|
31
33
|
paymentService: new paymentService_1.MongoRepository(settings.connection),
|
|
32
34
|
paymentServiceProvider: new paymentServiceProvider_1.MongoRepository(settings.connection),
|
package/package.json
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@aws-sdk/credential-providers": "3.433.0",
|
|
13
|
-
"@chevre/factory": "4.374.0-alpha.
|
|
14
|
-
"@cinerino/sdk": "7.
|
|
13
|
+
"@chevre/factory": "4.374.0-alpha.3",
|
|
14
|
+
"@cinerino/sdk": "7.1.0",
|
|
15
15
|
"@motionpicture/coa-service": "9.4.0",
|
|
16
16
|
"@motionpicture/gmo-service": "5.3.0",
|
|
17
17
|
"@sendgrid/mail": "6.4.0",
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"postversion": "git push origin --tags",
|
|
111
111
|
"prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
|
|
112
112
|
},
|
|
113
|
-
"version": "21.33.0-alpha.
|
|
113
|
+
"version": "21.33.0-alpha.24"
|
|
114
114
|
}
|