@chevre/domain 21.34.0-alpha.12 → 21.34.0-alpha.14
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/example/src/chevre/transaction/processPlaceOrder.ts +0 -1
- package/lib/chevre/service/assetTransaction/pay.d.ts +0 -1
- package/lib/chevre/service/assetTransaction/pay.js +3 -3
- package/lib/chevre/service/payment/any.d.ts +0 -1
- package/lib/chevre/service/payment/any.js +1 -1
- package/lib/chevre/service/payment/movieTicket/authorize.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/authorize.js +2 -2
- package/lib/chevre/service/payment/movieTicket/validation.d.ts +1 -1
- package/lib/chevre/service/payment/movieTicket/validation.js +1 -5
- package/package.json +3 -3
|
@@ -15,12 +15,12 @@ async function main() {
|
|
|
15
15
|
typeOf: { $eq: chevre.factory.actionType.CheckAction },
|
|
16
16
|
actionStatus: { $eq: chevre.factory.actionStatusType.CompletedActionStatus },
|
|
17
17
|
startDate: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
$lte: moment()
|
|
19
|
+
// tslint:disable-next-line:no-magic-numbers
|
|
20
|
+
.add(-28, 'days'),
|
|
21
21
|
$gte: moment()
|
|
22
22
|
// tslint:disable-next-line:no-magic-numbers
|
|
23
|
-
.add(-
|
|
23
|
+
.add(-180, 'days')
|
|
24
24
|
},
|
|
25
25
|
'object.typeOf': { $exists: true, $eq: chevre.factory.service.paymentService.PaymentServiceType.MovieTicket }
|
|
26
26
|
},
|
|
@@ -111,7 +111,6 @@ export import IPaymentAgencyTransaction = CreditCardPayment.IPaymentAgencyTransa
|
|
|
111
111
|
* 取引開始
|
|
112
112
|
*/
|
|
113
113
|
export declare function start(params: factory.assetTransaction.pay.IStartParamsWithoutDetail, options: {
|
|
114
|
-
useCheckMovieTicketBeforePay: boolean;
|
|
115
114
|
useCheckByIdentifierIfNotYet: boolean;
|
|
116
115
|
pendingPaymentAgencyTransaction?: CreditCardPayment.IPaymentAgencyTransaction;
|
|
117
116
|
/**
|
|
@@ -223,7 +223,7 @@ function start(params, options) {
|
|
|
223
223
|
break;
|
|
224
224
|
case factory.service.paymentService.PaymentServiceType.MovieTicket:
|
|
225
225
|
transaction =
|
|
226
|
-
yield processAuthorizeMovieTicket(params, transaction, String(paymentService === null || paymentService === void 0 ? void 0 : paymentService.id), options.
|
|
226
|
+
yield processAuthorizeMovieTicket(params, transaction, String(paymentService === null || paymentService === void 0 ? void 0 : paymentService.id), options.useCheckByIdentifierIfNotYet, {
|
|
227
227
|
executor: (typeof ((_d = options.executor) === null || _d === void 0 ? void 0 : _d.id) === 'string') ? { id: options.executor.id } : {}
|
|
228
228
|
})(repos);
|
|
229
229
|
break;
|
|
@@ -389,9 +389,9 @@ function processAuthorizeCreditCard(params, transaction, paymentServiceId, optio
|
|
|
389
389
|
})(repos);
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
|
-
function processAuthorizeMovieTicket(params, transaction, paymentServiceId,
|
|
392
|
+
function processAuthorizeMovieTicket(params, transaction, paymentServiceId, useCheckByIdentifierIfNotYet, options) {
|
|
393
393
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
394
|
-
const { accountId, payAction, accountsReceivablesByServiceType } = yield MovieTicketPayment.authorize(params, transaction, paymentServiceId,
|
|
394
|
+
const { accountId, payAction, accountsReceivablesByServiceType } = yield MovieTicketPayment.authorize(params, transaction, paymentServiceId, useCheckByIdentifierIfNotYet, options)(repos);
|
|
395
395
|
const payActionInObject = {
|
|
396
396
|
actionStatus: payAction.actionStatus,
|
|
397
397
|
id: payAction.id,
|
|
@@ -132,7 +132,6 @@ declare function authorize(params: {
|
|
|
132
132
|
* アクション失敗時に即時に決済取引を中止するかどうか
|
|
133
133
|
*/
|
|
134
134
|
useCancelPayTransactionOnFailed: boolean;
|
|
135
|
-
useCheckMovieTicketBeforePay: boolean;
|
|
136
135
|
useCheckByIdentifierIfNotYet: boolean;
|
|
137
136
|
useUnlockTransactionProcess: boolean;
|
|
138
137
|
};
|
|
@@ -381,7 +381,7 @@ function authorize(params) {
|
|
|
381
381
|
location: params.location,
|
|
382
382
|
order: Object.assign({}, (typeof confirmationNumber === 'string') ? { confirmationNumber } : undefined)
|
|
383
383
|
});
|
|
384
|
-
payTransaction = yield PayTransactionService.start(startParams, Object.assign({
|
|
384
|
+
payTransaction = yield PayTransactionService.start(startParams, Object.assign({ useCheckByIdentifierIfNotYet: params.options.useCheckByIdentifierIfNotYet, executor: (typeof taskId === 'string') ? { id: taskId } : {} }, (pendingPaymentAgencyTransaction !== undefined) ? { pendingPaymentAgencyTransaction } : undefined))(repos);
|
|
385
385
|
}
|
|
386
386
|
catch (error) {
|
|
387
387
|
try {
|
|
@@ -15,7 +15,7 @@ interface IAuthorizeResult {
|
|
|
15
15
|
* 決済カード承認
|
|
16
16
|
* オーソリサービスが存在するわけではないので、実質着券する
|
|
17
17
|
*/
|
|
18
|
-
declare function authorize(params: factory.assetTransaction.pay.IStartParamsWithoutDetail, transaction: factory.assetTransaction.pay.ITransaction, paymentServiceId: string,
|
|
18
|
+
declare function authorize(params: factory.assetTransaction.pay.IStartParamsWithoutDetail, transaction: factory.assetTransaction.pay.ITransaction, paymentServiceId: string, useCheckByIdentifierIfNotYet: boolean, options: {
|
|
19
19
|
/**
|
|
20
20
|
* 実行者
|
|
21
21
|
*/
|
|
@@ -18,7 +18,7 @@ const validation_1 = require("./validation");
|
|
|
18
18
|
* 決済カード承認
|
|
19
19
|
* オーソリサービスが存在するわけではないので、実質着券する
|
|
20
20
|
*/
|
|
21
|
-
function authorize(params, transaction, paymentServiceId,
|
|
21
|
+
function authorize(params, transaction, paymentServiceId, useCheckByIdentifierIfNotYet, options) {
|
|
22
22
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
23
23
|
var _a, _b;
|
|
24
24
|
let accountId;
|
|
@@ -26,7 +26,7 @@ function authorize(params, transaction, paymentServiceId, useCheckMovieTicketBef
|
|
|
26
26
|
let accountsReceivablesByServiceType = [];
|
|
27
27
|
try {
|
|
28
28
|
// MovieTicket決済の場合、認証
|
|
29
|
-
const validateMovieTicketResult = yield (0, validation_1.validateMovieTicket)(params, paymentServiceId,
|
|
29
|
+
const validateMovieTicketResult = yield (0, validation_1.validateMovieTicket)(params, paymentServiceId, useCheckByIdentifierIfNotYet)(repos);
|
|
30
30
|
accountsReceivablesByServiceType = validateMovieTicketResult.accountsReceivablesByServiceType;
|
|
31
31
|
const paymentMethod = transaction.object.paymentMethod;
|
|
32
32
|
const paymentMethodType = String(paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.identifier);
|
|
@@ -4,7 +4,7 @@ import type { MongoRepository as EventRepo } from '../../../repo/event';
|
|
|
4
4
|
import type { MongoRepository as PaymentServiceRepo } from '../../../repo/paymentService';
|
|
5
5
|
import type { MongoRepository as PaymentServiceProviderRepo } from '../../../repo/paymentServiceProvider';
|
|
6
6
|
import type { MongoRepository as PaymentAcceptedRepo } from '../../../repo/sellerPaymentAccepted';
|
|
7
|
-
export declare function validateMovieTicket(params: factory.assetTransaction.pay.IStartParamsWithoutDetail, paymentServiceId: string,
|
|
7
|
+
export declare function validateMovieTicket(params: factory.assetTransaction.pay.IStartParamsWithoutDetail, paymentServiceId: string, useCheckByIdentifierIfNotYet: boolean): (repos: {
|
|
8
8
|
action: ActionRepo;
|
|
9
9
|
event: EventRepo;
|
|
10
10
|
paymentAccepted: PaymentAcceptedRepo;
|
|
@@ -14,7 +14,7 @@ const createDebug = require("debug");
|
|
|
14
14
|
const factory = require("../../../factory");
|
|
15
15
|
const processPurchaseNumberAuth_1 = require("./processPurchaseNumberAuth");
|
|
16
16
|
const debug = createDebug('chevre-domain:service:payment');
|
|
17
|
-
function validateMovieTicket(params, paymentServiceId,
|
|
17
|
+
function validateMovieTicket(params, paymentServiceId, useCheckByIdentifierIfNotYet) {
|
|
18
18
|
// tslint:disable-next-line:max-func-body-length
|
|
19
19
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
20
20
|
var _a, _b, _c;
|
|
@@ -73,10 +73,6 @@ function validateMovieTicket(params, paymentServiceId, useCheckMovieTicketBefore
|
|
|
73
73
|
if (paymentAccepted !== true) {
|
|
74
74
|
throw new factory.errors.Argument('recipient', `payment not accepted [${paymentMethodType}]`);
|
|
75
75
|
}
|
|
76
|
-
// オプション追加(2023-03-06~)
|
|
77
|
-
if (!useCheckMovieTicketBeforePay) {
|
|
78
|
-
return { accountsReceivablesByServiceType: [] };
|
|
79
|
-
}
|
|
80
76
|
const checkResult = yield checkByIdentifierIfNotYet({
|
|
81
77
|
movieTicketIdentifier,
|
|
82
78
|
movieTickets: movieTickets,
|
package/package.json
CHANGED
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@aws-sdk/credential-providers": "3.433.0",
|
|
13
|
-
"@chevre/factory": "4.374.0-alpha.
|
|
13
|
+
"@chevre/factory": "4.374.0-alpha.22",
|
|
14
14
|
"@cinerino/sdk": "7.1.0",
|
|
15
15
|
"@motionpicture/coa-service": "9.4.0",
|
|
16
16
|
"@motionpicture/gmo-service": "5.3.0",
|
|
17
17
|
"@sendgrid/mail": "6.4.0",
|
|
18
|
-
"@surfrock/sdk": "1.3.0
|
|
18
|
+
"@surfrock/sdk": "1.3.0",
|
|
19
19
|
"cdigit": "2.6.7",
|
|
20
20
|
"debug": "^3.2.7",
|
|
21
21
|
"google-libphonenumber": "^3.2.18",
|
|
@@ -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.14"
|
|
114
114
|
}
|