@chevre/domain 21.2.0-alpha.16 → 21.2.0-alpha.160
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/aggregateEventReservation.ts +1 -1
- package/example/src/chevre/aggregateSellerPaymentAccepted.ts +27 -0
- package/example/src/chevre/aggregation/aggregateSystem.ts +85 -27
- package/example/src/chevre/countDelayedTasks.ts +7 -2
- package/example/src/chevre/createManyEventsIfNotExist.ts +199 -46
- package/example/src/chevre/deleteTasksByName.ts +10 -2
- package/example/src/chevre/findScreeningRoomsByBranchCode.ts +4 -3
- package/example/src/chevre/giveUpStartDatePassedCertainPeriod.ts +56 -0
- package/example/src/chevre/importEventsFromCOA.ts +3 -4
- package/example/src/chevre/lockStockHolder.ts +5 -2
- package/example/src/chevre/migrateScreeningEventSeriesVersion.ts +79 -0
- package/example/src/chevre/processPay.ts +5 -1
- package/example/src/chevre/processRegisterMembership.ts +8 -4
- package/example/src/chevre/processRegisterPaymentCard.ts +8 -4
- package/example/src/chevre/processReserve.ts +5 -2
- package/example/src/chevre/saveTasks.ts +13 -10
- package/example/src/chevre/searchAbortedTasks.ts +34 -0
- package/example/src/chevre/searchActions.ts +33 -0
- package/example/src/chevre/searchEventSeats.ts +5 -2
- package/example/src/chevre/searchHoldReservations.ts +38 -0
- package/example/src/chevre/searchPermissions.ts +54 -0
- package/example/src/chevre/searchReservationNumbersByOrderNumbers.ts +37 -1
- package/example/src/chevre/searchScreeningRooms.ts +35 -0
- package/example/src/chevre/searchSendEmailActions.ts +44 -0
- package/example/src/chevre/sendEmailMessage.ts +1 -2
- package/example/src/chevre/syncScreeningRooms.ts +22 -0
- package/example/src/chevre/syncScreeningRoomsAll.ts +44 -0
- package/example/src/chevre/task/executeTasks.ts +26 -0
- package/example/src/chevre/transaction/processReturnOrder.ts +40 -0
- package/example/src/chevre/transaction/startExportTasks.ts +2 -1
- package/example/src/chevre/unsetContainsInPlaceFromMovieTheater.ts +41 -0
- package/example/src/chevre/updateTransaction.ts +1 -1
- package/example/src/playOnMoment.ts +24 -0
- package/lib/chevre/credentials.d.ts +1 -0
- package/lib/chevre/credentials.js +2 -1
- package/lib/chevre/eventEmitter/assetTransaction.d.ts +21 -0
- package/lib/chevre/eventEmitter/assetTransaction.js +25 -0
- package/lib/chevre/eventEmitter/task.d.ts +2 -1
- package/lib/chevre/eventEmitter/task.js +1 -4
- package/lib/chevre/eventEmitter/transaction.d.ts +1 -1
- package/lib/chevre/eventEmitter/transaction.js +1 -4
- package/lib/chevre/eventEmitter.d.ts +2 -1
- package/lib/chevre/eventEmitter.js +3 -1
- package/lib/chevre/factory/order.d.ts +4 -1
- package/lib/chevre/factory/order.js +19 -6
- package/lib/chevre/repo/account.js +3 -2
- package/lib/chevre/repo/accountTransaction.d.ts +3 -1
- package/lib/chevre/repo/accountTransaction.js +3 -2
- package/lib/chevre/repo/accountingReport.d.ts +1 -3
- package/lib/chevre/repo/action.d.ts +79 -2
- package/lib/chevre/repo/action.js +151 -57
- package/lib/chevre/repo/additionalProperty.js +2 -1
- package/lib/chevre/repo/aggregation.d.ts +3 -0
- package/lib/chevre/repo/aggregation.js +3 -0
- package/lib/chevre/repo/assetTransaction.d.ts +23 -8
- package/lib/chevre/repo/assetTransaction.js +253 -80
- package/lib/chevre/repo/categoryCode.d.ts +1 -1
- package/lib/chevre/repo/categoryCode.js +37 -25
- package/lib/chevre/repo/code.js +3 -2
- package/lib/chevre/repo/comment.d.ts +4 -1
- package/lib/chevre/repo/comment.js +22 -6
- package/lib/chevre/repo/confirmationNumber.d.ts +0 -1
- package/lib/chevre/repo/confirmationNumber.js +3 -15
- package/lib/chevre/repo/creativeWork.d.ts +1 -1
- package/lib/chevre/repo/creativeWork.js +35 -12
- package/lib/chevre/repo/customer.js +2 -1
- package/lib/chevre/repo/emailMessage.js +2 -1
- package/lib/chevre/repo/event.d.ts +30 -2
- package/lib/chevre/repo/event.js +87 -36
- package/lib/chevre/repo/member.d.ts +14 -0
- package/lib/chevre/repo/member.js +31 -3
- package/lib/chevre/repo/merchantReturnPolicy.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/accountTransaction.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/action.d.ts +3 -3
- package/lib/chevre/repo/mongoose/schemas/action.js +19 -1
- package/lib/chevre/repo/mongoose/schemas/assetTransaction.d.ts +9 -6
- package/lib/chevre/repo/mongoose/schemas/assetTransaction.js +32 -19
- package/lib/chevre/repo/mongoose/schemas/authorization.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/comments.d.ts +3 -3
- package/lib/chevre/repo/mongoose/schemas/comments.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/emailMessages.d.ts +3 -3
- package/lib/chevre/repo/mongoose/schemas/event.d.ts +3 -3
- package/lib/chevre/repo/mongoose/schemas/holdReservation.d.ts +75 -0
- package/lib/chevre/repo/mongoose/schemas/holdReservation.js +93 -0
- package/lib/chevre/repo/mongoose/schemas/offer.d.ts +9 -9
- package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +3 -3
- package/lib/chevre/repo/mongoose/schemas/offerItemCondition.d.ts +74 -0
- package/lib/chevre/repo/mongoose/schemas/offerItemCondition.js +45 -0
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +21 -21
- package/lib/chevre/repo/mongoose/schemas/order.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/ownershipInfo.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/place.d.ts +6 -0
- package/lib/chevre/repo/mongoose/schemas/place.js +16 -1
- package/lib/chevre/repo/mongoose/schemas/product.js +6 -0
- package/lib/chevre/repo/mongoose/schemas/project.d.ts +3 -3
- package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +15 -15
- package/lib/chevre/repo/mongoose/schemas/reservation.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/seller.js +6 -0
- package/lib/chevre/repo/mongoose/schemas/serviceOutput.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/task.d.ts +3 -0
- package/lib/chevre/repo/mongoose/schemas/task.js +2 -1
- package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +9 -6
- package/lib/chevre/repo/mongoose/schemas/transaction.js +2 -1
- package/lib/chevre/repo/offer.js +3 -2
- package/lib/chevre/repo/offerCatalog.js +0 -27
- package/lib/chevre/repo/offerItemCondition.d.ts +22 -0
- package/lib/chevre/repo/offerItemCondition.js +121 -0
- package/lib/chevre/repo/order.d.ts +30 -3
- package/lib/chevre/repo/order.js +57 -10
- package/lib/chevre/repo/ownershipInfo.js +2 -7
- package/lib/chevre/repo/paymentServiceProvider.d.ts +65 -0
- package/lib/chevre/repo/paymentServiceProvider.js +156 -0
- package/lib/chevre/repo/place.d.ts +203 -27
- package/lib/chevre/repo/place.js +1722 -694
- package/lib/chevre/repo/priceSpecification.js +3 -2
- package/lib/chevre/repo/product.d.ts +5 -3
- package/lib/chevre/repo/product.js +92 -5
- package/lib/chevre/repo/project.js +2 -1
- package/lib/chevre/repo/reservation.d.ts +20 -4
- package/lib/chevre/repo/reservation.js +40 -59
- package/lib/chevre/repo/role.d.ts +7 -0
- package/lib/chevre/repo/role.js +39 -2
- package/lib/chevre/repo/seller.d.ts +21 -1
- package/lib/chevre/repo/seller.js +78 -23
- package/lib/chevre/repo/serviceOutput.js +2 -1
- package/lib/chevre/repo/stockHolder.d.ts +143 -7
- package/lib/chevre/repo/stockHolder.js +622 -104
- package/lib/chevre/repo/task.d.ts +42 -2
- package/lib/chevre/repo/task.js +68 -20
- package/lib/chevre/repo/transaction.d.ts +21 -2
- package/lib/chevre/repo/transaction.js +160 -48
- package/lib/chevre/repo/trip.js +2 -1
- package/lib/chevre/repository.d.ts +11 -2
- package/lib/chevre/repository.js +15 -4
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +18 -8
- package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.js +19 -8
- package/lib/chevre/service/aggregation/system.d.ts +110 -23
- package/lib/chevre/service/aggregation/system.js +213 -91
- package/lib/chevre/service/assetTransaction/cancelReservation.js +1 -28
- package/lib/chevre/service/assetTransaction/moneyTransfer.js +2 -24
- package/lib/chevre/service/assetTransaction/pay/account/validation.js +1 -1
- package/lib/chevre/service/assetTransaction/pay/potentialActions.js +17 -1
- package/lib/chevre/service/assetTransaction/pay.d.ts +5 -1
- package/lib/chevre/service/assetTransaction/pay.js +20 -34
- package/lib/chevre/service/assetTransaction/refund.js +2 -24
- package/lib/chevre/service/assetTransaction/registerService.js +1 -25
- package/lib/chevre/service/assetTransaction/reserve/factory.d.ts +15 -5
- package/lib/chevre/service/assetTransaction/reserve/factory.js +122 -58
- package/lib/chevre/service/assetTransaction/reserve.d.ts +10 -1
- package/lib/chevre/service/assetTransaction/reserve.js +93 -70
- package/lib/chevre/service/assetTransaction.d.ts +6 -0
- package/lib/chevre/service/assetTransaction.js +9 -4
- package/lib/chevre/service/event.d.ts +3 -0
- package/lib/chevre/service/event.js +55 -22
- package/lib/chevre/service/iam.d.ts +6 -2
- package/lib/chevre/service/iam.js +23 -9
- package/lib/chevre/service/notification/factory.js +2 -2
- package/lib/chevre/service/notification.d.ts +3 -1
- package/lib/chevre/service/notification.js +41 -7
- package/lib/chevre/service/offer/event/authorize.d.ts +3 -0
- package/lib/chevre/service/offer/event/authorize.js +8 -2
- package/lib/chevre/service/offer/event/factory.d.ts +3 -0
- package/lib/chevre/service/offer/event/factory.js +36 -16
- package/lib/chevre/service/offer/event/importFromCOA.js +2 -2
- package/lib/chevre/service/offer/event/voidTransaction.d.ts +2 -0
- package/lib/chevre/service/offer/event/voidTransaction.js +17 -1
- package/lib/chevre/service/offer/eventServiceByCOA/factory.js +15 -8
- package/lib/chevre/service/offer/eventServiceByCOA.js +7 -9
- package/lib/chevre/service/offer/product/factory.js +13 -6
- package/lib/chevre/service/offer/product.js +2 -2
- package/lib/chevre/service/offer.d.ts +16 -8
- package/lib/chevre/service/offer.js +72 -9
- package/lib/chevre/service/order/createAccountingReportIfNotExist.js +31 -17
- package/lib/chevre/service/order/deleteOrder.d.ts +3 -1
- package/lib/chevre/service/order/deleteOrder.js +8 -8
- package/lib/chevre/service/order/onOrderStatusChanged/factory.d.ts +5 -2
- package/lib/chevre/service/order/onOrderStatusChanged/factory.js +41 -81
- package/lib/chevre/service/order/onOrderStatusChanged.js +3 -5
- package/lib/chevre/service/order/onOrderUpdated.d.ts +16 -0
- package/lib/chevre/service/order/onOrderUpdated.js +22 -0
- package/lib/chevre/service/order/placeOrder.d.ts +1 -0
- package/lib/chevre/service/order/placeOrder.js +45 -28
- package/lib/chevre/service/order/returnOrder.d.ts +1 -0
- package/lib/chevre/service/order/returnOrder.js +8 -13
- package/lib/chevre/service/order/sendOrder.d.ts +1 -0
- package/lib/chevre/service/order/sendOrder.js +10 -13
- package/lib/chevre/service/order.d.ts +2 -1
- package/lib/chevre/service/order.js +3 -1
- package/lib/chevre/service/payment/any/onPaid.js +1 -1
- package/lib/chevre/service/payment/any/onPaymentStatusChanged.js +4 -6
- package/lib/chevre/service/payment/any/onRefund.js +47 -43
- package/lib/chevre/service/payment/any.d.ts +9 -5
- package/lib/chevre/service/payment/any.js +80 -18
- package/lib/chevre/service/payment/creditCard.d.ts +1 -1
- package/lib/chevre/service/payment/creditCard.js +23 -17
- package/lib/chevre/service/payment/movieTicket/checkByIdentifier.d.ts +8 -7
- package/lib/chevre/service/payment/movieTicket/factory.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/getCredentials.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/getCredentials.js +1 -1
- package/lib/chevre/service/payment/movieTicket/validation.d.ts +6 -6
- package/lib/chevre/service/payment/movieTicket/validation.js +65 -37
- package/lib/chevre/service/payment/movieTicket.d.ts +2 -2
- package/lib/chevre/service/payment/movieTicket.js +7 -6
- package/lib/chevre/service/product.js +1 -5
- package/lib/chevre/service/report/telemetry.d.ts +0 -11
- package/lib/chevre/service/report/telemetry.js +21 -24
- package/lib/chevre/service/reserve/cancelReservation.d.ts +5 -3
- package/lib/chevre/service/reserve/cancelReservation.js +162 -142
- package/lib/chevre/service/reserve/checkInReservation.d.ts +9 -4
- package/lib/chevre/service/reserve/checkInReservation.js +77 -3
- package/lib/chevre/service/reserve/confirmReservation.d.ts +7 -4
- package/lib/chevre/service/reserve/confirmReservation.js +133 -58
- package/lib/chevre/service/reserve/factory.d.ts +1 -1
- package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.d.ts +17 -5
- package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.js +26 -24
- package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.js +2 -3
- package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.js +2 -31
- package/lib/chevre/service/reserve/potentialActions/onReservationUsed.js +2 -3
- package/lib/chevre/service/reserve/useReservation.d.ts +7 -3
- package/lib/chevre/service/reserve/useReservation.js +61 -71
- package/lib/chevre/service/reserve/verifyToken4reservation.d.ts +15 -0
- package/lib/chevre/service/reserve/verifyToken4reservation.js +56 -0
- package/lib/chevre/service/reserve.d.ts +3 -2
- package/lib/chevre/service/reserve.js +4 -2
- package/lib/chevre/service/task/aggregateScreeningEvent.js +1 -1
- package/lib/chevre/service/task/cancelPendingReservation.js +6 -2
- package/lib/chevre/service/task/cancelReservation.js +1 -1
- package/lib/chevre/service/task/confirmRegisterServiceTransaction.js +1 -1
- package/lib/chevre/service/task/deleteTransaction.js +12 -8
- package/lib/chevre/service/task/importOffersFromCOA.js +4 -0
- package/lib/chevre/service/task/onAuthorizationCreated.d.ts +7 -0
- package/lib/chevre/service/task/onAuthorizationCreated.js +108 -0
- package/lib/chevre/service/task/onEventChanged.d.ts +7 -0
- package/lib/chevre/service/task/{deleteOrder.js → onEventChanged.js} +8 -14
- package/lib/chevre/service/task/onResourceUpdated.d.ts +7 -0
- package/lib/chevre/service/task/onResourceUpdated.js +396 -0
- package/lib/chevre/service/task/placeOrder.js +1 -1
- package/lib/chevre/service/task/reserve.js +10 -7
- package/lib/chevre/service/task/returnOrder.js +1 -1
- package/lib/chevre/service/task/returnPayTransaction.js +2 -12
- package/lib/chevre/service/task/sendOrder.js +1 -1
- package/lib/chevre/service/task/syncScreeningRooms.d.ts +7 -0
- package/lib/chevre/service/task/syncScreeningRooms.js +24 -0
- package/lib/chevre/service/task/useReservation.d.ts +7 -0
- package/lib/chevre/service/task/useReservation.js +36 -0
- package/lib/chevre/service/task/voidReserveTransaction.js +4 -2
- package/lib/chevre/service/task.d.ts +6 -0
- package/lib/chevre/service/task.js +22 -4
- package/lib/chevre/service/transaction/deleteTransaction.d.ts +23 -0
- package/lib/chevre/service/transaction/deleteTransaction.js +360 -0
- package/lib/chevre/service/transaction/moneyTransfer/exportTasks/factory.js +12 -1
- package/lib/chevre/service/transaction/moneyTransfer/factory.d.ts +1 -1
- package/lib/chevre/service/transaction/moneyTransfer/factory.js +3 -1
- package/lib/chevre/service/transaction/moneyTransfer/potentialActions.d.ts +1 -0
- package/lib/chevre/service/transaction/moneyTransfer/potentialActions.js +1 -1
- package/lib/chevre/service/transaction/moneyTransfer.js +10 -13
- package/lib/chevre/service/transaction/orderProgramMembership/findCreditCard.js +1 -1
- package/lib/chevre/service/transaction/orderProgramMembership/findPaymentCardPermit.js +1 -1
- package/lib/chevre/service/transaction/orderProgramMembership.js +7 -3
- package/lib/chevre/service/transaction/placeOrder/exportTasks/factory.js +43 -30
- package/lib/chevre/service/transaction/placeOrder.js +1 -5
- package/lib/chevre/service/transaction/placeOrderInProgress/factory.js +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/givePointAward.js +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/moneyTransfer.d.ts +1 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/moneyTransfer.js +2 -2
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/registerService.d.ts +1 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/registerService.js +2 -2
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions/sendEmailMessage.js +4 -4
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.d.ts +1 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/potentialActions.js +3 -4
- package/lib/chevre/service/transaction/placeOrderInProgress/result/acceptedOffers.d.ts +3 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/result/acceptedOffers.js +15 -15
- package/lib/chevre/service/transaction/placeOrderInProgress/result.d.ts +1 -0
- package/lib/chevre/service/transaction/placeOrderInProgress/result.js +2 -2
- package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateMovieTicket.d.ts +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/validation/validateMovieTicket.js +2 -2
- package/lib/chevre/service/transaction/placeOrderInProgress/validation.d.ts +2 -1
- package/lib/chevre/service/transaction/placeOrderInProgress/validation.js +23 -17
- package/lib/chevre/service/transaction/placeOrderInProgress.d.ts +0 -3
- package/lib/chevre/service/transaction/placeOrderInProgress.js +28 -15
- package/lib/chevre/service/transaction/returnOrder/exportTasks/factory.js +11 -1
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnMoneyTransfer.js +2 -2
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPaymentMethod.js +30 -22
- package/lib/chevre/service/transaction/returnOrder/potentialActions/returnPointAward.js +2 -2
- package/lib/chevre/service/transaction/returnOrder/potentialActions/sendEmailMessage.js +3 -3
- package/lib/chevre/service/transaction/returnOrder/potentialActions.js +1 -1
- package/lib/chevre/service/transaction/returnOrder.d.ts +4 -0
- package/lib/chevre/service/transaction/returnOrder.js +228 -36
- package/lib/chevre/service/transaction.d.ts +7 -13
- package/lib/chevre/service/transaction.js +12 -139
- package/lib/chevre/settings.d.ts +15 -2
- package/lib/chevre/settings.js +58 -7
- package/package.json +3 -3
- package/example/src/chevre/eventCatalog2eventService.ts +0 -123
- package/example/src/chevre/migrateMoneyTransferPendingTransactionIdentifier.ts +0 -96
- package/example/src/chevre/migrateStockHolderKeys.ts +0 -89
- package/lib/chevre/service/task/deleteAssetTransaction.d.ts +0 -12
- package/lib/chevre/service/task/deleteAssetTransaction.js +0 -65
- package/lib/chevre/service/task/deleteOrder.d.ts +0 -6
|
@@ -56,12 +56,11 @@ function optimizeAction4report(action) {
|
|
|
56
56
|
endDate: action.endDate,
|
|
57
57
|
id: action.id,
|
|
58
58
|
object: optimizedPayActionObject,
|
|
59
|
-
|
|
59
|
+
// 最適化(2023-06-30~)
|
|
60
|
+
// project: action.project,
|
|
60
61
|
purpose: action.purpose,
|
|
61
62
|
startDate: action.startDate,
|
|
62
63
|
typeOf: action.typeOf
|
|
63
|
-
// 不要なので廃止(2022-05-19~)
|
|
64
|
-
// ...(maskedRecipient !== undefined) ? { recipient: <factory.action.trade.pay.IRecipient>maskedRecipient } : undefined
|
|
65
64
|
};
|
|
66
65
|
optimizedAction = optimizedPayAction;
|
|
67
66
|
break;
|
|
@@ -78,12 +77,11 @@ function optimizeAction4report(action) {
|
|
|
78
77
|
endDate: action.endDate,
|
|
79
78
|
id: action.id,
|
|
80
79
|
object: optimizedRefundActionObject,
|
|
81
|
-
|
|
80
|
+
// 最適化(2023-06-30~)
|
|
81
|
+
// project: action.project,
|
|
82
82
|
purpose: action.purpose,
|
|
83
83
|
startDate: action.startDate,
|
|
84
84
|
typeOf: action.typeOf
|
|
85
|
-
// 不要なので廃止(2022-05-19~)
|
|
86
|
-
// ...(maskedRecipient !== undefined) ? { recipient: maskedRecipient } : undefined
|
|
87
85
|
};
|
|
88
86
|
optimizedAction = optimizedRefundAction;
|
|
89
87
|
break;
|
|
@@ -21,7 +21,7 @@ const onPaymentStatusChanged_1 = require("./onPaymentStatusChanged");
|
|
|
21
21
|
*/
|
|
22
22
|
function onRefund(refundAction) {
|
|
23
23
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
var _a;
|
|
24
|
+
var _a, _b;
|
|
25
25
|
const aciton4inform = (0, factory_1.optimizeAction4inform)(refundAction);
|
|
26
26
|
const potentialActions = refundAction.potentialActions;
|
|
27
27
|
const now = new Date();
|
|
@@ -33,49 +33,53 @@ function onRefund(refundAction) {
|
|
|
33
33
|
}
|
|
34
34
|
const informPayment = potentialActions === null || potentialActions === void 0 ? void 0 : potentialActions.informPayment;
|
|
35
35
|
// 手数料決済があれば処理
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
36
|
+
// CreditCardIFのみ(2023-06-29~)
|
|
37
|
+
const paymentServiceType = (_a = refundAction.object[0]) === null || _a === void 0 ? void 0 : _a.typeOf;
|
|
38
|
+
if (paymentServiceType === factory.service.paymentService.PaymentServiceType.CreditCard) {
|
|
39
|
+
const refundFee = (_b = refundAction.object[0]) === null || _b === void 0 ? void 0 : _b.refundFee;
|
|
40
|
+
if (typeof refundFee === 'number' && refundFee > 0) {
|
|
41
|
+
const payObject = refundAction.object.map((o) => {
|
|
42
|
+
return {
|
|
43
|
+
typeOf: o.typeOf,
|
|
44
|
+
id: o.id,
|
|
45
|
+
paymentMethod: {
|
|
46
|
+
accountId: o.paymentMethod.accountId,
|
|
47
|
+
additionalProperty: o.paymentMethod.additionalProperty,
|
|
48
|
+
name: o.paymentMethod.name,
|
|
49
|
+
paymentMethodId: o.paymentMethod.paymentMethodId,
|
|
50
|
+
totalPaymentDue: {
|
|
51
|
+
typeOf: 'MonetaryAmount',
|
|
52
|
+
currency: factory.priceCurrency.JPY,
|
|
53
|
+
value: refundFee
|
|
54
|
+
},
|
|
55
|
+
typeOf: o.paymentMethod.typeOf
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
const payAction = {
|
|
60
|
+
project: refundAction.project,
|
|
61
|
+
typeOf: factory.actionType.PayAction,
|
|
62
|
+
object: payObject,
|
|
63
|
+
agent: refundAction.recipient,
|
|
64
|
+
recipient: refundAction.agent,
|
|
65
|
+
purpose: refundAction.purpose,
|
|
66
|
+
potentialActions: {
|
|
67
|
+
add2report: true,
|
|
68
|
+
informPayment: (Array.isArray(informPayment)) ? informPayment : []
|
|
53
69
|
}
|
|
54
70
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
};
|
|
68
|
-
const payTask = {
|
|
69
|
-
project: refundAction.project,
|
|
70
|
-
name: factory.taskName.Pay,
|
|
71
|
-
status: factory.taskStatus.Ready,
|
|
72
|
-
runsAt: now,
|
|
73
|
-
remainingNumberOfTries: 10,
|
|
74
|
-
numberOfTried: 0,
|
|
75
|
-
executionResults: [],
|
|
76
|
-
data: payAction
|
|
77
|
-
};
|
|
78
|
-
taskAttributes.push(payTask);
|
|
71
|
+
const payTask = {
|
|
72
|
+
project: refundAction.project,
|
|
73
|
+
name: factory.taskName.Pay,
|
|
74
|
+
status: factory.taskStatus.Ready,
|
|
75
|
+
runsAt: now,
|
|
76
|
+
remainingNumberOfTries: 10,
|
|
77
|
+
numberOfTried: 0,
|
|
78
|
+
executionResults: [],
|
|
79
|
+
data: payAction
|
|
80
|
+
};
|
|
81
|
+
taskAttributes.push(payTask);
|
|
82
|
+
}
|
|
79
83
|
}
|
|
80
84
|
if (Array.isArray(informPayment)) {
|
|
81
85
|
taskAttributes.push(...informPayment.map((a) => {
|
|
@@ -92,7 +96,7 @@ function onRefund(refundAction) {
|
|
|
92
96
|
}));
|
|
93
97
|
}
|
|
94
98
|
// タスク保管
|
|
95
|
-
return repos.task.saveMany(taskAttributes);
|
|
99
|
+
return repos.task.saveMany(taskAttributes, { emitImmediately: true });
|
|
96
100
|
});
|
|
97
101
|
}
|
|
98
102
|
exports.onRefund = onRefund;
|
|
@@ -108,10 +108,14 @@ declare function authorize(params: {
|
|
|
108
108
|
purpose: factory.action.authorize.paymentMethod.any.IPurpose;
|
|
109
109
|
paymentServiceType: factory.service.paymentService.PaymentServiceType;
|
|
110
110
|
location?: factory.action.trade.pay.ILocation;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
111
|
+
options: {
|
|
112
|
+
/**
|
|
113
|
+
* アクション失敗時に即時に決済取引を中止するかどうか
|
|
114
|
+
*/
|
|
115
|
+
useCancelPayTransactionOnFailed: boolean;
|
|
116
|
+
useCheckMovieTicketBeforePay: boolean;
|
|
117
|
+
useCheckByIdentifierIfNotYet: boolean;
|
|
118
|
+
useSearchTrade4accountId: boolean;
|
|
119
|
+
};
|
|
116
120
|
}): IAuthorizeOperation<IAuthorizePaymentAction>;
|
|
117
121
|
export { onPaymentStatusChanged, authorize, invalidatePaymentUrl, voidPayTransaction, person2username, processVoidPayTransaction, publishPaymentUrl };
|
|
@@ -52,10 +52,18 @@ exports.voidPayTransaction = voidPayTransaction;
|
|
|
52
52
|
function invalidatePaymentUrl(params) {
|
|
53
53
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
54
54
|
var _a, _b, _c, _d, _e;
|
|
55
|
+
if (params.purpose.typeOf !== factory.transactionType.PlaceOrder) {
|
|
56
|
+
throw new factory.errors.Argument('purpose.typeOf', `must be ${factory.transactionType.PlaceOrder}`);
|
|
57
|
+
}
|
|
55
58
|
const transaction = yield repos.transaction.findById({
|
|
56
59
|
typeOf: params.purpose.typeOf,
|
|
57
60
|
id: params.purpose.id
|
|
58
61
|
});
|
|
62
|
+
// 確定取引に対応(2023-05-03~)
|
|
63
|
+
if (transaction.status === factory.transactionStatusType.Confirmed) {
|
|
64
|
+
// no op
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
59
67
|
const paymentMethodIdByPaymentUrl = (_a = transaction.object.paymentMethods) === null || _a === void 0 ? void 0 : _a.paymentMethodId;
|
|
60
68
|
const paymentMethodType = (_b = transaction.object.paymentMethods) === null || _b === void 0 ? void 0 : _b.typeOf;
|
|
61
69
|
if (typeof paymentMethodIdByPaymentUrl === 'string' && paymentMethodIdByPaymentUrl.length > 0
|
|
@@ -70,12 +78,10 @@ function invalidatePaymentUrl(params) {
|
|
|
70
78
|
? transaction.seller.name
|
|
71
79
|
: String((_c = transaction.seller.name) === null || _c === void 0 ? void 0 : _c.ja),
|
|
72
80
|
id: transaction.seller.id
|
|
73
|
-
// project: transaction.seller.project
|
|
74
81
|
},
|
|
75
82
|
recipient: { typeOf: transaction.agent.typeOf, name: transaction.agent.name },
|
|
76
83
|
object: [{
|
|
77
84
|
typeOf: factory.service.paymentService.PaymentServiceType.CreditCard,
|
|
78
|
-
// tslint:disable-next-line:max-line-length
|
|
79
85
|
id: (_e = (_d = transaction.object.paymentMethods) === null || _d === void 0 ? void 0 : _d.issuedThrough) === null || _e === void 0 ? void 0 : _e.id,
|
|
80
86
|
paymentMethod: {
|
|
81
87
|
additionalProperty: [],
|
|
@@ -96,17 +102,20 @@ exports.invalidatePaymentUrl = invalidatePaymentUrl;
|
|
|
96
102
|
* apiもしくはタスクから決済承認を取り消す
|
|
97
103
|
*/
|
|
98
104
|
function processVoidPayTransaction(params) {
|
|
105
|
+
// tslint:disable-next-line:max-func-body-length
|
|
99
106
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
var _a, _b;
|
|
100
108
|
let transaction;
|
|
101
109
|
// アクションID指定の場合、進行中取引検証(2023-02-24~)
|
|
102
110
|
if (typeof params.id === 'string') {
|
|
103
111
|
transaction = yield repos.transaction.findInProgressById({ typeOf: params.purpose.typeOf, id: params.purpose.id });
|
|
104
112
|
}
|
|
105
113
|
else {
|
|
106
|
-
transaction = yield repos.transaction.findById({
|
|
114
|
+
transaction = (yield repos.transaction.findById({
|
|
107
115
|
typeOf: params.purpose.typeOf,
|
|
108
|
-
id: params.purpose.id
|
|
109
|
-
|
|
116
|
+
id: params.purpose.id,
|
|
117
|
+
inclusion: ['_id', 'typeOf', 'status', 'result.order.paymentMethods']
|
|
118
|
+
}));
|
|
110
119
|
}
|
|
111
120
|
// 承認アクションを取得
|
|
112
121
|
let authorizeActions;
|
|
@@ -122,7 +131,7 @@ function processVoidPayTransaction(params) {
|
|
|
122
131
|
const authorizeActionsOnTransaction = yield repos.action.searchByPurpose({
|
|
123
132
|
typeOf: factory.actionType.AuthorizeAction,
|
|
124
133
|
purpose: {
|
|
125
|
-
typeOf:
|
|
134
|
+
typeOf: transaction.typeOf,
|
|
126
135
|
id: transaction.id
|
|
127
136
|
}
|
|
128
137
|
});
|
|
@@ -131,12 +140,37 @@ function processVoidPayTransaction(params) {
|
|
|
131
140
|
return ((_a = a.object) === null || _a === void 0 ? void 0 : _a.typeOf) === factory.action.authorize.paymentMethod.any.ResultType.Payment
|
|
132
141
|
&& ((_b = a.instrument) === null || _b === void 0 ? void 0 : _b.identifier) === factory.action.authorize.paymentMethod.any.ServiceIdentifier.Chevre;
|
|
133
142
|
});
|
|
143
|
+
switch (transaction.status) {
|
|
144
|
+
case factory.transactionStatusType.InProgress:
|
|
145
|
+
throw new factory.errors.NotImplemented(`${transaction.status} not implemented`);
|
|
146
|
+
// 確定取引に対応(2023-05-03~)
|
|
147
|
+
case factory.transactionStatusType.Confirmed:
|
|
148
|
+
// アクションステータスを検証する
|
|
149
|
+
authorizeActions = authorizeActions.filter((a) => a.actionStatus !== factory.actionStatusType.CompletedActionStatus);
|
|
150
|
+
if (transaction.typeOf === factory.transactionType.PlaceOrder) {
|
|
151
|
+
const paymentMethodIds = (_b = (_a = transaction.result) === null || _a === void 0 ? void 0 : _a.order) === null || _b === void 0 ? void 0 : _b.paymentMethods.map((p) => {
|
|
152
|
+
return p.paymentMethodId;
|
|
153
|
+
});
|
|
154
|
+
if (!Array.isArray(paymentMethodIds)) {
|
|
155
|
+
throw new factory.errors.Argument('Transaction', `${transaction.id} must have result.order.paymentMethods`);
|
|
156
|
+
}
|
|
157
|
+
if (paymentMethodIds.length > 0) {
|
|
158
|
+
authorizeActions = authorizeActions.filter((a) => {
|
|
159
|
+
// paymentMethodIdが存在しない、あるいは、注文のpaymentMethodIdsに含まれなければ、アクション取消対象
|
|
160
|
+
const paymentMethodIdByAction = a.object.paymentMethodId;
|
|
161
|
+
const includedInOrder = typeof paymentMethodIdByAction === 'string'
|
|
162
|
+
&& paymentMethodIds.includes(paymentMethodIdByAction);
|
|
163
|
+
return !includedInOrder;
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
break;
|
|
168
|
+
default:
|
|
169
|
+
// no op
|
|
170
|
+
}
|
|
134
171
|
}
|
|
135
172
|
const errors = [];
|
|
136
173
|
for (const action of authorizeActions) {
|
|
137
|
-
// 直列にゆっくり処理する場合↓
|
|
138
|
-
// tslint:disable-next-line:no-magic-numbers
|
|
139
|
-
// await new Promise((resolve) => setTimeout(() => { resolve(); }, 1000));
|
|
140
174
|
// 失敗するケースがあっても、残りが少なくとも処理されるようにエラーハンドリング
|
|
141
175
|
try {
|
|
142
176
|
// 取引が存在すれば中止
|
|
@@ -194,7 +228,7 @@ function publishPaymentUrl(params) {
|
|
|
194
228
|
paymentUrl: result.paymentUrl,
|
|
195
229
|
issuedThrough: { id: (typeof startParams.object.id === 'string') ? startParams.object.id : '' }
|
|
196
230
|
};
|
|
197
|
-
yield repos.transaction.
|
|
231
|
+
yield repos.transaction.findByIdAndUpdateInProgress({
|
|
198
232
|
id: transaction.id,
|
|
199
233
|
update: { $set: { 'object.paymentMethods': paymentMethodByPaymentUrl } }
|
|
200
234
|
});
|
|
@@ -206,6 +240,7 @@ exports.publishPaymentUrl = publishPaymentUrl;
|
|
|
206
240
|
* 決済承認
|
|
207
241
|
*/
|
|
208
242
|
function authorize(params) {
|
|
243
|
+
// tslint:disable-next-line:max-func-body-length
|
|
209
244
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
210
245
|
var _a, _b;
|
|
211
246
|
const transaction = yield repos.transaction.findInProgressById({ typeOf: params.purpose.typeOf, id: params.purpose.id });
|
|
@@ -217,6 +252,21 @@ function authorize(params) {
|
|
|
217
252
|
const paymentMethodIdByTransaction = (_a = transaction.object.paymentMethods) === null || _a === void 0 ? void 0 : _a.paymentMethodId;
|
|
218
253
|
if (params.object.paymentMethodId === paymentMethodIdByTransaction) {
|
|
219
254
|
transactionNumber = params.object.paymentMethodId;
|
|
255
|
+
// 既に承認済であれば何もしない(2023-05-15~)
|
|
256
|
+
const existingCompletedAuthorizeActions = yield repos.action.searchByPurpose({
|
|
257
|
+
typeOf: factory.actionType.AuthorizeAction,
|
|
258
|
+
purpose: { id: transaction.id, typeOf: transaction.typeOf },
|
|
259
|
+
actionStatus: { $eq: factory.actionStatusType.CompletedActionStatus },
|
|
260
|
+
object: {
|
|
261
|
+
paymentMethodId: { $eq: transactionNumber },
|
|
262
|
+
typeOf: { $eq: factory.action.authorize.paymentMethod.any.ResultType.Payment }
|
|
263
|
+
},
|
|
264
|
+
sort: { startDate: factory.sortType.Ascending }
|
|
265
|
+
});
|
|
266
|
+
const existingCompletedAuthorizeAction = existingCompletedAuthorizeActions.shift();
|
|
267
|
+
if (existingCompletedAuthorizeAction !== undefined) {
|
|
268
|
+
return existingCompletedAuthorizeAction;
|
|
269
|
+
}
|
|
220
270
|
}
|
|
221
271
|
else {
|
|
222
272
|
// 取引にないpaymentMethodIdの指定はクライアントエラー
|
|
@@ -264,7 +314,11 @@ function authorize(params) {
|
|
|
264
314
|
transactionNumber: transactionNumber,
|
|
265
315
|
location: params.location
|
|
266
316
|
});
|
|
267
|
-
payTransaction = yield PayTransactionService.start(startParams,
|
|
317
|
+
payTransaction = yield PayTransactionService.start(startParams, {
|
|
318
|
+
useCheckMovieTicketBeforePay: params.options.useCheckMovieTicketBeforePay,
|
|
319
|
+
useCheckByIdentifierIfNotYet: params.options.useCheckByIdentifierIfNotYet,
|
|
320
|
+
searchTrade4accountId: params.options.useSearchTrade4accountId
|
|
321
|
+
})(repos);
|
|
268
322
|
}
|
|
269
323
|
catch (error) {
|
|
270
324
|
try {
|
|
@@ -275,13 +329,21 @@ function authorize(params) {
|
|
|
275
329
|
// no op
|
|
276
330
|
}
|
|
277
331
|
// 即時に決済取引を中止するか?(2023-02-03~)
|
|
278
|
-
if (params.useCancelPayTransactionOnFailed) {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
}
|
|
332
|
+
if (params.options.useCancelPayTransactionOnFailed) {
|
|
333
|
+
// abortエラーの場合は状態不明なので即時中止しない(2023-06-01~)
|
|
334
|
+
// {
|
|
335
|
+
// "type": "aborted",
|
|
336
|
+
// "message": "The user aborted a request.",
|
|
337
|
+
// "name": "AbortError"
|
|
338
|
+
// }
|
|
339
|
+
if (error.name !== 'AbortError') {
|
|
340
|
+
yield processVoidPayTransaction({
|
|
341
|
+
project: action.project,
|
|
342
|
+
agent: { id: action.project.id },
|
|
343
|
+
id: action.id,
|
|
344
|
+
purpose: action.purpose
|
|
345
|
+
})(repos);
|
|
346
|
+
}
|
|
285
347
|
}
|
|
286
348
|
throw error;
|
|
287
349
|
}
|
|
@@ -13,7 +13,7 @@ import { MongoRepository as TaskRepo } from '../../repo/task';
|
|
|
13
13
|
/**
|
|
14
14
|
* クレジットカード決済承認
|
|
15
15
|
*/
|
|
16
|
-
declare function authorize(params: factory.assetTransaction.pay.IStartParamsWithoutDetail, paymentServiceId: string): (repos: {
|
|
16
|
+
declare function authorize(params: factory.assetTransaction.pay.IStartParamsWithoutDetail, paymentServiceId: string, searchTrade4accountId: boolean): (repos: {
|
|
17
17
|
person: PersonRepo;
|
|
18
18
|
product: ProductRepo;
|
|
19
19
|
project: ProjectRepo;
|
|
@@ -21,11 +21,11 @@ const factory = require("../../factory");
|
|
|
21
21
|
const onPaid_1 = require("./any/onPaid");
|
|
22
22
|
const onRefund_1 = require("./any/onRefund");
|
|
23
23
|
const person2username_1 = require("./any/person2username");
|
|
24
|
-
const debug = createDebug('chevre-domain:service');
|
|
24
|
+
const debug = createDebug('chevre-domain:service:payment');
|
|
25
25
|
/**
|
|
26
26
|
* クレジットカード決済承認
|
|
27
27
|
*/
|
|
28
|
-
function authorize(params, paymentServiceId) {
|
|
28
|
+
function authorize(params, paymentServiceId, searchTrade4accountId) {
|
|
29
29
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
30
30
|
var _a, _b, _c, _d;
|
|
31
31
|
const project = yield repos.project.findById({ id: params.project.id });
|
|
@@ -65,19 +65,25 @@ function authorize(params, paymentServiceId) {
|
|
|
65
65
|
catch (error) {
|
|
66
66
|
throw handleAuthorizeError(error);
|
|
67
67
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
68
|
+
if (searchTrade4accountId) {
|
|
69
|
+
try {
|
|
70
|
+
const creditCardService = new GMO.service.Credit({ endpoint: String(availableChannel.serviceUrl) }, { timeout: credentials_1.credentials.gmo.timeout });
|
|
71
|
+
// ベストエフォートでクレジットカード詳細情報を取得
|
|
72
|
+
const startSearchTradeDate = Date.now();
|
|
73
|
+
debug('searchTrade processing...orderId:', orderId, startSearchTradeDate);
|
|
74
|
+
searchTradeResult = yield creditCardService.searchTrade({
|
|
75
|
+
shopId: shopId,
|
|
76
|
+
shopPass: shopPass,
|
|
77
|
+
orderId: orderId,
|
|
78
|
+
siteId: (_c = availableChannel.credentials) === null || _c === void 0 ? void 0 : _c.siteId,
|
|
79
|
+
sitePass: (_d = availableChannel.credentials) === null || _d === void 0 ? void 0 : _d.sitePass
|
|
80
|
+
});
|
|
81
|
+
debug('searchTrade processed. orderId:', orderId, 'execution time:', (Date.now() - startSearchTradeDate), 'ms');
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
// no op
|
|
85
|
+
debug('searchTrade throwed an error. orderId:', orderId, error);
|
|
86
|
+
}
|
|
81
87
|
}
|
|
82
88
|
return {
|
|
83
89
|
accountId: (searchTradeResult !== undefined) ? searchTradeResult.cardNo : '',
|
|
@@ -515,7 +521,7 @@ function processChangeTransaction(params) {
|
|
|
515
521
|
function getGMOInfoFromSeller(params) {
|
|
516
522
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
517
523
|
var _a, _b, _c, _d;
|
|
518
|
-
const seller = yield repos.seller.findById({ id: String(params.seller.id) });
|
|
524
|
+
const seller = yield repos.seller.findById({ id: String(params.seller.id) }, ['paymentAccepted', 'project'], []);
|
|
519
525
|
const paymentAccepted = (_a = seller.paymentAccepted) === null || _a === void 0 ? void 0 : _a.some((a) => a.paymentMethodType === params.paymentMethodType);
|
|
520
526
|
if (paymentAccepted !== true) {
|
|
521
527
|
throw new factory.errors.Argument('transaction', 'payment not accepted');
|
|
@@ -528,7 +534,7 @@ function getGMOInfoFromSeller(params) {
|
|
|
528
534
|
typeOf: { $eq: factory.service.paymentService.PaymentServiceType.CreditCard },
|
|
529
535
|
// serviceType: { codeValue: { $eq: params.paymentMethodType } },
|
|
530
536
|
id: { $eq: params.paymentServiceId }
|
|
531
|
-
});
|
|
537
|
+
}, [], []);
|
|
532
538
|
const paymentService = paymentServices.shift();
|
|
533
539
|
if (paymentService === undefined) {
|
|
534
540
|
throw new factory.errors.NotFound('PaymentService');
|
|
@@ -6,16 +6,17 @@ interface ICheckResult {
|
|
|
6
6
|
purchaseNumberAuthIn: factory.action.check.paymentMethod.movieTicket.IPurchaseNumberAuthIn;
|
|
7
7
|
purchaseNumberAuthResult: factory.action.check.paymentMethod.movieTicket.IPurchaseNumberAuthResult;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
* MovieTicket認証
|
|
11
|
-
*/
|
|
12
|
-
declare function checkByIdentifier(params: {
|
|
9
|
+
interface ICheckByIdentifierParams {
|
|
13
10
|
movieTickets: factory.action.check.paymentMethod.movieTicket.IMovieTicket[];
|
|
14
|
-
seller: factory.seller.ISeller
|
|
11
|
+
seller: Pick<factory.seller.ISeller, 'id' | 'project'>;
|
|
15
12
|
screeningEvent: IMinimizedIndividualEvent<factory.eventType.ScreeningEvent>;
|
|
16
13
|
paymentServiceId: string;
|
|
17
|
-
}
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* MovieTicket認証
|
|
17
|
+
*/
|
|
18
|
+
declare function checkByIdentifier(params: ICheckByIdentifierParams): (repos: {
|
|
18
19
|
product: ProductRepo;
|
|
19
20
|
project: ProjectRepo;
|
|
20
21
|
}) => Promise<ICheckResult>;
|
|
21
|
-
export { ICheckResult, checkByIdentifier };
|
|
22
|
+
export { ICheckByIdentifierParams, ICheckResult, checkByIdentifier };
|
|
@@ -6,7 +6,7 @@ export declare function createSeatInfoSyncIn(params: {
|
|
|
6
6
|
movieTickets: factory.action.trade.pay.IMovieTicket[];
|
|
7
7
|
event: factory.event.screeningEvent.IEvent;
|
|
8
8
|
purpose: factory.action.trade.pay.IPurpose;
|
|
9
|
-
seller: factory.seller.ISeller
|
|
9
|
+
seller: Pick<factory.seller.ISeller, 'paymentAccepted'>;
|
|
10
10
|
credentials: {
|
|
11
11
|
kgygishCd: string;
|
|
12
12
|
stCd: string;
|
|
@@ -2,7 +2,7 @@ import { MongoRepository as ProductRepo } from '../../../repo/product';
|
|
|
2
2
|
import * as factory from '../../../factory';
|
|
3
3
|
declare function getCredentials(params: {
|
|
4
4
|
paymentMethodType: string;
|
|
5
|
-
seller: factory.seller.ISeller
|
|
5
|
+
seller: Pick<factory.seller.ISeller, 'id' | 'project'>;
|
|
6
6
|
paymentServiceId: string;
|
|
7
7
|
}): (repos: {
|
|
8
8
|
product: ProductRepo;
|
|
@@ -22,7 +22,7 @@ function getCredentials(params) {
|
|
|
22
22
|
typeOf: { $eq: factory.service.paymentService.PaymentServiceType.MovieTicket },
|
|
23
23
|
// serviceType: { codeValue: { $eq: params.paymentMethodType } },
|
|
24
24
|
id: { $eq: params.paymentServiceId }
|
|
25
|
-
});
|
|
25
|
+
}, [], []);
|
|
26
26
|
const paymentService = paymentServices.shift();
|
|
27
27
|
if (paymentService === undefined) {
|
|
28
28
|
throw new factory.errors.NotFound('PaymentService');
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 決済取引サービス
|
|
3
|
-
*/
|
|
4
1
|
import * as factory from '../../../factory';
|
|
2
|
+
import { MongoRepository as ActionRepo } from '../../../repo/action';
|
|
5
3
|
import { MongoRepository as EventRepo } from '../../../repo/event';
|
|
6
4
|
import { MongoRepository as ProductRepo } from '../../../repo/product';
|
|
7
5
|
import { MongoRepository as ProjectRepo } from '../../../repo/project';
|
|
8
6
|
import { MongoRepository as SellerRepo } from '../../../repo/seller';
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
export declare function validateMovieTicket(params: factory.assetTransaction.pay.IStartParamsWithoutDetail, paymentServiceId: string, useCheckMovieTicketBeforePay: boolean, useCheckByIdentifierIfNotYet: boolean): (repos: {
|
|
8
|
+
action: ActionRepo;
|
|
11
9
|
event: EventRepo;
|
|
12
10
|
product: ProductRepo;
|
|
13
11
|
project: ProjectRepo;
|
|
14
12
|
seller: SellerRepo;
|
|
15
|
-
}) => Promise<
|
|
13
|
+
}) => Promise<{
|
|
14
|
+
accountsReceivablesByServiceType: factory.assetTransaction.pay.IAccountsReceivableByServiceType[];
|
|
15
|
+
}>;
|