@chevre/domain 21.34.0-alpha.16 → 21.34.0-alpha.18
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/example/src/chevre/migrateCheckMovieTicketRecipes.ts +4 -4
- package/lib/chevre/service/assetTransaction/pay/factory.js +11 -4
- package/lib/chevre/service/assetTransaction/pay.d.ts +0 -16
- package/lib/chevre/service/assetTransaction/pay.js +32 -64
- package/lib/chevre/service/assetTransaction/refund/potentialActions.d.ts +1 -0
- package/lib/chevre/service/assetTransaction/refund/potentialActions.js +10 -8
- package/lib/chevre/service/assetTransaction/refund.js +10 -0
- package/lib/chevre/service/payment/any/onRefund.js +10 -8
- package/lib/chevre/service/payment/creditCard/authorize.d.ts +1 -1
- package/lib/chevre/service/{assetTransaction/pay/potentialActions → payment/factory}/createPayObjectServiceOutput.d.ts +2 -2
- package/lib/chevre/service/{assetTransaction/pay/potentialActions → payment/factory}/createPayObjectServiceOutput.js +2 -2
- package/lib/chevre/service/payment/factory.d.ts +13 -0
- package/lib/chevre/service/{assetTransaction/pay/potentialActions.js → payment/factory.js} +30 -25
- package/lib/chevre/service/payment/movieTicket/authorize.js +12 -1
- package/lib/chevre/service/payment/movieTicket/factory.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/factory.js +5 -5
- package/lib/chevre/service/payment.d.ts +16 -0
- package/lib/chevre/service/payment.js +82 -28
- package/package.json +3 -3
- package/lib/chevre/service/assetTransaction/pay/potentialActions.d.ts +0 -10
|
@@ -15,9 +15,9 @@ async function main() {
|
|
|
15
15
|
typeOf: { $eq: chevre.factory.actionType.CheckAction },
|
|
16
16
|
actionStatus: { $eq: chevre.factory.actionStatusType.CompletedActionStatus },
|
|
17
17
|
startDate: {
|
|
18
|
-
$lte: moment()
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
// $lte: moment()
|
|
19
|
+
// // tslint:disable-next-line:no-magic-numbers
|
|
20
|
+
// .add(-178, 'days'),
|
|
21
21
|
$gte: moment()
|
|
22
22
|
// tslint:disable-next-line:no-magic-numbers
|
|
23
23
|
.add(-365, 'days')
|
|
@@ -50,7 +50,7 @@ async function main() {
|
|
|
50
50
|
if (actionRecipe !== null) {
|
|
51
51
|
console.log(
|
|
52
52
|
'actionRecipe already exists. step:',
|
|
53
|
-
actionRecipe.step.length, checkAction.project.id, checkAction.id, checkAction.startDate, i);
|
|
53
|
+
actionRecipe.step.length, checkAction.project.id, checkAction.id, checkAction.startDate, i, updateCount, saveRecipeCount);
|
|
54
54
|
|
|
55
55
|
// optimize action.result
|
|
56
56
|
if (purchaseNumberAuthInByCheckAction !== undefined || purchaseNumberAuthResultByCheckAction !== undefined) {
|
|
@@ -19,6 +19,7 @@ function createStartParams(params) {
|
|
|
19
19
|
throw new factory.errors.ArgumentNull('object.paymentMethod.identifier');
|
|
20
20
|
}
|
|
21
21
|
let totalPaymentDue;
|
|
22
|
+
let accountId = (_c = params.object.paymentMethod) === null || _c === void 0 ? void 0 : _c.accountId;
|
|
22
23
|
switch (params.paymentServiceType) {
|
|
23
24
|
case factory.service.paymentService.PaymentServiceType.FaceToFace:
|
|
24
25
|
// 対面決済ではとりあえず問答無用にJPY
|
|
@@ -34,22 +35,27 @@ function createStartParams(params) {
|
|
|
34
35
|
currency: factory.priceCurrency.JPY,
|
|
35
36
|
value: params.amount
|
|
36
37
|
};
|
|
38
|
+
accountId = ''; // 強制的に空文字化(2024-06-14~)
|
|
37
39
|
break;
|
|
38
40
|
case factory.service.paymentService.PaymentServiceType.MovieTicket:
|
|
39
|
-
const specifiedMovieTickets = (
|
|
41
|
+
const specifiedMovieTickets = (_d = params.object.paymentMethod) === null || _d === void 0 ? void 0 : _d.movieTickets;
|
|
40
42
|
totalPaymentDue = {
|
|
41
43
|
typeOf: 'MonetaryAmount',
|
|
42
44
|
currency: factory.unitCode.C62,
|
|
43
45
|
value: (Array.isArray(specifiedMovieTickets)) ? specifiedMovieTickets.length : 0
|
|
44
46
|
};
|
|
45
47
|
// MovieTicketIFの決済取引において最大同時着券数を設定可能にする(2023-03-27~)
|
|
46
|
-
const totalPaymentDueMaxValue = (
|
|
48
|
+
const totalPaymentDueMaxValue = (_g = (_f = (_e = params.paymentService) === null || _e === void 0 ? void 0 : _e.availableChannel) === null || _f === void 0 ? void 0 : _f.totalPaymentDue) === null || _g === void 0 ? void 0 : _g.maxValue;
|
|
47
49
|
const totalPaymentDueValue = totalPaymentDue.value;
|
|
48
50
|
if (typeof totalPaymentDueValue === 'number' && typeof totalPaymentDueMaxValue === 'number') {
|
|
49
51
|
if (totalPaymentDueValue > totalPaymentDueMaxValue) {
|
|
50
52
|
throw new factory.errors.Argument('paymentMethod.movieTickets', `Number of movieTickets must be less than or equal to ${totalPaymentDueMaxValue}`);
|
|
51
53
|
}
|
|
52
54
|
}
|
|
55
|
+
// 強制的にidentifierで上書き(2024-06-14~)
|
|
56
|
+
accountId = (Array.isArray(specifiedMovieTickets) && specifiedMovieTickets.length > 0)
|
|
57
|
+
? specifiedMovieTickets[0].identifier // 決済カードidentifierは1つのみ許可の前提
|
|
58
|
+
: '';
|
|
53
59
|
break;
|
|
54
60
|
default:
|
|
55
61
|
// no op
|
|
@@ -57,7 +63,6 @@ function createStartParams(params) {
|
|
|
57
63
|
const informPaymentParams = createInformPaymentParams({
|
|
58
64
|
paymentService: params.paymentService
|
|
59
65
|
});
|
|
60
|
-
const accountId = (_g = params.object.paymentMethod) === null || _g === void 0 ? void 0 : _g.accountId;
|
|
61
66
|
// currencyはデフォルトでJPY
|
|
62
67
|
let paymentMethodCurrency = factory.priceCurrency.JPY;
|
|
63
68
|
if (params.paymentServiceType === factory.service.paymentService.PaymentServiceType.PaymentCard) {
|
|
@@ -84,7 +89,7 @@ function createStartParams(params) {
|
|
|
84
89
|
currency: paymentMethodCurrency,
|
|
85
90
|
value: params.amount
|
|
86
91
|
};
|
|
87
|
-
const paymentMethod = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ additionalProperty: (Array.isArray((_p = params.object.paymentMethod) === null || _p === void 0 ? void 0 : _p.additionalProperty))
|
|
92
|
+
const paymentMethod = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ additionalProperty: (Array.isArray((_p = params.object.paymentMethod) === null || _p === void 0 ? void 0 : _p.additionalProperty))
|
|
88
93
|
? (_q = params.object.paymentMethod) === null || _q === void 0 ? void 0 : _q.additionalProperty
|
|
89
94
|
: [], name: (typeof ((_r = params.object.paymentMethod) === null || _r === void 0 ? void 0 : _r.name) === 'string')
|
|
90
95
|
? params.object.paymentMethod.name
|
|
@@ -98,6 +103,8 @@ function createStartParams(params) {
|
|
|
98
103
|
? { creditCard: (_x = params.object.paymentMethod) === null || _x === void 0 ? void 0 : _x.creditCard }
|
|
99
104
|
: undefined), (Array.isArray((_y = params.object.paymentMethod) === null || _y === void 0 ? void 0 : _y.movieTickets))
|
|
100
105
|
? { movieTickets: (_z = params.object.paymentMethod) === null || _z === void 0 ? void 0 : _z.movieTickets }
|
|
106
|
+
: undefined), (params.paymentServiceType === factory.service.paymentService.PaymentServiceType.CreditCard)
|
|
107
|
+
? { paymentMethodId: params.transactionNumber } // 必要ないはずだが互換性維持対応(2024-06-14~)
|
|
101
108
|
: undefined);
|
|
102
109
|
const object = {
|
|
103
110
|
// パラメータから必要なもののみ取り込む
|
|
@@ -16,7 +16,6 @@ import type { MongoRepository as PaymentAcceptedRepo } from '../../repo/sellerPa
|
|
|
16
16
|
import type { MongoRepository as TaskRepo } from '../../repo/task';
|
|
17
17
|
import * as CreditCardPayment from '../payment/creditCard';
|
|
18
18
|
import * as MovieTicketPayment from '../payment/movieTicket';
|
|
19
|
-
import { IAcceptedOfferMovieTicketUsed } from './pay/potentialActions';
|
|
20
19
|
export interface IStartOperationRepos {
|
|
21
20
|
accountingReport: AccountingReportRepo;
|
|
22
21
|
action: ActionRepo;
|
|
@@ -130,21 +129,6 @@ export declare function start(params: factory.assetTransaction.pay.IStartParamsW
|
|
|
130
129
|
export declare function confirm(params: factory.assetTransaction.pay.IConfirmParams & {
|
|
131
130
|
options: {};
|
|
132
131
|
}): IConfirmOperation<void>;
|
|
133
|
-
export declare function fixOrderAsPurpose(params: {
|
|
134
|
-
potentialActions: {
|
|
135
|
-
pay: {
|
|
136
|
-
purpose: {
|
|
137
|
-
confirmationNumber: string;
|
|
138
|
-
orderNumber: string;
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
}, transaction: factory.assetTransaction.pay.ITransaction): (repos: {
|
|
143
|
-
acceptedOffer: AcceptedOfferRepo;
|
|
144
|
-
order: OrderRepo;
|
|
145
|
-
}) => Promise<Pick<factory.order.IOrder, "typeOf" | "confirmationNumber" | "orderNumber"> & {
|
|
146
|
-
acceptedOffersMovieTicketUsed: IAcceptedOfferMovieTicketUsed[];
|
|
147
|
-
}>;
|
|
148
132
|
/**
|
|
149
133
|
* 取引中止
|
|
150
134
|
*/
|
|
@@ -9,8 +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.
|
|
13
|
-
const createDebug = require("debug");
|
|
12
|
+
exports.searchGMOTrade = exports.exportTasksById = exports.cancel = exports.confirm = exports.start = exports.check = exports.invalidatePaymentUrl = exports.publishPaymentUrl = void 0;
|
|
14
13
|
const moment = require("moment");
|
|
15
14
|
const factory = require("../../factory");
|
|
16
15
|
const CreditCardPayment = require("../payment/creditCard");
|
|
@@ -18,7 +17,6 @@ const MovieTicketPayment = require("../payment/movieTicket");
|
|
|
18
17
|
const PaymentCardPayment = require("../payment/paymentCard");
|
|
19
18
|
const validation_1 = require("./pay/account/validation");
|
|
20
19
|
const factory_1 = require("./pay/factory");
|
|
21
|
-
const debug = createDebug('chevre-domain:service:assetTransaction');
|
|
22
20
|
function publishPaymentUrlResult2recipe(params) {
|
|
23
21
|
const { project, result } = params;
|
|
24
22
|
return {
|
|
@@ -217,10 +215,10 @@ function start(params, options) {
|
|
|
217
215
|
transaction = yield processAuthorizeAccount(params, transaction, String(paymentService === null || paymentService === void 0 ? void 0 : paymentService.id))(repos);
|
|
218
216
|
break;
|
|
219
217
|
case factory.service.paymentService.PaymentServiceType.CreditCard:
|
|
220
|
-
transaction =
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
218
|
+
// transaction =
|
|
219
|
+
yield processAuthorizeCreditCard(params, transaction, String(paymentService === null || paymentService === void 0 ? void 0 : paymentService.id), Object.assign({ executor: (typeof ((_c = options.executor) === null || _c === void 0 ? void 0 : _c.id) === 'string') ? { id: options.executor.id } : {} }, (options.pendingPaymentAgencyTransaction !== undefined)
|
|
220
|
+
? { pendingPaymentAgencyTransaction: options.pendingPaymentAgencyTransaction }
|
|
221
|
+
: undefined))(repos);
|
|
224
222
|
break;
|
|
225
223
|
case factory.service.paymentService.PaymentServiceType.MovieTicket:
|
|
226
224
|
transaction =
|
|
@@ -379,31 +377,42 @@ function processAuthorizeAccount(params, transaction, paymentServiceId) {
|
|
|
379
377
|
function processAuthorizeCreditCard(params, transaction, paymentServiceId, options) {
|
|
380
378
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
381
379
|
var _a;
|
|
382
|
-
|
|
380
|
+
yield CreditCardPayment.authorize(Object.assign(Object.assign({}, params), { id: transaction.id }), paymentServiceId, Object.assign({ processPublishPaymentUrl: false, executor: (typeof ((_a = options.executor) === null || _a === void 0 ? void 0 : _a.id) === 'string') ? { id: options.executor.id } : {} }, (options.pendingPaymentAgencyTransaction !== undefined)
|
|
383
381
|
? { pendingPaymentAgencyTransaction: options.pendingPaymentAgencyTransaction }
|
|
384
382
|
: undefined))(repos);
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
383
|
+
// ↓discontinue(2024-06-14~)
|
|
384
|
+
// return saveAuthorizeResult({
|
|
385
|
+
// id: transaction.id,
|
|
386
|
+
// update: {
|
|
387
|
+
// 'object.accountId': authorizeResult.accountId,
|
|
388
|
+
// 'object.paymentMethod.accountId': authorizeResult.accountId,
|
|
389
|
+
// 'object.paymentMethod.paymentMethodId': authorizeResult.paymentMethodId,
|
|
390
|
+
// 'object.entryTranArgs': authorizeResult.entryTranArgs,
|
|
391
|
+
// 'object.entryTranResult': authorizeResult.entryTranResult,
|
|
392
|
+
// 'object.execTranArgs': authorizeResult.execTranArgs,
|
|
393
|
+
// 'object.execTranResult': authorizeResult.execTranResult,
|
|
394
|
+
// ...(authorizeResult.secureTran2Result !== undefined)
|
|
395
|
+
// ? { 'object.secureTran2Result': authorizeResult.secureTran2Result }
|
|
396
|
+
// : undefined
|
|
397
|
+
// }
|
|
398
|
+
// })(repos);
|
|
391
399
|
});
|
|
392
400
|
}
|
|
393
401
|
function processAuthorizeMovieTicket(params, transaction, paymentServiceId, useCheckByIdentifierIfNotYet, options) {
|
|
394
402
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
395
|
-
const {
|
|
396
|
-
const payActionInObject = {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
};
|
|
403
|
+
const { accountsReceivablesByServiceType } = yield MovieTicketPayment.authorize(params, transaction, paymentServiceId, useCheckByIdentifierIfNotYet, options)(repos);
|
|
404
|
+
// const payActionInObject: factory.assetTransaction.pay.IPayActionInObject = {
|
|
405
|
+
// actionStatus: payAction.actionStatus,
|
|
406
|
+
// id: payAction.id,
|
|
407
|
+
// typeOf: payAction.typeOf
|
|
408
|
+
// };
|
|
401
409
|
return saveAuthorizeResult({
|
|
402
410
|
id: transaction.id,
|
|
403
411
|
update: {
|
|
404
|
-
|
|
405
|
-
'object.
|
|
406
|
-
'object.
|
|
412
|
+
// ↓discontinue(2024-06-14~)
|
|
413
|
+
// 'object.accountId': accountId,
|
|
414
|
+
// 'object.paymentMethod.accountId': accountId,
|
|
415
|
+
// 'object.payAction': payActionInObject, // 最適化(2024-04-09~)
|
|
407
416
|
// 認証レスポンスより計上金額を保管(2023-05-15~)
|
|
408
417
|
'object.accountsReceivablesByServiceType': accountsReceivablesByServiceType
|
|
409
418
|
}
|
|
@@ -475,47 +484,6 @@ function confirm(params) {
|
|
|
475
484
|
});
|
|
476
485
|
}
|
|
477
486
|
exports.confirm = confirm;
|
|
478
|
-
function fixOrderAsPurpose(params, transaction) {
|
|
479
|
-
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
480
|
-
var _a;
|
|
481
|
-
const payPurposeConfirmationNumber = params.potentialActions.pay.purpose.confirmationNumber;
|
|
482
|
-
const payPurposeOrderNumber = (_a = params.potentialActions.pay.purpose) === null || _a === void 0 ? void 0 : _a.orderNumber;
|
|
483
|
-
const ordersWithoutAcceptedOffers = yield repos.order.search({
|
|
484
|
-
limit: 1,
|
|
485
|
-
page: 1,
|
|
486
|
-
project: { id: { $eq: transaction.project.id } },
|
|
487
|
-
confirmationNumbers: [payPurposeConfirmationNumber],
|
|
488
|
-
orderNumbers: [payPurposeOrderNumber]
|
|
489
|
-
}, { typeOf: 1, confirmationNumber: 1, orderNumber: 1 });
|
|
490
|
-
const orderWithoutAcceptedOffers = ordersWithoutAcceptedOffers.shift();
|
|
491
|
-
if (orderWithoutAcceptedOffers === undefined) {
|
|
492
|
-
throw new factory.errors.NotFound('Order as purpose');
|
|
493
|
-
}
|
|
494
|
-
// 必要なオファー検索のみ実行する(2024-01-18~)
|
|
495
|
-
let acceptedOffersMovieTicketUsed = [];
|
|
496
|
-
const movieTickets = transaction.object.paymentMethod.movieTickets;
|
|
497
|
-
if (Array.isArray(movieTickets) && movieTickets.length > 0) {
|
|
498
|
-
const reservationForId = movieTickets[0].serviceOutput.reservationFor.id; // イベントIDは決済取引ごとにひとつのみ許可なので、これで問題ない
|
|
499
|
-
const seatNumbers = movieTickets.map(({ serviceOutput }) => serviceOutput.reservedTicket.ticketedSeat.seatNumber);
|
|
500
|
-
debug('fixOrderAsPurpose at confirming payTransaction: searching acceptedOffersMovieTicketUsed...', reservationForId, seatNumbers);
|
|
501
|
-
acceptedOffersMovieTicketUsed = (yield repos.acceptedOffer.searchAcceptedOffersByOrderNumber({
|
|
502
|
-
orderNumber: { $eq: orderWithoutAcceptedOffers.orderNumber },
|
|
503
|
-
project: { id: { $eq: transaction.project.id } },
|
|
504
|
-
acceptedOffers: {
|
|
505
|
-
itemOffered: {
|
|
506
|
-
typeOf: { $in: [factory.reservationType.EventReservation] },
|
|
507
|
-
// movieTicketsに結合されたイベントID,座席コードで絞る
|
|
508
|
-
reservationFor: { id: { $in: [reservationForId] } },
|
|
509
|
-
reservedTicket: { ticketedSeat: { seatNumber: { $in: seatNumbers } } }
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
}, ['itemOffered', 'priceSpecification']));
|
|
513
|
-
debug('fixOrderAsPurpose at confirming payTransaction:', acceptedOffersMovieTicketUsed.length, 'acceptedOffersMovieTicketUsed found', acceptedOffersMovieTicketUsed);
|
|
514
|
-
}
|
|
515
|
-
return Object.assign(Object.assign({}, orderWithoutAcceptedOffers), { acceptedOffersMovieTicketUsed });
|
|
516
|
-
});
|
|
517
|
-
}
|
|
518
|
-
exports.fixOrderAsPurpose = fixOrderAsPurpose;
|
|
519
487
|
/**
|
|
520
488
|
* 取引中止
|
|
521
489
|
*/
|
|
@@ -4,5 +4,6 @@ import * as factory from '../../../factory';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare function createPotentialActions(params: {
|
|
6
6
|
transaction: factory.assetTransaction.ITransaction<factory.assetTransactionType.Refund>;
|
|
7
|
+
seller: factory.assetTransaction.pay.IRecipient;
|
|
7
8
|
potentialActions?: factory.assetTransaction.refund.IPotentialActionsParams;
|
|
8
9
|
}): Promise<factory.assetTransaction.IPotentialActions<factory.assetTransactionType.Refund>>;
|
|
@@ -13,18 +13,20 @@ exports.createPotentialActions = void 0;
|
|
|
13
13
|
const factory = require("../../../factory");
|
|
14
14
|
function createReundActions(params) {
|
|
15
15
|
var _a, _b, _c, _d;
|
|
16
|
-
const transaction = params
|
|
16
|
+
const { transaction, seller } = params;
|
|
17
17
|
const refundActions = [];
|
|
18
18
|
const informPaymentActions = createInformPaymentActions(params);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
// 決済取引より取得した販売者情報によって、IParticipantAsSellerに統一(2024-06-13~)
|
|
20
|
+
// const agent: factory.action.trade.refund.IAgent = {
|
|
21
|
+
// id: params.transaction.agent.id,
|
|
22
|
+
// name: String(params.transaction.agent.name),
|
|
23
|
+
// typeOf: params.transaction.agent.typeOf
|
|
24
|
+
// };
|
|
25
|
+
const agent = Object.assign({ id: seller.id, typeOf: seller.typeOf }, (typeof seller.name === 'string') ? { name: seller.name } : undefined);
|
|
26
|
+
refundActions.push(Object.assign({ project: transaction.project, typeOf: factory.actionType.RefundAction, object: [transaction.object], agent, potentialActions: {
|
|
25
27
|
add2report: true,
|
|
26
28
|
informPayment: informPaymentActions
|
|
27
|
-
}, recipient:
|
|
29
|
+
}, recipient: transaction.recipient }, (((_b = (_a = params.potentialActions) === null || _a === void 0 ? void 0 : _a.refund) === null || _b === void 0 ? void 0 : _b.purpose) !== undefined)
|
|
28
30
|
? { purpose: (_d = (_c = params.potentialActions) === null || _c === void 0 ? void 0 : _c.refund) === null || _d === void 0 ? void 0 : _d.purpose }
|
|
29
31
|
: { purpose: { typeOf: transaction.typeOf, transactionNumber: transaction.transactionNumber, id: transaction.id } }));
|
|
30
32
|
return refundActions;
|
|
@@ -134,8 +134,18 @@ function confirm(params) {
|
|
|
134
134
|
else {
|
|
135
135
|
throw new factory.errors.ArgumentNull('Transaction ID or Transaction Number');
|
|
136
136
|
}
|
|
137
|
+
const payTransaction = (yield repos.assetTransaction.search({
|
|
138
|
+
limit: 1,
|
|
139
|
+
page: 1,
|
|
140
|
+
typeOf: factory.assetTransactionType.Pay,
|
|
141
|
+
transactionNumber: { $eq: transaction.object.paymentMethodId }
|
|
142
|
+
}, ['recipient'], [])).shift();
|
|
143
|
+
if (payTransaction === undefined) {
|
|
144
|
+
throw new factory.errors.NotFound(factory.assetTransactionType.Pay);
|
|
145
|
+
}
|
|
137
146
|
const potentialActions = yield (0, potentialActions_1.createPotentialActions)({
|
|
138
147
|
transaction: transaction,
|
|
148
|
+
seller: payTransaction.recipient,
|
|
139
149
|
potentialActions: params.potentialActions
|
|
140
150
|
});
|
|
141
151
|
yield repos.assetTransaction.confirm({
|
|
@@ -42,8 +42,10 @@ function onRefund(refundAction) {
|
|
|
42
42
|
const refundFee = (_b = refundAction.object[0]) === null || _b === void 0 ? void 0 : _b.refundFee;
|
|
43
43
|
if (typeof refundFee === 'number' && refundFee > 0) {
|
|
44
44
|
// purpose.typeOf:PlaceOrderは外部決済URL無効化における返金アクションのみなので、手数料決済から除外してよい(2024-03-19~)
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
// purpose.typeOf:Orderは決済カード承認時着券の取消なので、手数料決済から除外してよい
|
|
46
|
+
// 手数料決済は注文返品による返金アクションからしか発生しないはず(2024-06-13~)
|
|
47
|
+
if (refundAction.purpose.typeOf === factory.actionType.ReturnAction) {
|
|
48
|
+
const payReturnFeeObject = refundAction.object.map((o) => {
|
|
47
49
|
return {
|
|
48
50
|
typeOf: o.typeOf,
|
|
49
51
|
id: o.id,
|
|
@@ -61,12 +63,12 @@ function onRefund(refundAction) {
|
|
|
61
63
|
}
|
|
62
64
|
};
|
|
63
65
|
});
|
|
64
|
-
const
|
|
65
|
-
project: refundAction.project,
|
|
66
|
+
const payReturnFeeAction = {
|
|
67
|
+
// project: refundAction.project,
|
|
66
68
|
typeOf: factory.actionType.PayAction,
|
|
67
|
-
object:
|
|
68
|
-
agent: refundAction.project,
|
|
69
|
-
recipient: refundAction.agent,
|
|
69
|
+
object: payReturnFeeObject,
|
|
70
|
+
// agent: refundAction.project,
|
|
71
|
+
// recipient: refundAction.agent, // 返金者は販売者のはず
|
|
70
72
|
purpose: refundAction.purpose,
|
|
71
73
|
potentialActions: {
|
|
72
74
|
add2report: true,
|
|
@@ -81,7 +83,7 @@ function onRefund(refundAction) {
|
|
|
81
83
|
remainingNumberOfTries: 10,
|
|
82
84
|
numberOfTried: 0,
|
|
83
85
|
executionResults: [],
|
|
84
|
-
data:
|
|
86
|
+
data: payReturnFeeAction
|
|
85
87
|
};
|
|
86
88
|
taskAttributes.push(payTask);
|
|
87
89
|
}
|
|
@@ -7,7 +7,7 @@ import { ICreditCardPaymentAgencyTransaction } from './authorize/processAuthoriz
|
|
|
7
7
|
import { ICreditCardPaymentAgencyTransaction3ds } from './authorize/processAuthorizeCreditCard3ds';
|
|
8
8
|
type IPaymentAgencyTransaction = ICreditCardPaymentAgencyTransaction | ICreditCardPaymentAgencyTransaction3ds;
|
|
9
9
|
type IAuthorizeResult = IPaymentAgencyTransaction & {
|
|
10
|
-
accountId:
|
|
10
|
+
accountId: '';
|
|
11
11
|
paymentMethodId: string;
|
|
12
12
|
};
|
|
13
13
|
type IPayTransactionAsAuthorizeInvoiceAction = Pick<factory.assetTransaction.pay.IStartParamsWithoutDetail, 'object' | 'project' | 'recipient' | 'transactionNumber'> & {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as factory from '
|
|
1
|
+
import * as factory from '../../../factory';
|
|
2
2
|
/**
|
|
3
3
|
* PayAction.object.serviceOutputを作成する
|
|
4
4
|
* 決済カード決済の場合のみ、対象予約情報をserviceOutputに持つ決済カード情報として存在する
|
|
5
5
|
*/
|
|
6
6
|
declare function createPayObjectServiceOutput(params: {
|
|
7
|
-
transaction: factory.assetTransaction.ITransaction<factory.assetTransactionType.Pay>;
|
|
7
|
+
transaction: Pick<factory.assetTransaction.ITransaction<factory.assetTransactionType.Pay>, 'object' | 'transactionNumber'>;
|
|
8
8
|
order: {
|
|
9
9
|
acceptedOffersMovieTicketUsed: IAcceptedOfferMovieTicketUsed[];
|
|
10
10
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createPayObjectServiceOutput = void 0;
|
|
4
|
-
const factory = require("
|
|
5
|
-
const settings_1 = require("
|
|
4
|
+
const factory = require("../../../factory");
|
|
5
|
+
const settings_1 = require("../../../settings");
|
|
6
6
|
/**
|
|
7
7
|
* PayAction.object.serviceOutputを作成する
|
|
8
8
|
* 決済カード決済の場合のみ、対象予約情報をserviceOutputに持つ決済カード情報として存在する
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as factory from '../../factory';
|
|
2
|
+
import { IAcceptedOfferMovieTicketUsed } from './factory/createPayObjectServiceOutput';
|
|
3
|
+
/**
|
|
4
|
+
* 注文に対する決済アクションを生成する
|
|
5
|
+
*/
|
|
6
|
+
declare function createPayOrderAction(params: {
|
|
7
|
+
transaction: Pick<factory.assetTransaction.ITransaction<factory.assetTransactionType.Pay>, 'id' | 'object' | 'transactionNumber' | 'typeOf' | 'agent' | 'project' | 'recipient' | 'location'>;
|
|
8
|
+
potentialActions?: factory.assetTransaction.pay.IPotentialActionsParams;
|
|
9
|
+
order: Pick<factory.order.IOrder, 'typeOf' | 'confirmationNumber' | 'orderNumber'> & {
|
|
10
|
+
acceptedOffersMovieTicketUsed: IAcceptedOfferMovieTicketUsed[];
|
|
11
|
+
};
|
|
12
|
+
}): Pick<factory.action.trade.pay.IAttributes, 'agent' | 'instrument' | 'location' | 'object' | 'potentialActions' | 'project' | 'purpose' | 'recipient' | 'typeOf'>;
|
|
13
|
+
export { createPayOrderAction, IAcceptedOfferMovieTicketUsed };
|
|
@@ -1,34 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const factory = require("
|
|
5
|
-
const createPayObjectServiceOutput_1 = require("./
|
|
6
|
-
|
|
3
|
+
exports.createPayOrderAction = void 0;
|
|
4
|
+
const factory = require("../../factory");
|
|
5
|
+
const createPayObjectServiceOutput_1 = require("./factory/createPayObjectServiceOutput");
|
|
6
|
+
/**
|
|
7
|
+
* 注文に対する決済アクションを生成する
|
|
8
|
+
*/
|
|
9
|
+
function createPayOrderAction(params) {
|
|
7
10
|
var _a;
|
|
8
|
-
const payActions = [];
|
|
9
11
|
const payObject = createPayObject(params);
|
|
10
12
|
const informPaymentActions = createInformPaymentActions(params);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
const payPurpose = {
|
|
14
|
+
typeOf: params.order.typeOf,
|
|
15
|
+
confirmationNumber: params.order.confirmationNumber,
|
|
16
|
+
orderNumber: params.order.orderNumber
|
|
17
|
+
};
|
|
18
|
+
const instrument = {
|
|
19
|
+
id: params.transaction.id,
|
|
20
|
+
transactionNumber: params.transaction.transactionNumber,
|
|
21
|
+
typeOf: params.transaction.typeOf
|
|
22
|
+
};
|
|
23
|
+
const recipient = {
|
|
24
|
+
id: params.transaction.recipient.id,
|
|
25
|
+
name: params.transaction.recipient.name,
|
|
26
|
+
typeOf: params.transaction.recipient.typeOf
|
|
27
|
+
};
|
|
28
|
+
return Object.assign({ project: params.transaction.project, typeOf: factory.actionType.PayAction, object: [payObject], agent: params.transaction.project, potentialActions: {
|
|
29
|
+
add2report: true,
|
|
30
|
+
informPayment: informPaymentActions
|
|
31
|
+
}, purpose: payPurpose, recipient,
|
|
32
|
+
instrument }, (typeof ((_a = params.transaction.location) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string')
|
|
33
|
+
? { location: params.transaction.location }
|
|
34
|
+
: undefined);
|
|
30
35
|
}
|
|
31
|
-
exports.
|
|
36
|
+
exports.createPayOrderAction = createPayOrderAction;
|
|
32
37
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
33
38
|
function createPayObject(params) {
|
|
34
39
|
var _a;
|
|
@@ -47,7 +47,18 @@ function authorize(params, transaction, paymentServiceId, useCheckByIdentifierIf
|
|
|
47
47
|
}, typeOf: paymentMethodType }, (typeof accountId === 'string') ? { accountId } : undefined),
|
|
48
48
|
movieTickets: paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.movieTickets
|
|
49
49
|
};
|
|
50
|
-
const
|
|
50
|
+
const instrument = {
|
|
51
|
+
id: transaction.id,
|
|
52
|
+
transactionNumber: transaction.transactionNumber,
|
|
53
|
+
typeOf: transaction.typeOf
|
|
54
|
+
};
|
|
55
|
+
const recipient = {
|
|
56
|
+
id: transaction.recipient.id,
|
|
57
|
+
name: transaction.recipient.name,
|
|
58
|
+
typeOf: transaction.recipient.typeOf
|
|
59
|
+
};
|
|
60
|
+
const payActionAttributes = Object.assign(Object.assign({ project: transaction.project, typeOf: factory.actionType.PayAction, object: [payObject], agent: transaction.project, recipient,
|
|
61
|
+
instrument }, (params.purpose !== undefined)
|
|
51
62
|
? { purpose: params.purpose }
|
|
52
63
|
: { purpose: { typeOf: transaction.typeOf, transactionNumber: transaction.transactionNumber, id: transaction.id } }), (typeof ((_b = options.executor) === null || _b === void 0 ? void 0 : _b.id) === 'string')
|
|
53
64
|
? { sameAs: { id: options.executor.id, typeOf: 'Task' } } // link sameAs(2024-06-04~)
|
|
@@ -12,7 +12,7 @@ declare function createSeatInfoSyncIn(params: {
|
|
|
12
12
|
stCd: string;
|
|
13
13
|
};
|
|
14
14
|
}): surfrock.factory.service.seat.seatInfoSync.ISeatInfoSyncIn;
|
|
15
|
-
declare function createStartingPayAction(params: factory.
|
|
15
|
+
declare function createStartingPayAction(params: factory.action.trade.pay.IAttributes): factory.action.trade.pay.IAttributes;
|
|
16
16
|
interface IProcessPurchaseNumberAuthResult {
|
|
17
17
|
purchaseNumberAuthIn?: factory.action.check.paymentMethod.movieTicket.IPurchaseNumberAuthIn;
|
|
18
18
|
purchaseNumberAuthResult?: factory.action.check.paymentMethod.movieTicket.IPurchaseNumberAuthResult;
|
|
@@ -76,10 +76,10 @@ exports.createSeatInfoSyncIn = createSeatInfoSyncIn;
|
|
|
76
76
|
function createStartingPayAction(params
|
|
77
77
|
// seatInfoSyncIn: surfrock.factory.service.seat.seatInfoSync.ISeatInfoSyncIn
|
|
78
78
|
) {
|
|
79
|
-
const instrument = {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
};
|
|
79
|
+
// const instrument: factory.action.trade.pay.IInstrument = {
|
|
80
|
+
// typeOf: factory.service.paymentService.PaymentServiceType.MovieTicket
|
|
81
|
+
// // seatInfoSyncIn // discontinue(2024-06-10~)
|
|
82
|
+
// };
|
|
83
83
|
return Object.assign(Object.assign({}, params), { object: params.object.map((o) => {
|
|
84
84
|
const movieTicketsWithMaskedAccessCode = (Array.isArray(o.movieTickets))
|
|
85
85
|
? o.movieTickets.map((movieTicket) => {
|
|
@@ -88,7 +88,7 @@ function createStartingPayAction(params
|
|
|
88
88
|
})
|
|
89
89
|
: [];
|
|
90
90
|
return Object.assign(Object.assign({}, o), { movieTickets: movieTicketsWithMaskedAccessCode });
|
|
91
|
-
})
|
|
91
|
+
}) });
|
|
92
92
|
}
|
|
93
93
|
exports.createStartingPayAction = createStartingPayAction;
|
|
94
94
|
function processPurchaseNumberAuthResult2checkRecipe(params) {
|
|
@@ -15,6 +15,22 @@ import type { MongoRepository as PaymentAcceptedRepo } from '../repo/sellerPayme
|
|
|
15
15
|
import type { MongoRepository as TaskRepo } from '../repo/task';
|
|
16
16
|
import type { RedisRepository as TransactionNumberRepo } from '../repo/transactionNumber';
|
|
17
17
|
import * as factory from '../factory';
|
|
18
|
+
import { IAcceptedOfferMovieTicketUsed } from './payment/factory';
|
|
19
|
+
export declare function fixOrderAsPurpose(params: {
|
|
20
|
+
potentialActions: {
|
|
21
|
+
pay: {
|
|
22
|
+
purpose: {
|
|
23
|
+
confirmationNumber: string;
|
|
24
|
+
orderNumber: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
}, transaction: factory.assetTransaction.pay.ITransaction): (repos: {
|
|
29
|
+
acceptedOffer: AcceptedOfferRepo;
|
|
30
|
+
order: OrderRepo;
|
|
31
|
+
}) => Promise<Pick<factory.order.IOrder, "typeOf" | "confirmationNumber" | "orderNumber"> & {
|
|
32
|
+
acceptedOffersMovieTicketUsed: IAcceptedOfferMovieTicketUsed[];
|
|
33
|
+
}>;
|
|
18
34
|
/**
|
|
19
35
|
* 決済確定
|
|
20
36
|
*/
|
|
@@ -9,37 +9,91 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.refund = exports.voidPayment = exports.pay = void 0;
|
|
12
|
+
exports.refund = exports.voidPayment = exports.pay = exports.fixOrderAsPurpose = void 0;
|
|
13
13
|
const factory = require("../factory");
|
|
14
|
-
const pay_1 = require("./assetTransaction/pay");
|
|
15
|
-
const potentialActions_1 = require("./assetTransaction/pay/potentialActions");
|
|
16
14
|
const CreditCardPaymentService = require("./payment/creditCard");
|
|
17
15
|
const FaceToFacePaymentService = require("./payment/faceToFace");
|
|
16
|
+
const factory_1 = require("./payment/factory");
|
|
18
17
|
const MovieTicketPaymentService = require("./payment/movieTicket");
|
|
19
18
|
const PaymentCardPaymentService = require("./payment/paymentCard");
|
|
20
|
-
function
|
|
19
|
+
function fixOrderAsPurpose(params, transaction) {
|
|
21
20
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
22
21
|
var _a;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
const payPurposeConfirmationNumber = params.potentialActions.pay.purpose.confirmationNumber;
|
|
23
|
+
const payPurposeOrderNumber = (_a = params.potentialActions.pay.purpose) === null || _a === void 0 ? void 0 : _a.orderNumber;
|
|
24
|
+
const ordersWithoutAcceptedOffers = yield repos.order.search({
|
|
25
|
+
limit: 1,
|
|
26
|
+
page: 1,
|
|
27
|
+
project: { id: { $eq: transaction.project.id } },
|
|
28
|
+
confirmationNumbers: [payPurposeConfirmationNumber],
|
|
29
|
+
orderNumbers: [payPurposeOrderNumber]
|
|
30
|
+
}, { typeOf: 1, confirmationNumber: 1, orderNumber: 1 });
|
|
31
|
+
const orderWithoutAcceptedOffers = ordersWithoutAcceptedOffers.shift();
|
|
32
|
+
if (orderWithoutAcceptedOffers === undefined) {
|
|
33
|
+
throw new factory.errors.NotFound('Order as purpose');
|
|
34
|
+
}
|
|
35
|
+
// 必要なオファー検索のみ実行する(2024-01-18~)
|
|
36
|
+
let acceptedOffersMovieTicketUsed = [];
|
|
37
|
+
const movieTickets = transaction.object.paymentMethod.movieTickets;
|
|
38
|
+
if (Array.isArray(movieTickets) && movieTickets.length > 0) {
|
|
39
|
+
const reservationForId = movieTickets[0].serviceOutput.reservationFor.id; // イベントIDは決済取引ごとにひとつのみ許可なので、これで問題ない
|
|
40
|
+
const seatNumbers = movieTickets.map(({ serviceOutput }) => serviceOutput.reservedTicket.ticketedSeat.seatNumber);
|
|
41
|
+
acceptedOffersMovieTicketUsed = (yield repos.acceptedOffer.searchAcceptedOffersByOrderNumber({
|
|
42
|
+
orderNumber: { $eq: orderWithoutAcceptedOffers.orderNumber },
|
|
43
|
+
project: { id: { $eq: transaction.project.id } },
|
|
44
|
+
acceptedOffers: {
|
|
45
|
+
itemOffered: {
|
|
46
|
+
typeOf: { $in: [factory.reservationType.EventReservation] },
|
|
47
|
+
// movieTicketsに結合されたイベントID,座席コードで絞る
|
|
48
|
+
reservationFor: { id: { $in: [reservationForId] } },
|
|
49
|
+
reservedTicket: { ticketedSeat: { seatNumber: { $in: seatNumbers } } }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}, ['itemOffered', 'priceSpecification']));
|
|
53
|
+
}
|
|
54
|
+
return Object.assign(Object.assign({}, orderWithoutAcceptedOffers), { acceptedOffersMovieTicketUsed });
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
exports.fixOrderAsPurpose = fixOrderAsPurpose;
|
|
58
|
+
function payTask2payActionAttributes(params) {
|
|
59
|
+
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
var _a, _b;
|
|
61
|
+
const { object, potentialActions, purpose, typeOf } = params;
|
|
62
|
+
if (typeOf === factory.actionType.PayAction) {
|
|
63
|
+
// 返金手数料決済の場合
|
|
64
|
+
const order = (yield repos.order.search({
|
|
65
|
+
limit: 1,
|
|
66
|
+
page: 1,
|
|
67
|
+
orderNumbers: [params.purpose.object.orderNumber]
|
|
68
|
+
}, { seller: 1, project: 1 })).shift();
|
|
69
|
+
if (order === undefined) {
|
|
70
|
+
throw new factory.errors.NotFound(factory.order.OrderType.Order);
|
|
31
71
|
}
|
|
72
|
+
return Object.assign(Object.assign({ object, purpose, typeOf: factory.actionType.PayAction, agent: { id: order.project.id, typeOf: factory.organizationType.Project }, project: { id: order.project.id, typeOf: factory.organizationType.Project }, recipient: Object.assign({ id: order.seller.id, typeOf: order.seller.typeOf }, (typeof order.seller.name === 'string') ? { name: order.seller.name } : undefined) }, (potentialActions !== undefined) ? { potentialActions } : undefined), (typeof ((_a = params.sameAs) === null || _a === void 0 ? void 0 : _a.id) === 'string') ? { sameAs: params.sameAs } : undefined);
|
|
32
73
|
}
|
|
33
74
|
else {
|
|
34
|
-
|
|
75
|
+
// 最適化されたタスクに対応(2024-01-19~)
|
|
76
|
+
let transaction;
|
|
77
|
+
if (typeof params.object.paymentMethod.paymentMethodId === 'string') {
|
|
78
|
+
transaction = yield repos.assetTransaction.findByTransactionNumber({
|
|
79
|
+
typeOf: factory.assetTransactionType.Pay,
|
|
80
|
+
transactionNumber: params.object.paymentMethod.paymentMethodId
|
|
81
|
+
});
|
|
82
|
+
if (transaction.status !== factory.transactionStatusType.Confirmed) {
|
|
83
|
+
throw new factory.errors.Argument('object.paymentMethod.paymentMethodId', `invalid transaction status: ${transaction.transactionNumber} ${transaction.status}`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
throw new factory.errors.ArgumentNull('object.paymentMethod.paymentMethodId');
|
|
88
|
+
}
|
|
89
|
+
const order = yield fixOrderAsPurpose({ potentialActions: { pay: { purpose: params.purpose } } }, transaction)(repos);
|
|
90
|
+
const payOrderAction = (0, factory_1.createPayOrderAction)({
|
|
91
|
+
transaction: transaction,
|
|
92
|
+
potentialActions: { pay: { purpose: params.purpose } },
|
|
93
|
+
order
|
|
94
|
+
});
|
|
95
|
+
return Object.assign(Object.assign({}, payOrderAction), (typeof ((_b = params.sameAs) === null || _b === void 0 ? void 0 : _b.id) === 'string') ? { sameAs: params.sameAs } : undefined);
|
|
35
96
|
}
|
|
36
|
-
const order = yield (0, pay_1.fixOrderAsPurpose)({ potentialActions: { pay: { purpose: params.purpose } } }, transaction)(repos);
|
|
37
|
-
const payActions = (0, potentialActions_1.createPayActions)({
|
|
38
|
-
transaction: transaction,
|
|
39
|
-
potentialActions: { pay: { purpose: params.purpose } },
|
|
40
|
-
order
|
|
41
|
-
});
|
|
42
|
-
return Object.assign(Object.assign({}, payActions[0]), (typeof ((_a = params.sameAs) === null || _a === void 0 ? void 0 : _a.id) === 'string') ? { sameAs: params.sameAs } : undefined);
|
|
43
97
|
});
|
|
44
98
|
}
|
|
45
99
|
/**
|
|
@@ -49,14 +103,14 @@ function pay(params) {
|
|
|
49
103
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
50
104
|
var _a;
|
|
51
105
|
let payActionAttributes;
|
|
52
|
-
if (params.typeOf === factory.actionType.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
106
|
+
// if (params.purpose.typeOf === factory.actionType.ReturnAction) {
|
|
107
|
+
// // タスクにPayActionそのものが指定されていればそのまま処理
|
|
108
|
+
// payActionAttributes = params;
|
|
109
|
+
// } else {
|
|
110
|
+
// // 最適化されたタスクに対応(2024-01-19~)
|
|
111
|
+
// payActionAttributes = await payTask2payActionAttributes(params)(repos);
|
|
112
|
+
// }
|
|
113
|
+
payActionAttributes = yield payTask2payActionAttributes(params)(repos);
|
|
60
114
|
const paymentServiceType = (_a = payActionAttributes.object[0]) === null || _a === void 0 ? void 0 : _a.typeOf;
|
|
61
115
|
switch (paymentServiceType) {
|
|
62
116
|
case factory.service.paymentService.PaymentServiceType.FaceToFace:
|
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.25",
|
|
14
|
+
"@cinerino/sdk": "7.2.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.34.0-alpha.
|
|
113
|
+
"version": "21.34.0-alpha.18"
|
|
114
114
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as factory from '../../../factory';
|
|
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[];
|
|
10
|
-
export { createPayActions, IAcceptedOfferMovieTicketUsed };
|