@chevre/domain 21.30.0-alpha.9 → 21.30.0
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/checkActions.ts +65 -0
- package/example/src/chevre/checkReplaceActions.ts +65 -0
- package/example/src/chevre/checkSendEmailMessages4order.ts +73 -0
- package/example/src/chevre/deleteStartDatePassedCertainPeriod.ts +27 -0
- package/example/src/chevre/findReservationByCode.ts +3 -1
- package/example/src/chevre/findValidAuthorization.ts +45 -0
- package/example/src/chevre/importEventsFromCOA.ts +2 -2
- package/example/src/chevre/migrateMembers.ts +94 -0
- package/example/src/chevre/optimizeActions.ts +16 -22
- package/example/src/chevre/playAroundMessage.ts +73 -0
- package/example/src/chevre/playAroundNote.ts +19 -68
- package/example/src/chevre/playAroundTicket.ts +40 -0
- package/example/src/chevre/transaction/processPlaceOrder.ts +2 -0
- package/example/src/chevre/unsetUnnecessaryFields.ts +25 -7
- package/example/src/moment.ts +21 -0
- package/lib/chevre/credentials.d.ts +6 -1
- package/lib/chevre/credentials.js +12 -1
- package/lib/chevre/emailMessageBuilder.d.ts +13 -6
- package/lib/chevre/emailMessageBuilder.js +6 -10
- package/lib/chevre/repo/code.d.ts +25 -13
- package/lib/chevre/repo/code.js +48 -28
- package/lib/chevre/repo/customer.d.ts +7 -6
- package/lib/chevre/repo/customer.js +31 -36
- package/lib/chevre/repo/member.d.ts +4 -0
- package/lib/chevre/repo/member.js +7 -1
- package/lib/chevre/repo/message.d.ts +90 -0
- package/lib/chevre/repo/message.js +183 -0
- package/lib/chevre/repo/mongoose/schemas/authorization.js +6 -13
- package/lib/chevre/repo/mongoose/schemas/member.js +5 -12
- package/lib/chevre/repo/mongoose/schemas/message.d.ts +5 -0
- package/lib/chevre/repo/mongoose/schemas/message.js +124 -0
- package/lib/chevre/repo/mongoose/schemas/note.js +15 -10
- package/lib/chevre/repo/mongoose/schemas/ownershipInfo.js +5 -12
- package/lib/chevre/repo/mongoose/schemas/role.d.ts +1 -1
- package/lib/chevre/repo/mongoose/schemas/role.js +23 -29
- package/lib/chevre/repo/mongoose/schemas/ticket.d.ts +5 -0
- package/lib/chevre/repo/mongoose/schemas/ticket.js +70 -0
- package/lib/chevre/repo/note.d.ts +4 -0
- package/lib/chevre/repo/note.js +6 -0
- package/lib/chevre/repo/ownershipInfo.d.ts +4 -0
- package/lib/chevre/repo/ownershipInfo.js +6 -0
- package/lib/chevre/repo/role.js +1 -5
- package/lib/chevre/repo/task.d.ts +16 -2
- package/lib/chevre/repo/task.js +17 -6
- package/lib/chevre/repo/ticket.d.ts +58 -0
- package/lib/chevre/repo/ticket.js +83 -0
- package/lib/chevre/repository.d.ts +13 -3
- package/lib/chevre/repository.js +29 -3
- package/lib/chevre/service/code.d.ts +34 -6
- package/lib/chevre/service/code.js +98 -12
- package/lib/chevre/service/event.d.ts +6 -8
- package/lib/chevre/service/event.js +137 -112
- package/lib/chevre/service/notification.d.ts +2 -0
- package/lib/chevre/service/notification.js +11 -1
- package/lib/chevre/service/offer/event/authorize.d.ts +4 -0
- package/lib/chevre/service/offer/event/processStartReserve4chevre.d.ts +4 -0
- package/lib/chevre/service/offer/event/processStartReserve4chevre.js +4 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered.d.ts +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered.js +4 -1
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.d.ts +1 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/createSendEmailMessageTaskIfNotExist.js +26 -5
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.js +4 -1
- package/lib/chevre/service/order/sendOrder.js +3 -1
- package/lib/chevre/service/payment/any.d.ts +4 -0
- package/lib/chevre/service/payment/any.js +4 -1
- package/lib/chevre/service/payment/movieTicket/checkByIdentifier.js +1 -1
- package/lib/chevre/service/payment/movieTicket/factory.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/factory.js +2 -2
- package/lib/chevre/service/payment/movieTicket.js +138 -53
- package/lib/chevre/service/reserve/findByCode.d.ts +1 -1
- package/lib/chevre/service/reserve/findByCode.js +4 -4
- package/lib/chevre/service/reserve/useReservation.js +14 -30
- package/lib/chevre/service/reserve/verifyToken4reservation.d.ts +3 -1
- package/lib/chevre/service/reserve/verifyToken4reservation.js +3 -2
- package/lib/chevre/service/task/authorizePayment.js +4 -0
- package/lib/chevre/service/task/deleteTransaction.js +2 -0
- package/lib/chevre/service/task/onAuthorizationCreated.js +5 -5
- package/lib/chevre/service/task/returnPayTransaction.js +4 -2
- package/lib/chevre/service/task/sendEmailMessage.js +2 -0
- package/lib/chevre/service/task.d.ts +1 -7
- package/lib/chevre/service/task.js +1 -10
- package/lib/chevre/service/transaction/deleteTransaction.d.ts +2 -0
- package/lib/chevre/service/transaction/deleteTransaction.js +29 -4
- package/lib/chevre/service/transaction/moneyTransfer.d.ts +6 -0
- package/lib/chevre/service/transaction/moneyTransfer.js +4 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/confirm.d.ts +6 -2
- package/lib/chevre/service/transaction/placeOrderInProgress/confirm.js +29 -4
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/sendEmailMessage.d.ts +5 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/sendEmailMessage.js +32 -30
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.d.ts +5 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.js +9 -6
- package/lib/chevre/service/transaction/placeOrderInProgress/publishCode.d.ts +10 -2
- package/lib/chevre/service/transaction/placeOrderInProgress/publishCode.js +4 -1
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +2 -27
- package/package.json +4 -4
- package/example/src/chevre/migrateActionInstrumentTransactionNumber.ts +0 -93
|
@@ -2,6 +2,7 @@ import type { MongoRepository as TaskRepo } from '../../../../repo/task';
|
|
|
2
2
|
import * as factory from '../../../../factory';
|
|
3
3
|
declare function createSendEmailMessageTaskIfNotExist(params: {
|
|
4
4
|
potentialActions?: factory.action.transfer.send.order.IPotentialActions;
|
|
5
|
+
order: Pick<factory.order.IOrder, 'customer' | 'orderDate' | 'orderNumber' | 'price' | 'priceCurrency' | 'project' | 'typeOf'>;
|
|
5
6
|
}): (repos: {
|
|
6
7
|
task: TaskRepo;
|
|
7
8
|
}) => Promise<void>;
|
|
@@ -19,19 +19,40 @@ function createSendEmailMessageTaskIfNotExist(params) {
|
|
|
19
19
|
const now = new Date();
|
|
20
20
|
if (Array.isArray(sendEmailMessageActions)) {
|
|
21
21
|
yield Promise.all(sendEmailMessageActions.map((sendEmailMessageAction, index) => __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
const taskIdentifier = util.format('%s:%s:%s:%s:%s:%s',
|
|
22
|
+
const taskIdentifier = util.format('%s:%s:%s:%s:%s:%s',
|
|
23
|
+
// sendEmailMessageAction.project.id,
|
|
24
|
+
params.order.project.id, factory.taskName.SendEmailMessage,
|
|
25
|
+
// sendEmailMessageAction.purpose.typeOf,
|
|
26
|
+
// sendEmailMessageAction.purpose.orderNumber,
|
|
27
|
+
params.order.typeOf, params.order.orderNumber, factory.orderStatus.OrderProcessing, index);
|
|
28
|
+
// const actionAttributes: factory.task.sendEmailMessage.IData['actionAttributes'] = sendEmailMessageAction;
|
|
29
|
+
const simpleOrder = {
|
|
30
|
+
typeOf: params.order.typeOf,
|
|
31
|
+
orderNumber: params.order.orderNumber,
|
|
32
|
+
price: params.order.price,
|
|
33
|
+
priceCurrency: params.order.priceCurrency,
|
|
34
|
+
orderDate: params.order.orderDate
|
|
35
|
+
};
|
|
36
|
+
const actionAttributes = {
|
|
37
|
+
project: params.order.project,
|
|
38
|
+
typeOf: factory.actionType.SendAction,
|
|
39
|
+
object: sendEmailMessageAction.object,
|
|
40
|
+
agent: params.order.project,
|
|
41
|
+
recipient: { typeOf: params.order.customer.typeOf, id: params.order.customer.id },
|
|
42
|
+
potentialActions: {},
|
|
43
|
+
purpose: simpleOrder
|
|
44
|
+
};
|
|
23
45
|
const sendEmailMessageTask = {
|
|
24
46
|
identifier: taskIdentifier,
|
|
25
|
-
project: sendEmailMessageAction.project,
|
|
47
|
+
// project: sendEmailMessageAction.project,
|
|
48
|
+
project: params.order.project,
|
|
26
49
|
name: factory.taskName.SendEmailMessage,
|
|
27
50
|
status: factory.taskStatus.Ready,
|
|
28
51
|
runsAt: now,
|
|
29
52
|
remainingNumberOfTries: 10,
|
|
30
53
|
numberOfTried: 0,
|
|
31
54
|
executionResults: [],
|
|
32
|
-
data: {
|
|
33
|
-
actionAttributes: sendEmailMessageAction
|
|
34
|
-
}
|
|
55
|
+
data: { actionAttributes }
|
|
35
56
|
};
|
|
36
57
|
yield repos.task.createIfNotExistByIdentifier(sendEmailMessageTask, { emitImmediately: true });
|
|
37
58
|
})));
|
|
@@ -70,7 +70,10 @@ function onOrderProcessing(params) {
|
|
|
70
70
|
// })(repos);
|
|
71
71
|
// OrderProcessingにおけるEメール送信に対応(2024-01-17~)
|
|
72
72
|
if (settings_1.USE_SEND_EMAIL_MESSAGE_ON_ORDER_PROCESSING) {
|
|
73
|
-
yield (0, createSendEmailMessageTaskIfNotExist_1.createSendEmailMessageTaskIfNotExist)({
|
|
73
|
+
yield (0, createSendEmailMessageTaskIfNotExist_1.createSendEmailMessageTaskIfNotExist)({
|
|
74
|
+
potentialActions: sendOrderPotentialActions,
|
|
75
|
+
order: params.order
|
|
76
|
+
})(repos);
|
|
74
77
|
}
|
|
75
78
|
break;
|
|
76
79
|
default:
|
|
@@ -155,7 +155,9 @@ function sendOrder(params) {
|
|
|
155
155
|
orderNumber: order.orderNumber,
|
|
156
156
|
project: order.project,
|
|
157
157
|
typeOf: order.typeOf,
|
|
158
|
-
orderStatus: factory.orderStatus.OrderDelivered
|
|
158
|
+
orderStatus: factory.orderStatus.OrderDelivered,
|
|
159
|
+
price: order.price,
|
|
160
|
+
priceCurrency: order.priceCurrency
|
|
159
161
|
},
|
|
160
162
|
placeOrderTransaction
|
|
161
163
|
})({
|
|
@@ -5,12 +5,14 @@ import * as factory from '../../factory';
|
|
|
5
5
|
import type { MongoRepository as AccountingReportRepo } from '../../repo/accountingReport';
|
|
6
6
|
import type { MongoRepository as ActionRepo } from '../../repo/action';
|
|
7
7
|
import type { MongoRepository as AssetTransactionRepo } from '../../repo/assetTransaction';
|
|
8
|
+
import type { AuthorizationRepo } from '../../repo/code';
|
|
8
9
|
import type { MongoRepository as EventRepo } from '../../repo/event';
|
|
9
10
|
import type { MongoRepository as PaymentServiceRepo } from '../../repo/paymentService';
|
|
10
11
|
import type { MongoRepository as PaymentServiceProviderRepo } from '../../repo/paymentServiceProvider';
|
|
11
12
|
import type { MongoRepository as ProductRepo } from '../../repo/product';
|
|
12
13
|
import type { MongoRepository as PaymentAcceptedRepo } from '../../repo/sellerPaymentAccepted';
|
|
13
14
|
import type { MongoRepository as TaskRepo } from '../../repo/task';
|
|
15
|
+
import type { TicketRepo } from '../../repo/ticket';
|
|
14
16
|
import type { MongoRepository as TransactionRepo } from '../../repo/transaction';
|
|
15
17
|
import type { RedisRepository as TransactionNumberRepo } from '../../repo/transactionNumber';
|
|
16
18
|
import type { TransactionProcessRepository } from '../../repo/transactionProcess';
|
|
@@ -56,12 +58,14 @@ interface IAuthorizeRepos {
|
|
|
56
58
|
accountingReport: AccountingReportRepo;
|
|
57
59
|
action: ActionRepo;
|
|
58
60
|
assetTransaction: AssetTransactionRepo;
|
|
61
|
+
authorization: AuthorizationRepo;
|
|
59
62
|
event: EventRepo;
|
|
60
63
|
paymentAccepted: PaymentAcceptedRepo;
|
|
61
64
|
paymentService: PaymentServiceRepo;
|
|
62
65
|
paymentServiceProvider: PaymentServiceProviderRepo;
|
|
63
66
|
product: ProductRepo;
|
|
64
67
|
task: TaskRepo;
|
|
68
|
+
ticket: TicketRepo;
|
|
65
69
|
transaction: TransactionRepo;
|
|
66
70
|
transactionNumber: TransactionNumberRepo;
|
|
67
71
|
transactionProcess: TransactionProcessRepository;
|
|
@@ -333,7 +333,7 @@ function authorize(params) {
|
|
|
333
333
|
const { accountId } = yield fixAccountIdIfPossible({
|
|
334
334
|
object: params.object,
|
|
335
335
|
project: { id: transaction.project.id }
|
|
336
|
-
})(
|
|
336
|
+
})(repos);
|
|
337
337
|
const authorizeObject = Object.assign(Object.assign(Object.assign(Object.assign({}, params.object), { accountId, paymentMethodId: transactionNumber, typeOf: factory.action.authorize.paymentMethod.any.ResultType.Payment }), (creditCard !== undefined) ? { creditCard } : undefined), (Array.isArray(movieTickets)) ? { movieTickets } : undefined);
|
|
338
338
|
// 承認アクションを開始する
|
|
339
339
|
const taskId = (_b = params.sameAs) === null || _b === void 0 ? void 0 : _b.id;
|
|
@@ -446,6 +446,9 @@ function fixAccountIdIfPossible(params) {
|
|
|
446
446
|
agent: { id: params.project.id, typeOf: factory.organizationType.Project },
|
|
447
447
|
token: fromLocation
|
|
448
448
|
})(repos);
|
|
449
|
+
if (Array.isArray(paymentCardOwnershipInfo)) {
|
|
450
|
+
throw new factory.errors.NotImplemented('fromLocation as an array not implemented');
|
|
451
|
+
}
|
|
449
452
|
if (paymentCardOwnershipInfo.typeOf !== 'OwnershipInfo') {
|
|
450
453
|
throw new factory.errors.Argument('fromLocation', 'must be OwnershipInfo');
|
|
451
454
|
}
|
|
@@ -69,7 +69,7 @@ function checkByIdentifier(params) {
|
|
|
69
69
|
})(repos);
|
|
70
70
|
purchaseNumberAuthIn = {
|
|
71
71
|
kgygishCd: sellerCredentials.kgygishCd,
|
|
72
|
-
jhshbtsCd: surfrock.service.auth.
|
|
72
|
+
jhshbtsCd: surfrock.factory.service.auth.purchaseNumberAuth.InformationTypeCode.All,
|
|
73
73
|
knyknrNoInfoIn: knyknrNoInfoIn,
|
|
74
74
|
skhnCd: skhnCd,
|
|
75
75
|
stCd: sellerCredentials.stCd,
|
|
@@ -50,8 +50,8 @@ function createSeatInfoSyncIn(params) {
|
|
|
50
50
|
// }
|
|
51
51
|
return {
|
|
52
52
|
kgygishCd: kgygishCd,
|
|
53
|
-
yykDvcTyp: surfrock.service.seat.
|
|
54
|
-
trkshFlg: surfrock.service.seat.
|
|
53
|
+
yykDvcTyp: surfrock.factory.service.seat.seatInfoSync.ReserveDeviceType.EntertainerSitePC,
|
|
54
|
+
trkshFlg: surfrock.factory.service.seat.seatInfoSync.DeleteFlag.False,
|
|
55
55
|
kgygishSstmZskyykNo: params.paymentMethodId,
|
|
56
56
|
// 興行会社ユーザー座席予約番号
|
|
57
57
|
kgygishUsrZskyykNo: (typeof ((_c = params.purpose) === null || _c === void 0 ? void 0 : _c.confirmationNumber) === 'string')
|
|
@@ -350,9 +350,9 @@ function payActionParams2seatInfoSyncIn(params) {
|
|
|
350
350
|
* MovieTicket着券取消
|
|
351
351
|
*/
|
|
352
352
|
function refundMovieTicket(params) {
|
|
353
|
-
// tslint:disable-next-line:max-func-body-length
|
|
353
|
+
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
354
354
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
355
|
-
var _a, _b, _c, _d, _e, _f;
|
|
355
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
356
356
|
const paymentMethodId = (_a = params.object[0]) === null || _a === void 0 ? void 0 : _a.paymentMethod.paymentMethodId;
|
|
357
357
|
const paymentServiceId = (_b = params.object[0]) === null || _b === void 0 ? void 0 : _b.id;
|
|
358
358
|
const availableChannel = yield repos.paymentService.findAvailableChannel({
|
|
@@ -368,66 +368,118 @@ function refundMovieTicket(params) {
|
|
|
368
368
|
state: ''
|
|
369
369
|
});
|
|
370
370
|
const movieTicketSeatService = new surfrock.service.seat.SeatService({ endpoint: String(availableChannel.serviceUrl), auth: mvtkReserveAuthClient }, { timeout: credentials_1.credentials.movieticketReserve.timeout });
|
|
371
|
-
|
|
372
|
-
let action = yield repos.action.start(Object.assign(Object.assign({}, params), (typeof ((_f = params.sameAs) === null || _f === void 0 ? void 0 : _f.id) === 'string')
|
|
373
|
-
? {
|
|
374
|
-
sameAs: {
|
|
375
|
-
id: params.sameAs.id,
|
|
376
|
-
typeOf: 'Task'
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
: undefined));
|
|
371
|
+
let seatInfoSyncCancelIn;
|
|
380
372
|
let seatInfoSyncIn;
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
373
|
+
const useSeatInfoSyncCancel = ((_f = availableChannel.credentials) === null || _f === void 0 ? void 0 : _f.useSeatInfoSyncCancel) === true;
|
|
374
|
+
if (useSeatInfoSyncCancel) {
|
|
375
|
+
seatInfoSyncCancelIn = yield createSeatInfoSyncCancelInOnRefund({
|
|
376
|
+
project: { id: params.project.id },
|
|
377
|
+
paymentMethodId
|
|
378
|
+
})({ action: repos.action });
|
|
379
|
+
}
|
|
380
|
+
else {
|
|
384
381
|
seatInfoSyncIn = yield createSeatInfoSyncInOnRefund({
|
|
385
382
|
project: { id: params.project.id },
|
|
386
383
|
paymentMethodId
|
|
387
384
|
})({ action: repos.action });
|
|
388
|
-
seatInfoSyncResult = yield movieTicketSeatService.seatInfoSync(seatInfoSyncIn);
|
|
389
385
|
}
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
386
|
+
// アクション開始
|
|
387
|
+
// instrumentをセット(2024-04-30~)
|
|
388
|
+
const instrument = Object.assign(Object.assign({ typeOf: factory.service.paymentService.PaymentServiceType.MovieTicket }, (seatInfoSyncIn !== undefined) ? { seatInfoSyncIn } : undefined), (seatInfoSyncCancelIn !== undefined) ? { seatInfoSyncCancelIn } : undefined);
|
|
389
|
+
let action = yield repos.action.start(Object.assign(Object.assign(Object.assign({}, params), (typeof ((_g = params.sameAs) === null || _g === void 0 ? void 0 : _g.id) === 'string')
|
|
390
|
+
? { sameAs: { id: params.sameAs.id, typeOf: 'Task' } }
|
|
391
|
+
: undefined), { instrument }));
|
|
392
|
+
let seatInfoSyncCancelResult;
|
|
393
|
+
let seatInfoSyncResult;
|
|
394
|
+
let seatInfoSyncResultAsError;
|
|
395
|
+
if (useSeatInfoSyncCancel) {
|
|
396
|
+
try {
|
|
397
|
+
if (seatInfoSyncCancelIn === undefined) {
|
|
398
|
+
throw new factory.errors.ServiceUnavailable('seatInfoSyncCancelIn must be set');
|
|
402
399
|
}
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
400
|
+
seatInfoSyncCancelResult = yield movieTicketSeatService.seatInfoSyncCancel(seatInfoSyncCancelIn);
|
|
401
|
+
}
|
|
402
|
+
catch (error) {
|
|
403
|
+
let throwsError = true;
|
|
404
|
+
if (error.name === errorHandler_1.MOVIE_TICKET_RESERVE_REQUEST_ERROR_NAME) {
|
|
405
|
+
if (error.code === http_status_1.BAD_REQUEST) {
|
|
406
|
+
if (Array.isArray(error.errors) && error.errors.length > 0) {
|
|
407
|
+
const mvtkReserveServiceError = error.errors[0];
|
|
408
|
+
// 興行会社システム座席予約番号存在無の場合、取消済なのでok
|
|
409
|
+
if (mvtkReserveServiceError.status === surfrock.factory.ResultStatus.Success) {
|
|
410
|
+
const cnclResult = (_h = mvtkReserveServiceError.rawResult) === null || _h === void 0 ? void 0 : _h.cnclResult;
|
|
411
|
+
if (cnclResult === surfrock.service.seat.factory.seatInfoSyncCancel.CancelResult.CancelResult02) {
|
|
412
|
+
seatInfoSyncCancelResult = error;
|
|
413
|
+
throwsError = false;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
408
418
|
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
419
|
+
if (throwsError) {
|
|
420
|
+
let message = String(error.message);
|
|
421
|
+
// エラー通知先で情報を読み取りやすくするために、messageに情報付加
|
|
422
|
+
message += `決済ID:${paymentMethodId}`;
|
|
423
|
+
try {
|
|
424
|
+
const actionError = Object.assign(Object.assign({}, error), { message: message, name: error.name });
|
|
425
|
+
yield repos.action.giveUp({ typeOf: action.typeOf, id: action.id, error: actionError });
|
|
426
|
+
}
|
|
427
|
+
catch (__) {
|
|
428
|
+
// 失敗したら仕方ない
|
|
415
429
|
}
|
|
430
|
+
error = (0, errorHandler_1.handleMvtkReserveError)(Object.assign(Object.assign({}, error), { message: message }));
|
|
431
|
+
throw error;
|
|
416
432
|
}
|
|
417
433
|
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
const actionError = Object.assign(Object.assign({}, error), { message: message, name: error.name });
|
|
424
|
-
yield repos.action.giveUp({ typeOf: action.typeOf, id: action.id, error: actionError });
|
|
434
|
+
}
|
|
435
|
+
else {
|
|
436
|
+
try {
|
|
437
|
+
if (seatInfoSyncIn === undefined) {
|
|
438
|
+
throw new factory.errors.ServiceUnavailable('seatInfoSyncIn must be set');
|
|
425
439
|
}
|
|
426
|
-
|
|
427
|
-
|
|
440
|
+
seatInfoSyncResult = yield movieTicketSeatService.seatInfoSync(seatInfoSyncIn);
|
|
441
|
+
}
|
|
442
|
+
catch (error) {
|
|
443
|
+
let throwsError = true;
|
|
444
|
+
// 「存在しない興行会社システム座席予約番号が入力されました」の場合、取消済なのでok
|
|
445
|
+
if (error.name === errorHandler_1.MOVIE_TICKET_RESERVE_REQUEST_ERROR_NAME) {
|
|
446
|
+
if (error.code === http_status_1.BAD_REQUEST && error.message === MovieticketReserveRequestErrorMessage.NotFound) {
|
|
447
|
+
seatInfoSyncResult = error;
|
|
448
|
+
throwsError = false;
|
|
449
|
+
}
|
|
450
|
+
// ReservationResult 19の内容が不明だがリトライする意味はおそらくないパターン
|
|
451
|
+
if (error.code === http_status_1.BAD_REQUEST && error.message === MovieticketReserveRequestErrorMessage.ReservationResult19) {
|
|
452
|
+
seatInfoSyncResult = error;
|
|
453
|
+
throwsError = false;
|
|
454
|
+
}
|
|
455
|
+
// surfrock: bookingNoが存在しないケースをハンドル(2024-03-13~)
|
|
456
|
+
const expectedMessage4surfrockNotFound = JSON.stringify({ message: `bookingNo:"${paymentMethodId}" が見つかりません。` });
|
|
457
|
+
if (error.code === http_status_1.BAD_REQUEST && error.message === expectedMessage4surfrockNotFound) {
|
|
458
|
+
seatInfoSyncResult = error;
|
|
459
|
+
throwsError = false;
|
|
460
|
+
}
|
|
461
|
+
// 着券取消可能期間超過を認識した上でのあえての返金の場合(注文からしばらく経って返品など)(2024-03-19~)
|
|
462
|
+
if (error.code === http_status_1.BAD_REQUEST && error.message === MovieticketReserveRequestErrorMessage.CancellationPeriodPassed) {
|
|
463
|
+
if (params.purpose.typeOf === factory.actionType.ReturnAction) {
|
|
464
|
+
seatInfoSyncResultAsError = error;
|
|
465
|
+
throwsError = false;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
if (throwsError) {
|
|
470
|
+
let message = String(error.message);
|
|
471
|
+
// エラー通知先で情報を読み取りやすくするために、messageに情報付加
|
|
472
|
+
message += `決済ID:${paymentMethodId}`;
|
|
473
|
+
try {
|
|
474
|
+
const actionError = Object.assign(Object.assign({}, error), { message: message, name: error.name });
|
|
475
|
+
yield repos.action.giveUp({ typeOf: action.typeOf, id: action.id, error: actionError });
|
|
476
|
+
}
|
|
477
|
+
catch (__) {
|
|
478
|
+
// 失敗したら仕方ない
|
|
479
|
+
}
|
|
480
|
+
error = (0, errorHandler_1.handleMvtkReserveError)(Object.assign(Object.assign({}, error), { message: message }));
|
|
481
|
+
throw error;
|
|
428
482
|
}
|
|
429
|
-
error = (0, errorHandler_1.handleMvtkReserveError)(Object.assign(Object.assign({}, error), { message: message }));
|
|
430
|
-
throw error;
|
|
431
483
|
}
|
|
432
484
|
}
|
|
433
485
|
// アクションとしてはFailedだが後続処理を実行するケースに対応(2024-03-21~)
|
|
@@ -435,11 +487,10 @@ function refundMovieTicket(params) {
|
|
|
435
487
|
action = (yield repos.action.giveUpWithObject({ typeOf: action.typeOf, id: action.id, error: seatInfoSyncResultAsError }));
|
|
436
488
|
}
|
|
437
489
|
else {
|
|
438
|
-
const actionResult = Object.assign(Object.assign({}, (
|
|
490
|
+
const actionResult = Object.assign(Object.assign({}, (seatInfoSyncResult !== undefined) ? { seatInfoSyncResult } : undefined), (seatInfoSyncCancelResult !== undefined) ? { seatInfoSyncCancelResult } : undefined);
|
|
439
491
|
action = (yield repos.action.complete({ typeOf: action.typeOf, id: action.id, result: actionResult }));
|
|
440
492
|
}
|
|
441
493
|
yield (0, onRefund_1.onRefund)(action)(repos);
|
|
442
|
-
// return action;
|
|
443
494
|
});
|
|
444
495
|
}
|
|
445
496
|
exports.refundMovieTicket = refundMovieTicket;
|
|
@@ -468,9 +519,43 @@ function createSeatInfoSyncInOnRefund(params) {
|
|
|
468
519
|
}
|
|
469
520
|
let seatInfoSyncIn;
|
|
470
521
|
// 着券時のseatInfoSyncInに対してtrkshFlgだけ変更してリクエストする
|
|
471
|
-
|
|
472
|
-
seatInfoSyncIn = Object.assign(Object.assign({}, seatInfoSyncInOnPay), { trkshFlg: surfrock.service.seat.factory.DeleteFlag.True // 取消フラグ
|
|
522
|
+
seatInfoSyncIn = Object.assign(Object.assign({}, seatInfoSyncInOnPay), { trkshFlg: surfrock.factory.service.seat.seatInfoSync.DeleteFlag.True // 取消フラグ
|
|
473
523
|
});
|
|
474
524
|
return seatInfoSyncIn;
|
|
475
525
|
});
|
|
476
526
|
}
|
|
527
|
+
function createSeatInfoSyncCancelInOnRefund(params) {
|
|
528
|
+
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
529
|
+
var _a;
|
|
530
|
+
// 本アクションに対応するPayActionを取り出す
|
|
531
|
+
// 例えばtimeoutが原因でCompletedActionStatusでない場合、外部サービス側では着券済の可能性もあるので、そこを考慮する
|
|
532
|
+
const payAction = yield repos.action.findPayAction({
|
|
533
|
+
project: { id: params.project.id },
|
|
534
|
+
paymentMethodId: params.paymentMethodId,
|
|
535
|
+
actionStatus: {
|
|
536
|
+
$in: [
|
|
537
|
+
factory.actionStatusType.ActiveActionStatus,
|
|
538
|
+
factory.actionStatusType.CompletedActionStatus,
|
|
539
|
+
factory.actionStatusType.FailedActionStatus
|
|
540
|
+
]
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
if (payAction === undefined) {
|
|
544
|
+
throw new factory.errors.NotFound('PayAction');
|
|
545
|
+
}
|
|
546
|
+
const seatInfoSyncInOnPay = (_a = payAction.instrument) === null || _a === void 0 ? void 0 : _a.seatInfoSyncIn;
|
|
547
|
+
if (seatInfoSyncInOnPay === undefined) {
|
|
548
|
+
throw new factory.errors.NotFound('PayAction.instrument?.seatInfoSyncIn');
|
|
549
|
+
}
|
|
550
|
+
let seatInfoSyncCancelIn;
|
|
551
|
+
seatInfoSyncCancelIn = {
|
|
552
|
+
kgygishCd: seatInfoSyncInOnPay.kgygishCd,
|
|
553
|
+
kgysystmzskyykNo: seatInfoSyncInOnPay.kgygishSstmZskyykNo,
|
|
554
|
+
kgysystmzskyykNoIkktsCnclFlg: '1',
|
|
555
|
+
jyuTyp: surfrock.service.seat.factory.seatInfoSyncCancel.JyuTyp.JyuTyp05,
|
|
556
|
+
jyuTypRmk: ''
|
|
557
|
+
// knyknrNoInfoIn: [],
|
|
558
|
+
};
|
|
559
|
+
return seatInfoSyncCancelIn;
|
|
560
|
+
});
|
|
561
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as factory from '../../factory';
|
|
2
|
-
import type {
|
|
2
|
+
import type { AuthorizationRepo } from '../../repo/code';
|
|
3
3
|
import type { MongoRepository as OrderRepo } from '../../repo/order';
|
|
4
4
|
import type { MongoRepository as ReservationRepo } from '../../repo/reservation';
|
|
5
5
|
type AvailableReservationType = factory.reservationType.BusReservation | factory.reservationType.EventReservation;
|
|
@@ -21,13 +21,13 @@ function findByCode(params) {
|
|
|
21
21
|
throw new factory.errors.ArgumentNull('code');
|
|
22
22
|
}
|
|
23
23
|
const reservationId = String(params.id);
|
|
24
|
-
const
|
|
24
|
+
const authorization = yield repos.authorization.findValidOneByCode({
|
|
25
25
|
project: { id: params.project.id },
|
|
26
26
|
code: params.code
|
|
27
27
|
});
|
|
28
|
-
switch (
|
|
28
|
+
switch (authorization.object.typeOf) {
|
|
29
29
|
case factory.order.OrderType.Order:
|
|
30
|
-
const { orderNumber } =
|
|
30
|
+
const { orderNumber } = authorization.object;
|
|
31
31
|
if (typeof orderNumber === 'string' && orderNumber.length > 0) {
|
|
32
32
|
// reservationIdを含む注文の存在を確認するだけでよい
|
|
33
33
|
yield repos.order.findByOrderNumberAndReservationId({
|
|
@@ -39,7 +39,7 @@ function findByCode(params) {
|
|
|
39
39
|
}
|
|
40
40
|
break;
|
|
41
41
|
default:
|
|
42
|
-
throw new factory.errors.NotImplemented(`authorization object typeOf: ${
|
|
42
|
+
throw new factory.errors.NotImplemented(`authorization object typeOf: ${authorization.object.typeOf} not implemented`);
|
|
43
43
|
}
|
|
44
44
|
const reservationFromRepo = yield repos.reservation.findById({
|
|
45
45
|
id: reservationId,
|
|
@@ -21,50 +21,36 @@ const debug = createDebug('chevre-domain:service:reserve:useReservation');
|
|
|
21
21
|
// tslint:disable-next-line:max-func-body-length
|
|
22
22
|
function useReservation(params) {
|
|
23
23
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
var _a, _b, _c;
|
|
24
|
+
var _a, _b, _c, _d;
|
|
25
25
|
const now = new Date();
|
|
26
26
|
const reservationId = params.object.id;
|
|
27
27
|
const ticketToken = (_a = params === null || params === void 0 ? void 0 : params.instrument) === null || _a === void 0 ? void 0 : _a.ticketToken;
|
|
28
28
|
const token = (_b = params === null || params === void 0 ? void 0 : params.instrument) === null || _b === void 0 ? void 0 : _b.token;
|
|
29
|
-
// タスク作成前に検証済なので検証不要
|
|
30
|
-
// if (params.verifyToken === true) {
|
|
31
|
-
// // instrument?.tokenを検証
|
|
32
|
-
// if (typeof token === 'string') {
|
|
33
|
-
// await verifyToken4reservation({
|
|
34
|
-
// project: { id: params.project.id },
|
|
35
|
-
// agent: params.agent,
|
|
36
|
-
// reservationId,
|
|
37
|
-
// token
|
|
38
|
-
// })({ order: repos.order });
|
|
39
|
-
// }
|
|
40
|
-
// }
|
|
29
|
+
// if (params.verifyToken === true) {} // タスク作成前に検証済なので検証不要
|
|
41
30
|
// confirmReservationが間に合わない可能性を考慮する(2023-06-01~)
|
|
42
31
|
yield reserveIfNotYet({ object: params.object })(repos);
|
|
43
32
|
// 予約検索
|
|
44
|
-
// 取得属性最適化(2023-01-30~)
|
|
45
33
|
const reservation = yield repos.reservation.findById({
|
|
46
34
|
id: reservationId,
|
|
47
35
|
inclusion: ['_id', 'issuedThrough', 'project', 'reservationFor', 'reservationNumber', 'reservedTicket', 'typeOf']
|
|
48
36
|
});
|
|
49
37
|
// UseActionを作成する
|
|
38
|
+
// optimize(2024-05-07~)
|
|
39
|
+
// const reservationAsObject: IReservationAsUseObject = {
|
|
40
|
+
// id: reservation.id, issuedThrough: reservation.issuedThrough, reservationFor: reservation.reservationFor,
|
|
41
|
+
// reservationNumber: reservation.reservationNumber, reservedTicket: reservation.reservedTicket, typeOf: reservation.typeOf
|
|
42
|
+
// };
|
|
43
|
+
const { reservedTicket } = reservation;
|
|
50
44
|
const reservationAsObject = {
|
|
51
45
|
id: reservation.id,
|
|
52
|
-
issuedThrough: reservation.issuedThrough,
|
|
53
|
-
reservationFor: reservation.reservationFor,
|
|
54
46
|
reservationNumber: reservation.reservationNumber,
|
|
55
|
-
|
|
56
|
-
typeOf: reservation.typeOf
|
|
47
|
+
typeOf: reservation.typeOf,
|
|
48
|
+
issuedThrough: { id: reservation.issuedThrough.id, typeOf: reservation.issuedThrough.typeOf },
|
|
49
|
+
reservationFor: { id: reservation.reservationFor.id, typeOf: reservation.reservationFor.typeOf },
|
|
50
|
+
reservedTicket: Object.assign(Object.assign({ typeOf: reservedTicket.typeOf, ticketType: Object.assign({ identifier: reservedTicket.ticketType.identifier, typeOf: reservedTicket.ticketType.typeOf }, (typeof reservedTicket.ticketType.id === 'string') ? { id: reservedTicket.ticketType.id } : undefined) }, (typeof reservedTicket.identifier === 'string') ? { identifier: reservedTicket.identifier } : undefined), (typeof ((_c = reservedTicket.ticketedSeat) === null || _c === void 0 ? void 0 : _c.typeOf) === 'string') ? { ticketedSeat: reservedTicket.ticketedSeat } : undefined)
|
|
57
51
|
};
|
|
58
|
-
const actionAttributes = Object.assign({ project: reservation.project, typeOf: factory.actionType.UseAction, agent: params.agent, instrument: Object.assign(Object.assign(Object.assign({}, (typeof token === 'string') ? { token } : undefined), (typeof ticketToken === 'string') ? { ticketToken } : undefined), { typeOf: factory.action.check.token.ObjectType.Ticket }),
|
|
59
|
-
|
|
60
|
-
// どの予約を
|
|
61
|
-
object: [reservationAsObject] }, (typeof ((_c = params.location) === null || _c === void 0 ? void 0 : _c.identifier) === 'string')
|
|
62
|
-
? {
|
|
63
|
-
location: {
|
|
64
|
-
typeOf: factory.placeType.Place,
|
|
65
|
-
identifier: params.location.identifier
|
|
66
|
-
}
|
|
67
|
-
}
|
|
52
|
+
const actionAttributes = Object.assign({ project: reservation.project, typeOf: factory.actionType.UseAction, agent: params.agent, instrument: Object.assign(Object.assign(Object.assign({}, (typeof token === 'string') ? { token } : undefined), (typeof ticketToken === 'string') ? { ticketToken } : undefined), { typeOf: factory.action.check.token.ObjectType.Ticket }), object: [reservationAsObject] }, (typeof ((_d = params.location) === null || _d === void 0 ? void 0 : _d.identifier) === 'string')
|
|
53
|
+
? { location: { typeOf: factory.placeType.Place, identifier: params.location.identifier } }
|
|
68
54
|
: undefined);
|
|
69
55
|
const action = yield repos.action.start(actionAttributes);
|
|
70
56
|
// ひとまず予約数:1に限定する
|
|
@@ -85,10 +71,8 @@ function useReservation(params) {
|
|
|
85
71
|
}
|
|
86
72
|
throw error;
|
|
87
73
|
}
|
|
88
|
-
// アクション完了
|
|
89
74
|
yield repos.action.completeWithVoid({ typeOf: action.typeOf, id: action.id, result: {} });
|
|
90
75
|
yield (0, onReservationUsed_1.onReservationUsed)(attendedReservation)({ task: repos.task });
|
|
91
|
-
// return action;
|
|
92
76
|
});
|
|
93
77
|
}
|
|
94
78
|
exports.useReservation = useReservation;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as factory from '../../factory';
|
|
2
|
-
import type {
|
|
2
|
+
import type { AuthorizationRepo } from '../../repo/code';
|
|
3
3
|
import type { MongoRepository as OrderRepo } from '../../repo/order';
|
|
4
|
+
import type { TicketRepo } from '../../repo/ticket';
|
|
4
5
|
/**
|
|
5
6
|
* 予約使用のためのチケットトークンを検証する
|
|
6
7
|
*/
|
|
@@ -26,4 +27,5 @@ export declare function verifyToken4reservation(params: {
|
|
|
26
27
|
}): (repos: {
|
|
27
28
|
authorization: AuthorizationRepo;
|
|
28
29
|
order: OrderRepo;
|
|
30
|
+
ticket: TicketRepo;
|
|
29
31
|
}) => Promise<void>;
|
|
@@ -25,13 +25,14 @@ function verifyToken4reservation(params) {
|
|
|
25
25
|
project: params.project,
|
|
26
26
|
agent: params.agent,
|
|
27
27
|
token
|
|
28
|
-
})(
|
|
28
|
+
})(repos);
|
|
29
29
|
}
|
|
30
30
|
else if (typeof ticketToken === 'string' && ticketToken.length > 0) {
|
|
31
|
-
|
|
31
|
+
const findValidOneByCodeResult = yield repos.authorization.findValidOneByCode({
|
|
32
32
|
project: { id: params.project.id },
|
|
33
33
|
code: ticketToken
|
|
34
34
|
});
|
|
35
|
+
payload = findValidOneByCodeResult.object;
|
|
35
36
|
}
|
|
36
37
|
else {
|
|
37
38
|
throw new factory.errors.ArgumentNull('ticket.token or ticket.ticketToken');
|
|
@@ -14,12 +14,14 @@ const factory = require("../../factory");
|
|
|
14
14
|
const accountingReport_1 = require("../../repo/accountingReport");
|
|
15
15
|
const action_1 = require("../../repo/action");
|
|
16
16
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
17
|
+
const code_1 = require("../../repo/code");
|
|
17
18
|
const event_1 = require("../../repo/event");
|
|
18
19
|
const paymentService_1 = require("../../repo/paymentService");
|
|
19
20
|
const paymentServiceProvider_1 = require("../../repo/paymentServiceProvider");
|
|
20
21
|
const product_1 = require("../../repo/product");
|
|
21
22
|
const sellerPaymentAccepted_1 = require("../../repo/sellerPaymentAccepted");
|
|
22
23
|
const task_1 = require("../../repo/task");
|
|
24
|
+
const ticket_1 = require("../../repo/ticket");
|
|
23
25
|
const transaction_1 = require("../../repo/transaction");
|
|
24
26
|
const transactionNumber_1 = require("../../repo/transactionNumber");
|
|
25
27
|
const transactionProcess_1 = require("../../repo/transactionProcess");
|
|
@@ -44,12 +46,14 @@ function call(params) {
|
|
|
44
46
|
accountingReport: new accountingReport_1.MongoRepository(settings.connection),
|
|
45
47
|
action: actionRepo,
|
|
46
48
|
assetTransaction: new assetTransaction_1.MongoRepository(settings.connection),
|
|
49
|
+
authorization: new code_1.AuthorizationRepo(settings.connection),
|
|
47
50
|
event: new event_1.MongoRepository(settings.connection),
|
|
48
51
|
paymentAccepted: new sellerPaymentAccepted_1.MongoRepository(settings.connection),
|
|
49
52
|
paymentService: new paymentService_1.MongoRepository(settings.connection),
|
|
50
53
|
paymentServiceProvider: new paymentServiceProvider_1.MongoRepository(settings.connection),
|
|
51
54
|
product: new product_1.MongoRepository(settings.connection),
|
|
52
55
|
task: new task_1.MongoRepository(settings.connection),
|
|
56
|
+
ticket: new ticket_1.TicketRepo(settings.connection),
|
|
53
57
|
transaction: new transaction_1.MongoRepository(settings.connection),
|
|
54
58
|
transactionNumber: new transactionNumber_1.RedisRepository(settings.redisClient),
|
|
55
59
|
transactionProcess: transactionProcessRepo
|
|
@@ -15,6 +15,7 @@ const accountingReport_1 = require("../../repo/accountingReport");
|
|
|
15
15
|
const action_1 = require("../../repo/action");
|
|
16
16
|
const assetTransaction_1 = require("../../repo/assetTransaction");
|
|
17
17
|
const event_1 = require("../../repo/event");
|
|
18
|
+
const message_1 = require("../../repo/message");
|
|
18
19
|
const note_1 = require("../../repo/note");
|
|
19
20
|
const order_1 = require("../../repo/order");
|
|
20
21
|
const ownershipInfo_1 = require("../../repo/ownershipInfo");
|
|
@@ -33,6 +34,7 @@ function call(data) {
|
|
|
33
34
|
action: new action_1.MongoRepository(settings.connection),
|
|
34
35
|
assetTransaction: new assetTransaction_1.MongoRepository(settings.connection),
|
|
35
36
|
event: new event_1.MongoRepository(settings.connection),
|
|
37
|
+
message: new message_1.MessageRepo(settings.connection),
|
|
36
38
|
note: new note_1.MongoRepository(settings.connection),
|
|
37
39
|
order: new order_1.MongoRepository(settings.connection),
|
|
38
40
|
ownershipInfo: new ownershipInfo_1.MongoRepository(settings.connection),
|
|
@@ -30,7 +30,7 @@ function call(data) {
|
|
|
30
30
|
acceptedOffer: new acceptedOffer_1.MongoRepository(settings.connection),
|
|
31
31
|
action: new action_1.MongoRepository(settings.connection),
|
|
32
32
|
assetTransaction: new assetTransaction_1.MongoRepository(settings.connection),
|
|
33
|
-
code: new code_1.
|
|
33
|
+
code: new code_1.AuthorizationRepo(settings.connection),
|
|
34
34
|
event: new event_1.MongoRepository(settings.connection),
|
|
35
35
|
order: new order_1.MongoRepository(settings.connection),
|
|
36
36
|
ownershipInfo: new ownershipInfo_1.MongoRepository(settings.connection),
|
|
@@ -49,14 +49,14 @@ function onAuthorizationCreated(params) {
|
|
|
49
49
|
let reservationNumbers = [];
|
|
50
50
|
// 発券対象イベントID
|
|
51
51
|
let reservationForIds = [];
|
|
52
|
-
const
|
|
52
|
+
const authorization = yield repos.code.findValidOneByCode({
|
|
53
53
|
code: params.code,
|
|
54
54
|
project: { id: params.project.id }
|
|
55
55
|
});
|
|
56
|
-
switch (
|
|
56
|
+
switch (authorization.object.typeOf) {
|
|
57
57
|
case factory.order.OrderType.Order:
|
|
58
58
|
// 注文検索
|
|
59
|
-
const orderNumber =
|
|
59
|
+
const orderNumber = authorization.object.orderNumber;
|
|
60
60
|
if (typeof orderNumber === 'string' && orderNumber.length > 0) {
|
|
61
61
|
reservationNumbers = yield repos.acceptedOffer.distinctValues({
|
|
62
62
|
orderNumber: { $in: [orderNumber] }
|
|
@@ -68,7 +68,7 @@ function onAuthorizationCreated(params) {
|
|
|
68
68
|
break;
|
|
69
69
|
case 'OwnershipInfo':
|
|
70
70
|
// 所有権検索
|
|
71
|
-
const ownershipInfoId =
|
|
71
|
+
const ownershipInfoId = authorization.object.id;
|
|
72
72
|
if (typeof ownershipInfoId === 'string' && ownershipInfoId.length > 0) {
|
|
73
73
|
const ownershipInfo = yield repos.ownershipInfo.findById({ id: ownershipInfoId });
|
|
74
74
|
// 座席予約に対する所有権であれば発券
|