@chevre/domain 21.18.0-alpha.7 → 21.18.0-alpha.9
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/searchAcceptedOfferIds.ts +18 -0
- package/lib/chevre/repo/acceptedOffer.d.ts +1 -1
- package/lib/chevre/service/assetTransaction/pay/potentialActions.d.ts +3 -1
- package/lib/chevre/service/assetTransaction/pay/potentialActions.js +1 -1
- package/lib/chevre/service/assetTransaction/pay.d.ts +2 -0
- package/lib/chevre/service/assetTransaction/pay.js +8 -5
- package/lib/chevre/service/order/confirmPayTransaction.d.ts +2 -0
- package/lib/chevre/service/order/confirmPayTransaction.js +1 -0
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +0 -3
- package/lib/chevre/service/order/onAssetTransactionStatusChanged.js +2 -4
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderCancelled/factory.d.ts +11 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderCancelled/factory.js +54 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderCancelled.d.ts +10 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderCancelled.js +38 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered/factory.d.ts +12 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered/factory.js +111 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered.d.ts +14 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderDelivered.js +83 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderPaymentDue.d.ts +10 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderPaymentDue.js +103 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/factory.d.ts +23 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing/factory.js +239 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.d.ts +13 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderProcessing.js +216 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned/factory.d.ts +10 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned/factory.js +110 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.d.ts +14 -0
- package/lib/chevre/service/order/onOrderStatusChanged/onOrderReturned.js +164 -0
- package/lib/chevre/service/order/onOrderStatusChanged.d.ts +9 -15
- package/lib/chevre/service/order/onOrderStatusChanged.js +11 -446
- package/lib/chevre/service/order/onOrderUpdated/factory.d.ts +6 -0
- package/lib/chevre/service/order/onOrderUpdated/factory.js +45 -0
- package/lib/chevre/service/order/onOrderUpdated.js +1 -1
- package/lib/chevre/service/order/payOrder.d.ts +0 -2
- package/lib/chevre/service/order/placeOrder.d.ts +0 -3
- package/lib/chevre/service/order/placeOrder.js +5 -10
- package/lib/chevre/service/order/returnOrder.d.ts +2 -2
- package/lib/chevre/service/order/returnOrder.js +9 -6
- package/lib/chevre/service/order/sendOrder.js +4 -3
- package/lib/chevre/service/order.d.ts +2 -2
- package/lib/chevre/service/order.js +2 -2
- package/lib/chevre/service/task/confirmPayTransaction.js +2 -1
- package/lib/chevre/service/task/onAssetTransactionStatusChanged.js +3 -6
- package/lib/chevre/service/task/onOrderPaymentCompleted.js +3 -6
- package/lib/chevre/service/task/placeOrder.js +8 -17
- package/lib/chevre/service/task/returnOrder.js +10 -17
- package/package.json +1 -1
- package/lib/chevre/service/order/onOrderStatusChanged/factory.d.ts +0 -42
- package/lib/chevre/service/order/onOrderStatusChanged/factory.js +0 -467
|
@@ -32,6 +32,24 @@ async function main() {
|
|
|
32
32
|
'acceptedOffers.itemOffered.issuedThrough.id'
|
|
33
33
|
);
|
|
34
34
|
console.log(productIds);
|
|
35
|
+
|
|
36
|
+
const locationBranchCodes = await acceptedOfferRepo.distinctValues(
|
|
37
|
+
{ orderNumber: { $in: ['CIN1-3743286-2441943', 'CIN4-3943511-3323473'] } },
|
|
38
|
+
'acceptedOffers.itemOffered.reservationFor.superEvent.location.branchCode'
|
|
39
|
+
);
|
|
40
|
+
console.log(locationBranchCodes);
|
|
41
|
+
|
|
42
|
+
const offeredThroughIdentifiers = await acceptedOfferRepo.distinctValues(
|
|
43
|
+
{ orderNumber: { $in: ['CIN1-3743286-2441943', 'CIN4-3943511-3323473'] } },
|
|
44
|
+
'acceptedOffers.offeredThrough.identifier'
|
|
45
|
+
);
|
|
46
|
+
console.log(offeredThroughIdentifiers);
|
|
47
|
+
|
|
48
|
+
const invalidValues = await acceptedOfferRepo.distinctValues(
|
|
49
|
+
{ orderNumber: { $in: ['CIN1-3743286-2441943', 'CIN4-3943511-3323473'] } },
|
|
50
|
+
<any>'invalidValues'
|
|
51
|
+
);
|
|
52
|
+
console.log(invalidValues);
|
|
35
53
|
}
|
|
36
54
|
|
|
37
55
|
main()
|
|
@@ -5,7 +5,7 @@ type IProjection4searchWithUnwoundAcceptedOffers = {
|
|
|
5
5
|
} & {
|
|
6
6
|
_id?: 0 | 1;
|
|
7
7
|
};
|
|
8
|
-
type IDistinctField = 'acceptedOffers.id' | 'acceptedOffers.itemOffered.reservationNumber' | 'acceptedOffers.itemOffered.reservationFor.id' | 'acceptedOffers.itemOffered.issuedThrough.id';
|
|
8
|
+
type IDistinctField = 'acceptedOffers.id' | 'acceptedOffers.itemOffered.reservationNumber' | 'acceptedOffers.itemOffered.reservationFor.id' | 'acceptedOffers.itemOffered.issuedThrough.id' | 'acceptedOffers.offeredThrough.identifier' | 'acceptedOffers.itemOffered.reservationFor.superEvent.location.branchCode';
|
|
9
9
|
/**
|
|
10
10
|
* 注文オファーリポジトリ
|
|
11
11
|
*/
|
|
@@ -6,5 +6,7 @@ export type IUnitPriceSpecification = factory.unitPriceOffer.IUnitPriceOfferPric
|
|
|
6
6
|
export declare function createPotentialActions(params: {
|
|
7
7
|
transaction: factory.assetTransaction.ITransaction<factory.assetTransactionType.Pay>;
|
|
8
8
|
potentialActions?: factory.assetTransaction.pay.IPotentialActionsParams;
|
|
9
|
-
order: factory.order.IOrder
|
|
9
|
+
order: factory.order.IOrder & {
|
|
10
|
+
acceptedOffers: factory.order.IAcceptedOffer<factory.order.IItemOffered>[];
|
|
11
|
+
};
|
|
10
12
|
}): factory.assetTransaction.IPotentialActions<factory.assetTransactionType.Pay>;
|
|
@@ -219,7 +219,7 @@ function movieTicket2reservation4invoice(movieTicket, order, paymentMethodType)
|
|
|
219
219
|
let reservationNumber = '';
|
|
220
220
|
let priceComponents4invoice = [];
|
|
221
221
|
// Orderから対象予約を取得
|
|
222
|
-
const reservationOffer = (_a = order
|
|
222
|
+
const reservationOffer = (_a = order.acceptedOffers) === null || _a === void 0 ? void 0 : _a.find((o) => {
|
|
223
223
|
var _a, _b, _c, _d;
|
|
224
224
|
let mvtkUnitPriceSpec;
|
|
225
225
|
// MovieTicket適用単価オファーからidentifierを取り出す
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as GMO from '@motionpicture/gmo-service';
|
|
5
5
|
import * as factory from '../../factory';
|
|
6
|
+
import type { MongoRepository as AcceptedOfferRepo } from '../../repo/acceptedOffer';
|
|
6
7
|
import type { MongoRepository as AccountingReportRepo } from '../../repo/accountingReport';
|
|
7
8
|
import type { MongoRepository as ActionRepo } from '../../repo/action';
|
|
8
9
|
import type { MongoRepository as AssetTransactionRepo } from '../../repo/assetTransaction';
|
|
@@ -38,6 +39,7 @@ export interface ICancelRepos {
|
|
|
38
39
|
}
|
|
39
40
|
export type ICancelOperation<T> = (repos: ICancelRepos) => Promise<T>;
|
|
40
41
|
export interface IConfirmRepos {
|
|
42
|
+
acceptedOffer: AcceptedOfferRepo;
|
|
41
43
|
action: ActionRepo;
|
|
42
44
|
accountingReport: AccountingReportRepo;
|
|
43
45
|
assetTransaction: AssetTransactionRepo;
|
|
@@ -365,25 +365,28 @@ exports.confirm = confirm;
|
|
|
365
365
|
function fixOrderAsPurpose(params, transaction) {
|
|
366
366
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
367
367
|
var _a, _b, _c, _d, _e, _f;
|
|
368
|
-
let order;
|
|
369
368
|
const payPurposeConfirmationNumber = (_c = (_b = (_a = params.potentialActions) === null || _a === void 0 ? void 0 : _a.pay) === null || _b === void 0 ? void 0 : _b.purpose) === null || _c === void 0 ? void 0 : _c.confirmationNumber;
|
|
370
369
|
const payPurposeOrderNumber = (_f = (_e = (_d = params.potentialActions) === null || _d === void 0 ? void 0 : _d.pay) === null || _e === void 0 ? void 0 : _e.purpose) === null || _f === void 0 ? void 0 : _f.orderNumber;
|
|
371
370
|
if (typeof payPurposeConfirmationNumber !== 'string' || payPurposeConfirmationNumber.length === 0
|
|
372
371
|
|| typeof payPurposeOrderNumber !== 'string' || payPurposeOrderNumber.length === 0) {
|
|
373
372
|
throw new factory.errors.ArgumentNull('potentialActions.pay.purpose');
|
|
374
373
|
}
|
|
375
|
-
const
|
|
374
|
+
const ordersWithoutAcceptedOffers = yield repos.order.search({
|
|
376
375
|
limit: 1,
|
|
377
376
|
page: 1,
|
|
378
377
|
project: { id: { $eq: transaction.project.id } },
|
|
379
378
|
confirmationNumbers: [payPurposeConfirmationNumber],
|
|
380
379
|
orderNumbers: [payPurposeOrderNumber]
|
|
381
380
|
});
|
|
382
|
-
|
|
383
|
-
if (
|
|
381
|
+
const orderWithoutAcceptedOffers = ordersWithoutAcceptedOffers.shift();
|
|
382
|
+
if (orderWithoutAcceptedOffers === undefined) {
|
|
384
383
|
throw new factory.errors.NotFound('Order as purpose');
|
|
385
384
|
}
|
|
386
|
-
|
|
385
|
+
// 全acceptedOffersを検索(2023-12-06~)
|
|
386
|
+
const acceptedOffers = yield repos.acceptedOffer.searchAcceptedOffers({
|
|
387
|
+
orderNumbers: [orderWithoutAcceptedOffers.orderNumber]
|
|
388
|
+
});
|
|
389
|
+
return Object.assign(Object.assign({}, orderWithoutAcceptedOffers), { acceptedOffers });
|
|
387
390
|
});
|
|
388
391
|
}
|
|
389
392
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as factory from '../../factory';
|
|
2
|
+
import type { MongoRepository as AcceptedOfferRepo } from '../../repo/acceptedOffer';
|
|
2
3
|
import type { MongoRepository as AccountingReportRepo } from '../../repo/accountingReport';
|
|
3
4
|
import type { MongoRepository as ActionRepo } from '../../repo/action';
|
|
4
5
|
import type { MongoRepository as AssetTransactionRepo } from '../../repo/assetTransaction';
|
|
@@ -9,6 +10,7 @@ import type { MongoRepository as ProjectRepo } from '../../repo/project';
|
|
|
9
10
|
import type { MongoRepository as TaskRepo } from '../../repo/task';
|
|
10
11
|
import type { MongoRepository as TransactionRepo } from '../../repo/transaction';
|
|
11
12
|
declare function confirmPayTransaction(data: factory.task.IData<factory.taskName.ConfirmPayTransaction>): (repos: {
|
|
13
|
+
acceptedOffer: AcceptedOfferRepo;
|
|
12
14
|
action: ActionRepo;
|
|
13
15
|
assetTransaction: AssetTransactionRepo;
|
|
14
16
|
order: OrderRepo;
|
|
@@ -30,6 +30,7 @@ function confirmPayTransaction(data) {
|
|
|
30
30
|
} }, (typeof ((_b = (_a = confirmingTransaction.object) === null || _a === void 0 ? void 0 : _a.paymentMethod) === null || _b === void 0 ? void 0 : _b.identifier) === 'string')
|
|
31
31
|
? { object: { paymentMethod: { identifier: confirmingTransaction.object.paymentMethod.identifier } } }
|
|
32
32
|
: undefined))({
|
|
33
|
+
acceptedOffer: repos.acceptedOffer,
|
|
33
34
|
action: repos.action,
|
|
34
35
|
accountingReport: repos.accountingReport,
|
|
35
36
|
assetTransaction: repos.assetTransaction,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { RedisRepository as RegisterServiceInProgressRepo } from '../../repo/action/registerServiceInProgress';
|
|
2
1
|
import type { MongoRepository as AssetTransactionRepo } from '../../repo/assetTransaction';
|
|
3
2
|
import type { MongoRepository as OrderRepo } from '../../repo/order';
|
|
4
3
|
import type { MongoRepository as TaskRepo } from '../../repo/task';
|
|
@@ -7,7 +6,6 @@ import * as factory from '../../factory';
|
|
|
7
6
|
declare function onAssetTransactionStatusChanged(params: factory.task.IData<factory.taskName.OnAssetTransactionStatusChanged>): (repos: {
|
|
8
7
|
assetTransaction: AssetTransactionRepo;
|
|
9
8
|
order: OrderRepo;
|
|
10
|
-
registerActionInProgress: RegisterServiceInProgressRepo;
|
|
11
9
|
task: TaskRepo;
|
|
12
10
|
transaction: TransactionRepo;
|
|
13
11
|
}) => Promise<void>;
|
|
@@ -20,7 +18,6 @@ declare function paymentDue2Processing(params: {
|
|
|
20
18
|
useOnOrderStatusChanged: boolean;
|
|
21
19
|
}): (repos: {
|
|
22
20
|
order: OrderRepo;
|
|
23
|
-
registerActionInProgress: RegisterServiceInProgressRepo;
|
|
24
21
|
task: TaskRepo;
|
|
25
22
|
transaction: TransactionRepo;
|
|
26
23
|
}) => Promise<void>;
|
|
@@ -166,12 +166,11 @@ function paymentDue2Processing(params) {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
if (params.useOnOrderStatusChanged) {
|
|
169
|
-
yield (0, onOrderStatusChanged_1.
|
|
169
|
+
yield (0, onOrderStatusChanged_1.onOrderProcessing)({
|
|
170
170
|
order: Object.assign(Object.assign({}, order), { orderStatus: factory.orderStatus.OrderProcessing // 強制的にOrderProcessingとして処理する
|
|
171
171
|
}),
|
|
172
172
|
placeOrderTransaction
|
|
173
173
|
})({
|
|
174
|
-
registerActionInProgress: repos.registerActionInProgress,
|
|
175
174
|
task: repos.task
|
|
176
175
|
});
|
|
177
176
|
}
|
|
@@ -212,12 +211,11 @@ function cancelOrderIfExist(params) {
|
|
|
212
211
|
throw error;
|
|
213
212
|
}
|
|
214
213
|
if (params.useOnOrderStatusChanged) {
|
|
215
|
-
yield (0, onOrderStatusChanged_1.
|
|
214
|
+
yield (0, onOrderStatusChanged_1.onOrderCancelled)({
|
|
216
215
|
order: Object.assign(Object.assign({}, order), { orderStatus: factory.orderStatus.OrderCancelled // 強制的にOrderCancelledとして処理する
|
|
217
216
|
}),
|
|
218
217
|
placeOrderTransaction
|
|
219
218
|
})({
|
|
220
|
-
registerActionInProgress: repos.registerActionInProgress,
|
|
221
219
|
task: repos.task
|
|
222
220
|
});
|
|
223
221
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 注文ステータス変更時処理
|
|
3
|
+
*/
|
|
4
|
+
import * as factory from '../../../../factory';
|
|
5
|
+
/**
|
|
6
|
+
* 注文中止時のアクション
|
|
7
|
+
*/
|
|
8
|
+
declare function createOnOrderCancelledTasksByTransaction(params: {
|
|
9
|
+
transaction?: factory.transaction.placeOrder.ITransaction;
|
|
10
|
+
}): (import("@chevre/factory/lib/task").IAttributes | import("@chevre/factory/lib/task/confirmMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/confirmRegisterService").IAttributes | import("@chevre/factory/lib/task/confirmPayTransaction").IAttributes | import("@chevre/factory/lib/task/confirmRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/confirmReserveTransaction").IAttributes | import("@chevre/factory/lib/task/createEvent").IAttributes | import("@chevre/factory/lib/task/deleteTransaction").IAttributes | import("@chevre/factory/lib/task/givePointAward").IAttributes | import("@chevre/factory/lib/task/onAssetTransactionStatusChanged").IAttributes | import("@chevre/factory/lib/task/onAuthorizationCreated").IAttributes | import("@chevre/factory/lib/task/onEventChanged").IAttributes | import("@chevre/factory/lib/task/onResourceUpdated").IAttributes | import("@chevre/factory/lib/task/onOrderPaymentCompleted").IAttributes | import("@chevre/factory/lib/task/placeOrder").IAttributes | import("@chevre/factory/lib/task/returnOrder").IAttributes | import("@chevre/factory/lib/task/returnMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/returnPayTransaction").IAttributes | import("@chevre/factory/lib/task/returnPointAward").IAttributes | import("@chevre/factory/lib/task/returnReserveTransaction").IAttributes | import("@chevre/factory/lib/task/sendEmailMessage").IAttributes | import("@chevre/factory/lib/task/sendOrder").IAttributes | import("@chevre/factory/lib/task/syncScreeningRooms").IAttributes | import("@chevre/factory/lib/task/triggerWebhook").IAttributes | import("@chevre/factory/lib/task/useReservation").IAttributes | import("@chevre/factory/lib/task/voidMoneyTransferTransaction").IAttributes | import("@chevre/factory/lib/task/voidPayTransaction").IAttributes | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/voidReserveTransaction").IAttributes)[];
|
|
11
|
+
export { createOnOrderCancelledTasksByTransaction };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createOnOrderCancelledTasksByTransaction = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* 注文ステータス変更時処理
|
|
6
|
+
*/
|
|
7
|
+
const factory = require("../../../../factory");
|
|
8
|
+
/**
|
|
9
|
+
* 注文中止時のアクション
|
|
10
|
+
*/
|
|
11
|
+
function createOnOrderCancelledTasksByTransaction(params) {
|
|
12
|
+
var _a;
|
|
13
|
+
const now = new Date();
|
|
14
|
+
const taskAttributes = [];
|
|
15
|
+
if (typeof ((_a = params.transaction) === null || _a === void 0 ? void 0 : _a.id) === 'string') {
|
|
16
|
+
const voidPaymentTaskAttributes = {
|
|
17
|
+
project: params.transaction.project,
|
|
18
|
+
name: factory.taskName.VoidPayTransaction,
|
|
19
|
+
status: factory.taskStatus.Ready,
|
|
20
|
+
runsAt: now,
|
|
21
|
+
remainingNumberOfTries: 10,
|
|
22
|
+
numberOfTried: 0,
|
|
23
|
+
executionResults: [],
|
|
24
|
+
data: {
|
|
25
|
+
project: params.transaction.project,
|
|
26
|
+
purpose: {
|
|
27
|
+
typeOf: params.transaction.typeOf,
|
|
28
|
+
id: params.transaction.id,
|
|
29
|
+
result: { order: { orderStatus: factory.orderStatus.OrderCancelled } }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const voidReserveTaskAttributes = {
|
|
34
|
+
project: params.transaction.project,
|
|
35
|
+
name: factory.taskName.VoidReserveTransaction,
|
|
36
|
+
status: factory.taskStatus.Ready,
|
|
37
|
+
runsAt: now,
|
|
38
|
+
remainingNumberOfTries: 10,
|
|
39
|
+
numberOfTried: 0,
|
|
40
|
+
executionResults: [],
|
|
41
|
+
data: {
|
|
42
|
+
project: params.transaction.project,
|
|
43
|
+
purpose: {
|
|
44
|
+
typeOf: params.transaction.typeOf,
|
|
45
|
+
id: params.transaction.id,
|
|
46
|
+
result: { order: { orderStatus: factory.orderStatus.OrderCancelled } }
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
taskAttributes.push(voidPaymentTaskAttributes, voidReserveTaskAttributes);
|
|
51
|
+
}
|
|
52
|
+
return taskAttributes;
|
|
53
|
+
}
|
|
54
|
+
exports.createOnOrderCancelledTasksByTransaction = createOnOrderCancelledTasksByTransaction;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MongoRepository as TaskRepo } from '../../../repo/task';
|
|
2
|
+
import * as factory from '../../../factory';
|
|
3
|
+
type IPlaceOrderTransaction = factory.transaction.ITransaction<factory.transactionType.PlaceOrder>;
|
|
4
|
+
declare function onOrderCancelled(params: {
|
|
5
|
+
order: factory.order.IOrder;
|
|
6
|
+
placeOrderTransaction?: IPlaceOrderTransaction;
|
|
7
|
+
}): (repos: {
|
|
8
|
+
task: TaskRepo;
|
|
9
|
+
}) => Promise<void>;
|
|
10
|
+
export { onOrderCancelled };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.onOrderCancelled = void 0;
|
|
13
|
+
/**
|
|
14
|
+
* 注文中止時処理
|
|
15
|
+
*/
|
|
16
|
+
const createDebug = require("debug");
|
|
17
|
+
const factory = require("../../../factory");
|
|
18
|
+
const factory_1 = require("./onOrderCancelled/factory");
|
|
19
|
+
const debug = createDebug('chevre-domain:service:order');
|
|
20
|
+
function onOrderCancelled(params) {
|
|
21
|
+
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
debug('onOrderStatusChanged called.', params.order.orderNumber, params.order.orderStatus, params.order.orderDate);
|
|
23
|
+
let tasks = [];
|
|
24
|
+
switch (params.order.orderStatus) {
|
|
25
|
+
// OrderCancelled追加(2023-08-30~)
|
|
26
|
+
case factory.orderStatus.OrderCancelled:
|
|
27
|
+
// 注文取引中止時と同様の処理か
|
|
28
|
+
tasks = [
|
|
29
|
+
...(0, factory_1.createOnOrderCancelledTasksByTransaction)({ transaction: params.placeOrderTransaction })
|
|
30
|
+
];
|
|
31
|
+
break;
|
|
32
|
+
default:
|
|
33
|
+
throw new factory.errors.NotImplemented(`${params.order.orderStatus} not implemented`);
|
|
34
|
+
}
|
|
35
|
+
yield repos.task.saveMany(tasks, { emitImmediately: true });
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
exports.onOrderCancelled = onOrderCancelled;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as factory from '../../../../factory';
|
|
2
|
+
type IDeliveredOrder = factory.order.IOrder & {
|
|
3
|
+
orderStatus: factory.orderStatus.OrderDelivered;
|
|
4
|
+
};
|
|
5
|
+
declare function createInformTasks(order: IDeliveredOrder): factory.task.IAttributes<factory.taskName.TriggerWebhook>[];
|
|
6
|
+
/**
|
|
7
|
+
* 注文配送後のアクション
|
|
8
|
+
*/
|
|
9
|
+
declare function createOnOrderSentTasksByTransaction(params: {
|
|
10
|
+
potentialActions?: factory.action.transfer.send.order.IPotentialActions;
|
|
11
|
+
}): (import("@chevre/factory/lib/task").IAttributes | import("@chevre/factory/lib/task/confirmMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/confirmRegisterService").IAttributes | import("@chevre/factory/lib/task/confirmPayTransaction").IAttributes | import("@chevre/factory/lib/task/confirmRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/confirmReserveTransaction").IAttributes | import("@chevre/factory/lib/task/createEvent").IAttributes | import("@chevre/factory/lib/task/deleteTransaction").IAttributes | import("@chevre/factory/lib/task/givePointAward").IAttributes | import("@chevre/factory/lib/task/onAssetTransactionStatusChanged").IAttributes | import("@chevre/factory/lib/task/onAuthorizationCreated").IAttributes | import("@chevre/factory/lib/task/onEventChanged").IAttributes | import("@chevre/factory/lib/task/onResourceUpdated").IAttributes | import("@chevre/factory/lib/task/onOrderPaymentCompleted").IAttributes | import("@chevre/factory/lib/task/placeOrder").IAttributes | import("@chevre/factory/lib/task/returnOrder").IAttributes | import("@chevre/factory/lib/task/returnMoneyTransfer").IAttributes | import("@chevre/factory/lib/task/returnPayTransaction").IAttributes | import("@chevre/factory/lib/task/returnPointAward").IAttributes | import("@chevre/factory/lib/task/returnReserveTransaction").IAttributes | import("@chevre/factory/lib/task/sendEmailMessage").IAttributes | import("@chevre/factory/lib/task/sendOrder").IAttributes | import("@chevre/factory/lib/task/syncScreeningRooms").IAttributes | import("@chevre/factory/lib/task/triggerWebhook").IAttributes | import("@chevre/factory/lib/task/useReservation").IAttributes | import("@chevre/factory/lib/task/voidMoneyTransferTransaction").IAttributes | import("@chevre/factory/lib/task/voidPayTransaction").IAttributes | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").IAttributes | import("@chevre/factory/lib/task/voidReserveTransaction").IAttributes)[];
|
|
12
|
+
export { createInformTasks, createOnOrderSentTasksByTransaction };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.createOnOrderSentTasksByTransaction = exports.createInformTasks = void 0;
|
|
5
|
+
const factory = require("../../../../factory");
|
|
6
|
+
const settings_1 = require("../../../../settings");
|
|
7
|
+
const informOrder = (_a = settings_1.settings.onOrderStatusChanged) === null || _a === void 0 ? void 0 : _a.informOrder;
|
|
8
|
+
function createInformTasks(order) {
|
|
9
|
+
const taskRunsAt = new Date();
|
|
10
|
+
let informTasks = [];
|
|
11
|
+
if (Array.isArray(informOrder) && informOrder.length > 0) {
|
|
12
|
+
const order4inform = creteOrder4inform(order);
|
|
13
|
+
let recipientId = '';
|
|
14
|
+
recipientId = order.customer.id;
|
|
15
|
+
informTasks = informOrder.map((informOrderParams) => {
|
|
16
|
+
var _a, _b;
|
|
17
|
+
const informActionAttributes = {
|
|
18
|
+
agent: order.project,
|
|
19
|
+
object: order4inform,
|
|
20
|
+
project: order.project,
|
|
21
|
+
recipient: {
|
|
22
|
+
url: (_a = informOrderParams.recipient) === null || _a === void 0 ? void 0 : _a.url,
|
|
23
|
+
id: recipientId,
|
|
24
|
+
name: (_b = informOrderParams.recipient) === null || _b === void 0 ? void 0 : _b.name,
|
|
25
|
+
typeOf: factory.creativeWorkType.WebApplication
|
|
26
|
+
},
|
|
27
|
+
typeOf: factory.actionType.InformAction
|
|
28
|
+
};
|
|
29
|
+
return {
|
|
30
|
+
project: order.project,
|
|
31
|
+
name: factory.taskName.TriggerWebhook,
|
|
32
|
+
status: factory.taskStatus.Ready,
|
|
33
|
+
runsAt: taskRunsAt,
|
|
34
|
+
remainingNumberOfTries: 10,
|
|
35
|
+
numberOfTried: 0,
|
|
36
|
+
executionResults: [],
|
|
37
|
+
data: informActionAttributes
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return informTasks;
|
|
42
|
+
}
|
|
43
|
+
exports.createInformTasks = createInformTasks;
|
|
44
|
+
function creteOrder4inform(order) {
|
|
45
|
+
// 配送済注文通知内容を最適化(2022-12-29~)
|
|
46
|
+
return Object.assign({ project: order.project, typeOf: order.typeOf, orderNumber: order.orderNumber, orderStatus: order.orderStatus }, (typeof order.id === 'string') ? { id: order.id } : undefined);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* 注文配送後のアクション
|
|
50
|
+
*/
|
|
51
|
+
function createOnOrderSentTasksByTransaction(params) {
|
|
52
|
+
const potentialActions = params.potentialActions;
|
|
53
|
+
const now = new Date();
|
|
54
|
+
const taskAttributes = [];
|
|
55
|
+
// tslint:disable-next-line:no-single-line-block-comment
|
|
56
|
+
/* istanbul ignore else */
|
|
57
|
+
if (potentialActions !== undefined) {
|
|
58
|
+
if (Array.isArray(potentialActions.registerService)) {
|
|
59
|
+
taskAttributes.push(...potentialActions.registerService.map((a) => {
|
|
60
|
+
return {
|
|
61
|
+
project: a.project,
|
|
62
|
+
name: factory.taskName.ConfirmRegisterService,
|
|
63
|
+
status: factory.taskStatus.Ready,
|
|
64
|
+
runsAt: now,
|
|
65
|
+
remainingNumberOfTries: 10,
|
|
66
|
+
numberOfTried: 0,
|
|
67
|
+
executionResults: [],
|
|
68
|
+
data: a
|
|
69
|
+
};
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
// 通貨転送
|
|
73
|
+
// tslint:disable-next-line:no-single-line-block-comment
|
|
74
|
+
/* istanbul ignore else */
|
|
75
|
+
if (Array.isArray(potentialActions.moneyTransfer)) {
|
|
76
|
+
taskAttributes.push(...potentialActions.moneyTransfer.map((a) => {
|
|
77
|
+
return {
|
|
78
|
+
project: a.project,
|
|
79
|
+
name: factory.taskName.ConfirmMoneyTransfer,
|
|
80
|
+
status: factory.taskStatus.Ready,
|
|
81
|
+
runsAt: now,
|
|
82
|
+
remainingNumberOfTries: 10,
|
|
83
|
+
numberOfTried: 0,
|
|
84
|
+
executionResults: [],
|
|
85
|
+
data: a
|
|
86
|
+
};
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
// tslint:disable-next-line:no-single-line-block-comment
|
|
90
|
+
/* istanbul ignore else */
|
|
91
|
+
if (Array.isArray(potentialActions.sendEmailMessage)) {
|
|
92
|
+
potentialActions.sendEmailMessage.forEach((s) => {
|
|
93
|
+
const sendEmailMessageTask = {
|
|
94
|
+
project: s.project,
|
|
95
|
+
name: factory.taskName.SendEmailMessage,
|
|
96
|
+
status: factory.taskStatus.Ready,
|
|
97
|
+
runsAt: now,
|
|
98
|
+
remainingNumberOfTries: 3,
|
|
99
|
+
numberOfTried: 0,
|
|
100
|
+
executionResults: [],
|
|
101
|
+
data: {
|
|
102
|
+
actionAttributes: s
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
taskAttributes.push(sendEmailMessageTask);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return taskAttributes;
|
|
110
|
+
}
|
|
111
|
+
exports.createOnOrderSentTasksByTransaction = createOnOrderSentTasksByTransaction;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { RedisRepository as RegisterServiceInProgressRepo } from '../../../repo/action/registerServiceInProgress';
|
|
2
|
+
import type { MongoRepository as TaskRepo } from '../../../repo/task';
|
|
3
|
+
import * as factory from '../../../factory';
|
|
4
|
+
type IPlaceOrderTransaction = factory.transaction.ITransaction<factory.transactionType.PlaceOrder>;
|
|
5
|
+
declare function onOrderDelivered(params: {
|
|
6
|
+
order: Omit<factory.order.IOrder, 'orderStatus'> & {
|
|
7
|
+
orderStatus: factory.orderStatus.OrderDelivered;
|
|
8
|
+
};
|
|
9
|
+
placeOrderTransaction?: IPlaceOrderTransaction;
|
|
10
|
+
}): (repos: {
|
|
11
|
+
registerActionInProgress: RegisterServiceInProgressRepo;
|
|
12
|
+
task: TaskRepo;
|
|
13
|
+
}) => Promise<void>;
|
|
14
|
+
export { onOrderDelivered };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.onOrderDelivered = void 0;
|
|
13
|
+
/**
|
|
14
|
+
* 注文ステータス変更時処理
|
|
15
|
+
*/
|
|
16
|
+
const createDebug = require("debug");
|
|
17
|
+
const factory = require("../../../factory");
|
|
18
|
+
const product_1 = require("../../offer/product");
|
|
19
|
+
const factory_1 = require("./onOrderDelivered/factory");
|
|
20
|
+
const debug = createDebug('chevre-domain:service:order');
|
|
21
|
+
function onOrderDelivered(params) {
|
|
22
|
+
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
23
|
+
var _a, _b, _c, _d, _e;
|
|
24
|
+
debug('onOrderStatusChanged called.', params.order.orderNumber, params.order.orderStatus, params.order.orderDate);
|
|
25
|
+
let tasks = [];
|
|
26
|
+
// const maskedCustomer = createMaskedCustomer(params.order, { noProfile: true });
|
|
27
|
+
// const simpleOrder: factory.order.ISimpleOrder = {
|
|
28
|
+
// typeOf: params.order.typeOf,
|
|
29
|
+
// seller: {
|
|
30
|
+
// id: params.order.seller.id,
|
|
31
|
+
// typeOf: params.order.seller.typeOf,
|
|
32
|
+
// name: params.order.seller.name
|
|
33
|
+
// },
|
|
34
|
+
// customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id },
|
|
35
|
+
// orderNumber: params.order.orderNumber,
|
|
36
|
+
// price: params.order.price,
|
|
37
|
+
// priceCurrency: params.order.priceCurrency,
|
|
38
|
+
// orderDate: params.order.orderDate
|
|
39
|
+
// };
|
|
40
|
+
switch (params.order.orderStatus) {
|
|
41
|
+
case factory.orderStatus.OrderDelivered:
|
|
42
|
+
tasks = [
|
|
43
|
+
...(0, factory_1.createInformTasks)(params.order),
|
|
44
|
+
// 取引のpotentialActionsを適用(2023-08-17~)
|
|
45
|
+
...(0, factory_1.createOnOrderSentTasksByTransaction)({
|
|
46
|
+
potentialActions: (_e = (_d = (_c = (_b = (_a = params.placeOrderTransaction) === null || _a === void 0 ? void 0 : _a.potentialActions) === null || _b === void 0 ? void 0 : _b.order) === null || _c === void 0 ? void 0 : _c.potentialActions) === null || _d === void 0 ? void 0 : _d.sendOrder) === null || _e === void 0 ? void 0 : _e.potentialActions
|
|
47
|
+
})
|
|
48
|
+
];
|
|
49
|
+
// プロダクト登録プロセスロック解除
|
|
50
|
+
try {
|
|
51
|
+
const placeOrderTransaction = params.placeOrderTransaction;
|
|
52
|
+
if (typeof (placeOrderTransaction === null || placeOrderTransaction === void 0 ? void 0 : placeOrderTransaction.id) === 'string') {
|
|
53
|
+
// プロダクト登録プロセスロック解除(orderからproductIdを抽出する)
|
|
54
|
+
if (Array.isArray(params.order.acceptedOffers)) {
|
|
55
|
+
const productIds4unlock = params.order.acceptedOffers
|
|
56
|
+
.filter((o) => {
|
|
57
|
+
var _a;
|
|
58
|
+
return o.itemOffered.typeOf === factory.permit.PermitType.Permit
|
|
59
|
+
&& typeof ((_a = o.itemOffered.issuedThrough) === null || _a === void 0 ? void 0 : _a.id) === 'string'
|
|
60
|
+
&& o.itemOffered.issuedThrough.id.length > 0;
|
|
61
|
+
})
|
|
62
|
+
.map((o) => { var _a; return String((_a = o.itemOffered.issuedThrough) === null || _a === void 0 ? void 0 : _a.id); });
|
|
63
|
+
yield Promise.all(productIds4unlock.map((productId) => __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
yield (0, product_1.processUnlockRegisterMembershipService)({
|
|
65
|
+
agent: { id: String(params.order.customer.id) },
|
|
66
|
+
product: { id: productId },
|
|
67
|
+
purpose: { typeOf: placeOrderTransaction.typeOf, id: placeOrderTransaction.id }
|
|
68
|
+
})(repos);
|
|
69
|
+
})));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
throw error;
|
|
75
|
+
}
|
|
76
|
+
break;
|
|
77
|
+
default:
|
|
78
|
+
throw new factory.errors.NotImplemented(`${params.order.orderStatus} not implemented`);
|
|
79
|
+
}
|
|
80
|
+
yield repos.task.saveMany(tasks, { emitImmediately: true });
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
exports.onOrderDelivered = onOrderDelivered;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MongoRepository as TaskRepo } from '../../../repo/task';
|
|
2
|
+
import * as factory from '../../../factory';
|
|
3
|
+
declare function onOrderPaymentDue(params: {
|
|
4
|
+
order: Omit<factory.order.IOrder, 'orderStatus'> & {
|
|
5
|
+
orderStatus: factory.orderStatus.OrderPaymentDue;
|
|
6
|
+
};
|
|
7
|
+
}): (repos: {
|
|
8
|
+
task: TaskRepo;
|
|
9
|
+
}) => Promise<void>;
|
|
10
|
+
export { onOrderPaymentDue };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.onOrderPaymentDue = void 0;
|
|
13
|
+
/**
|
|
14
|
+
* 注文決済時処理
|
|
15
|
+
*/
|
|
16
|
+
const createDebug = require("debug");
|
|
17
|
+
const factory = require("../../../factory");
|
|
18
|
+
const order_1 = require("../../../factory/order");
|
|
19
|
+
const debug = createDebug('chevre-domain:service:order');
|
|
20
|
+
function onOrderPaymentDue(params) {
|
|
21
|
+
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
debug('onOrderStatusChanged called.', params.order.orderNumber, params.order.orderStatus, params.order.orderDate);
|
|
23
|
+
let tasks = [];
|
|
24
|
+
const maskedCustomer = (0, order_1.createMaskedCustomer)(params.order, { noProfile: true });
|
|
25
|
+
const simpleOrder = {
|
|
26
|
+
typeOf: params.order.typeOf,
|
|
27
|
+
seller: {
|
|
28
|
+
id: params.order.seller.id,
|
|
29
|
+
typeOf: params.order.seller.typeOf,
|
|
30
|
+
name: params.order.seller.name
|
|
31
|
+
},
|
|
32
|
+
customer: { typeOf: maskedCustomer.typeOf, id: maskedCustomer.id },
|
|
33
|
+
orderNumber: params.order.orderNumber,
|
|
34
|
+
price: params.order.price,
|
|
35
|
+
priceCurrency: params.order.priceCurrency,
|
|
36
|
+
orderDate: params.order.orderDate
|
|
37
|
+
};
|
|
38
|
+
switch (params.order.orderStatus) {
|
|
39
|
+
// OrderPaymentDueを追加(2023-08-23~)
|
|
40
|
+
case factory.orderStatus.OrderPaymentDue:
|
|
41
|
+
tasks = [
|
|
42
|
+
...yield createConfirmPayTransactionTasks(params.order, simpleOrder)(repos)
|
|
43
|
+
];
|
|
44
|
+
break;
|
|
45
|
+
default:
|
|
46
|
+
throw new factory.errors.NotImplemented(`${params.order.orderStatus} not implemented`);
|
|
47
|
+
}
|
|
48
|
+
yield repos.task.saveMany(tasks, { emitImmediately: true });
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
exports.onOrderPaymentDue = onOrderPaymentDue;
|
|
52
|
+
function createConfirmPayTransactionTasks(order, simpleOrder) {
|
|
53
|
+
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
const taskRunsAt = new Date();
|
|
55
|
+
const tasks = [];
|
|
56
|
+
yield Promise.all(order.paymentMethods.map((invoice) => __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
// PaymentAutomaticallyAppliedであれば、自動決済処理を実行(2023-08-24~)
|
|
58
|
+
if (invoice.paymentStatus !== factory.paymentStatusType.PaymentAutomaticallyApplied) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
// 冗長なタスク作成を回避
|
|
62
|
+
const existingTasks = yield repos.task.search({
|
|
63
|
+
limit: 1,
|
|
64
|
+
page: 1,
|
|
65
|
+
project: { id: { $eq: order.project.id } },
|
|
66
|
+
name: factory.taskName.ConfirmPayTransaction,
|
|
67
|
+
data: {
|
|
68
|
+
object: { transactionNumber: { $eq: invoice.paymentMethodId } },
|
|
69
|
+
purpose: { orderNumber: { $eq: order.orderNumber } }
|
|
70
|
+
}
|
|
71
|
+
}, {
|
|
72
|
+
data: 0, executionResults: 0, name: 0, numberOfTried: 0,
|
|
73
|
+
remainingNumberOfTries: 0, runsAt: 0, status: 0
|
|
74
|
+
});
|
|
75
|
+
if (existingTasks.length === 0) {
|
|
76
|
+
const data = {
|
|
77
|
+
project: order.project,
|
|
78
|
+
typeOf: factory.actionType.ConfirmAction,
|
|
79
|
+
object: [{ typeOf: factory.assetTransactionType.Pay, transactionNumber: invoice.paymentMethodId }],
|
|
80
|
+
agent: order.project,
|
|
81
|
+
purpose: Object.assign(Object.assign({}, simpleOrder), { confirmationNumber: order.confirmationNumber }),
|
|
82
|
+
instrument: {
|
|
83
|
+
typeOf: 'WebAPI',
|
|
84
|
+
identifier: factory.action.authorize.paymentMethod.any.ServiceIdentifier.Chevre
|
|
85
|
+
},
|
|
86
|
+
processOrder: order.orderStatus === factory.orderStatus.OrderPaymentDue,
|
|
87
|
+
useOnOrderStatusChanged: true
|
|
88
|
+
};
|
|
89
|
+
tasks.push({
|
|
90
|
+
project: order.project,
|
|
91
|
+
name: factory.taskName.ConfirmPayTransaction,
|
|
92
|
+
status: factory.taskStatus.Ready,
|
|
93
|
+
runsAt: taskRunsAt,
|
|
94
|
+
remainingNumberOfTries: 10,
|
|
95
|
+
numberOfTried: 0,
|
|
96
|
+
executionResults: [],
|
|
97
|
+
data
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
})));
|
|
101
|
+
return tasks;
|
|
102
|
+
});
|
|
103
|
+
}
|