@chevre/domain 21.7.0-alpha.2 → 21.7.0-alpha.4

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.
@@ -7,7 +7,7 @@ exports.createStartParams = void 0;
7
7
  const factory = require("../../../factory");
8
8
  // tslint:disable-next-line:cyclomatic-complexity max-func-body-length
9
9
  function createStartParams(params) {
10
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
10
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
11
11
  const paymentServiceId = (params.paymentService !== undefined)
12
12
  ? String(params.paymentService.id)
13
13
  : '';
@@ -25,14 +25,14 @@ function createStartParams(params) {
25
25
  totalPaymentDue = {
26
26
  typeOf: 'MonetaryAmount',
27
27
  currency: factory.priceCurrency.JPY,
28
- value: Number(params.amount)
28
+ value: params.amount
29
29
  };
30
30
  break;
31
31
  case factory.service.paymentService.PaymentServiceType.CreditCard:
32
32
  totalPaymentDue = {
33
33
  typeOf: 'MonetaryAmount',
34
34
  currency: factory.priceCurrency.JPY,
35
- value: Number(params.amount)
35
+ value: params.amount
36
36
  };
37
37
  break;
38
38
  case factory.service.paymentService.PaymentServiceType.MovieTicket:
@@ -56,34 +56,64 @@ function createStartParams(params) {
56
56
  }
57
57
  const informPaymentParams = createInformPaymentParams({ paymentService: params.paymentService });
58
58
  const accountId = (_g = params.object.paymentMethod) === null || _g === void 0 ? void 0 : _g.accountId;
59
- const creditCardAsPaymentServiceOutputCurrency = (_k = (_j = (_h = params.paymentService) === null || _h === void 0 ? void 0 : _h.serviceOutput) === null || _j === void 0 ? void 0 : _j.amount) === null || _k === void 0 ? void 0 : _k.currency;
60
- const paymentMethod = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ additionalProperty: (Array.isArray((_l = params.object.paymentMethod) === null || _l === void 0 ? void 0 : _l.additionalProperty))
61
- ? (_m = params.object.paymentMethod) === null || _m === void 0 ? void 0 : _m.additionalProperty
62
- : [], name: (typeof ((_o = params.object.paymentMethod) === null || _o === void 0 ? void 0 : _o.name) === 'string')
59
+ // currencyはデフォルトでJPY
60
+ // let paymentMethodCurrency: string = factory.priceCurrency.JPY;
61
+ // if (params.paymentServiceType === factory.service.paymentService.PaymentServiceType.PaymentCard) {
62
+ // // ひとまず使用していないので空文字
63
+ // paymentMethodCurrency = '';
64
+ // } else if (params.paymentServiceType === factory.service.paymentService.PaymentServiceType.CreditCard) {
65
+ // // カード通貨区分が存在すれば適用
66
+ // const creditCardAsPaymentServiceOutputCurrency = params.paymentService?.serviceOutput?.paymentMethod?.amount?.currency;
67
+ // if (typeof creditCardAsPaymentServiceOutputCurrency === 'string') {
68
+ // paymentMethodCurrency = creditCardAsPaymentServiceOutputCurrency;
69
+ // }
70
+ // }
71
+ // const paymentMethodAmount: factory.assetTransaction.pay.IPaymentMethodAmount = {
72
+ // typeOf: 'MonetaryAmount',
73
+ // currency: paymentMethodCurrency,
74
+ // value: params.amount
75
+ // };
76
+ const paymentMethod = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ additionalProperty: (Array.isArray((_h = params.object.paymentMethod) === null || _h === void 0 ? void 0 : _h.additionalProperty))
77
+ ? (_j = params.object.paymentMethod) === null || _j === void 0 ? void 0 : _j.additionalProperty
78
+ : [], name: (typeof ((_k = params.object.paymentMethod) === null || _k === void 0 ? void 0 : _k.name) === 'string')
63
79
  ? params.object.paymentMethod.name
64
- : paymentMethodType, amount: params.amount, paymentMethodId: params.transactionNumber, typeOf: paymentMethodType }, (typeof ((_p = params.object.paymentMethod) === null || _p === void 0 ? void 0 : _p.description) === 'string')
65
- ? { description: (_q = params.object.paymentMethod) === null || _q === void 0 ? void 0 : _q.description }
80
+ : paymentMethodType,
81
+ // tslint:disable-next-line:no-suspicious-comment
82
+ // TODO MonetaryAmount対応(2023-08-14~)
83
+ amount: params.amount,
84
+ // amount: paymentMethodAmount,
85
+ paymentMethodId: params.transactionNumber, typeOf: paymentMethodType }, (typeof ((_l = params.object.paymentMethod) === null || _l === void 0 ? void 0 : _l.description) === 'string')
86
+ ? { description: (_m = params.object.paymentMethod) === null || _m === void 0 ? void 0 : _m.description }
66
87
  : undefined), (totalPaymentDue !== undefined)
67
88
  ? { totalPaymentDue: totalPaymentDue }
68
- : undefined), (typeof accountId === 'string') ? { accountId: accountId } : undefined), (typeof ((_r = params.object.paymentMethod) === null || _r === void 0 ? void 0 : _r.method) === 'string')
69
- ? { method: (_s = params.object.paymentMethod) === null || _s === void 0 ? void 0 : _s.method }
70
- : undefined), (((_t = params.object.paymentMethod) === null || _t === void 0 ? void 0 : _t.creditCard) !== undefined)
71
- ? { creditCard: (_u = params.object.paymentMethod) === null || _u === void 0 ? void 0 : _u.creditCard }
72
- : undefined), (Array.isArray((_v = params.object.paymentMethod) === null || _v === void 0 ? void 0 : _v.movieTickets))
73
- ? { movieTickets: (_w = params.object.paymentMethod) === null || _w === void 0 ? void 0 : _w.movieTickets }
89
+ : undefined), (typeof accountId === 'string') ? { accountId: accountId } : undefined), (typeof ((_o = params.object.paymentMethod) === null || _o === void 0 ? void 0 : _o.method) === 'string')
90
+ ? { method: (_p = params.object.paymentMethod) === null || _p === void 0 ? void 0 : _p.method }
91
+ : undefined), (((_q = params.object.paymentMethod) === null || _q === void 0 ? void 0 : _q.creditCard) !== undefined)
92
+ ? { creditCard: (_r = params.object.paymentMethod) === null || _r === void 0 ? void 0 : _r.creditCard }
93
+ : undefined), (Array.isArray((_s = params.object.paymentMethod) === null || _s === void 0 ? void 0 : _s.movieTickets))
94
+ ? { movieTickets: (_t = params.object.paymentMethod) === null || _t === void 0 ? void 0 : _t.movieTickets }
74
95
  : undefined);
75
- const serviceOutput = (typeof creditCardAsPaymentServiceOutputCurrency === 'string')
76
- ? {
77
- amount: {
78
- currency: creditCardAsPaymentServiceOutputCurrency,
79
- value: paymentMethod.amount // 通貨区分としての金額
80
- }
81
- }
82
- : undefined;
83
- const object = Object.assign({
96
+ // const serviceOutput: factory.order.IOrderPaymentMethodIssuedThroughServiceOutput | undefined =
97
+ // (typeof creditCardAsPaymentServiceOutputCurrency === 'string')
98
+ // ? {
99
+ // amount: {
100
+ // currency: creditCardAsPaymentServiceOutputCurrency, // カード通貨区分
101
+ // value: paymentMethod.amount // 通貨区分としての金額
102
+ // }
103
+ // }
104
+ // : undefined;
105
+ const object = {
84
106
  // パラメータから必要なもののみ取り込む
85
- accountId: (typeof accountId === 'string') ? accountId : '', paymentMethodId: params.transactionNumber, typeOf: params.paymentServiceType, id: paymentServiceId, onPaymentStatusChanged: { informPayment: informPaymentParams }, paymentMethod }, (typeof serviceOutput !== undefined) ? { serviceOutput } : undefined);
86
- return Object.assign({ project: { typeOf: factory.organizationType.Project, id: params.project.id }, transactionNumber: params.transactionNumber, typeOf: factory.assetTransactionType.Pay, agent: params.agent, recipient: params.recipient, object, expires: params.expires }, (typeof ((_x = params.location) === null || _x === void 0 ? void 0 : _x.typeOf) === 'string')
107
+ accountId: (typeof accountId === 'string') ? accountId : '',
108
+ paymentMethodId: params.transactionNumber,
109
+ typeOf: params.paymentServiceType,
110
+ id: paymentServiceId,
111
+ onPaymentStatusChanged: { informPayment: informPaymentParams },
112
+ paymentMethod
113
+ // CreditCardIFのカード通貨区分を追加(2023-08-07~)
114
+ // ...(typeof serviceOutput !== undefined) ? { serviceOutput } : undefined
115
+ };
116
+ return Object.assign({ project: { typeOf: factory.organizationType.Project, id: params.project.id }, transactionNumber: params.transactionNumber, typeOf: factory.assetTransactionType.Pay, agent: params.agent, recipient: params.recipient, object, expires: params.expires }, (typeof ((_u = params.location) === null || _u === void 0 ? void 0 : _u.typeOf) === 'string')
87
117
  ? { location: params.location }
88
118
  : undefined);
89
119
  }
@@ -28,7 +28,7 @@ function createPayActions(params) {
28
28
  }
29
29
  return payActions;
30
30
  }
31
- // tslint:disable-next-line:cyclomatic-complexity
31
+ // tslint:disable-next-line:cyclomatic-complexity max-func-body-length
32
32
  function createPayObject(params) {
33
33
  var _a;
34
34
  const transaction = params.transaction;
@@ -37,12 +37,20 @@ function createPayObject(params) {
37
37
  const additionalProperty = paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.additionalProperty;
38
38
  const paymentMethodId = (typeof (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.paymentMethodId) === 'string') ? paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.paymentMethodId : transaction.id;
39
39
  const paymentMethodName = (typeof (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.name) === 'string') ? paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.name : paymentMethodType;
40
+ // MonetaryAmount対応(2023-08-13~)
41
+ const paymentMethodAmountValue = (typeof (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.amount) === 'number')
42
+ ? paymentMethod.amount
43
+ : paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.amount.value;
40
44
  const paymentServiceOutput = createPayObjectServiceOutput(params);
41
45
  let payObject;
42
46
  switch (transaction.object.typeOf) {
43
47
  case factory.service.paymentService.PaymentServiceType.FaceToFace:
44
48
  // 対面決済ではとりあえず問答無用にJPY
45
- const totalPaymentDue4faceToFace = { typeOf: 'MonetaryAmount', currency: factory.priceCurrency.JPY, value: Number(paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.amount) };
49
+ const totalPaymentDue4faceToFace = {
50
+ typeOf: 'MonetaryAmount',
51
+ currency: factory.priceCurrency.JPY,
52
+ value: paymentMethodAmountValue
53
+ };
46
54
  payObject = {
47
55
  typeOf: transaction.object.typeOf,
48
56
  id: (typeof transaction.object.id === 'string') ? transaction.object.id : '',
@@ -52,7 +60,11 @@ function createPayObject(params) {
52
60
  case factory.service.paymentService.PaymentServiceType.PaymentCard:
53
61
  const totalPaymentDue = (typeof ((_a = paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.totalPaymentDue) === null || _a === void 0 ? void 0 : _a.typeOf) === 'string')
54
62
  ? paymentMethod.totalPaymentDue
55
- : { typeOf: 'MonetaryAmount', currency: factory.priceCurrency.JPY, value: Number(paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.amount) };
63
+ : {
64
+ typeOf: 'MonetaryAmount',
65
+ currency: factory.priceCurrency.JPY,
66
+ value: paymentMethodAmountValue
67
+ };
56
68
  payObject = {
57
69
  typeOf: transaction.object.typeOf,
58
70
  id: (typeof transaction.object.id === 'string') ? transaction.object.id : '',
@@ -68,11 +80,17 @@ function createPayObject(params) {
68
80
  };
69
81
  break;
70
82
  case factory.service.paymentService.PaymentServiceType.CreditCard:
71
- payObject = Object.assign({ typeOf: transaction.object.typeOf, id: (typeof transaction.object.id === 'string') ? transaction.object.id : '', paymentMethod: Object.assign({ additionalProperty: (Array.isArray(additionalProperty)) ? additionalProperty : [], name: paymentMethodName, paymentMethodId: paymentMethodId, totalPaymentDue: {
83
+ payObject = {
84
+ typeOf: transaction.object.typeOf,
85
+ id: (typeof transaction.object.id === 'string') ? transaction.object.id : '',
86
+ paymentMethod: Object.assign({ additionalProperty: (Array.isArray(additionalProperty)) ? additionalProperty : [], name: paymentMethodName, paymentMethodId: paymentMethodId, totalPaymentDue: {
72
87
  typeOf: 'MonetaryAmount',
73
88
  currency: factory.priceCurrency.JPY,
74
- value: Number(paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.amount)
75
- }, typeOf: paymentMethodType }, (typeof (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.accountId) === 'string') ? { accountId: paymentMethod.accountId } : undefined) }, (paymentServiceOutput !== undefined) ? { serviceOutput: paymentServiceOutput } : undefined);
89
+ value: paymentMethodAmountValue
90
+ }, typeOf: paymentMethodType }, (typeof (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.accountId) === 'string') ? { accountId: paymentMethod.accountId } : undefined)
91
+ // CreditCardIFのカード通貨区分を追加(2023-08-07~)
92
+ // ...(paymentServiceOutput !== undefined) ? { serviceOutput: paymentServiceOutput } : undefined
93
+ };
76
94
  break;
77
95
  case factory.service.paymentService.PaymentServiceType.MovieTicket:
78
96
  payObject = Object.assign({ typeOf: transaction.object.typeOf, id: (typeof transaction.object.id === 'string') ? transaction.object.id : '', paymentMethod: {
@@ -94,7 +112,6 @@ function createPayObject(params) {
94
112
  return payObject;
95
113
  }
96
114
  function createPayObjectServiceOutput(params) {
97
- var _a, _b;
98
115
  const transaction = params.transaction;
99
116
  const paymentMethod = transaction.object.paymentMethod;
100
117
  const order = params.order;
@@ -105,17 +122,21 @@ function createPayObjectServiceOutput(params) {
105
122
  break;
106
123
  case factory.service.paymentService.PaymentServiceType.CreditCard:
107
124
  // CreditCardIFのカード通貨区分を追加(2023-08-07~)
108
- const creditCardAsPaymentServiceOutput = (typeof ((_b = (_a = transaction.object.serviceOutput) === null || _a === void 0 ? void 0 : _a.amount) === null || _b === void 0 ? void 0 : _b.currency) === 'string')
109
- ? {
110
- amount: {
111
- currency: transaction.object.serviceOutput.amount.currency,
112
- value: transaction.object.paymentMethod.amount
113
- }
114
- }
115
- : undefined;
116
- if (creditCardAsPaymentServiceOutput !== undefined) {
117
- paymentServiceOutput = creditCardAsPaymentServiceOutput;
118
- }
125
+ // const creditCardAsPaymentServiceOutput: factory.order.IOrderPaymentMethodIssuedThroughServiceOutput | undefined =
126
+ // (typeof transaction.object.paymentMethod?.amount !== 'number'
127
+ // && typeof transaction.object.paymentMethod?.amount?.currency === 'string')
128
+ // ? {
129
+ // paymentMethod: {
130
+ // amount: {
131
+ // currency: transaction.object.paymentMethod.amount.currency,
132
+ // value: transaction.object.paymentMethod.amount.value
133
+ // }
134
+ // }
135
+ // }
136
+ // : undefined;
137
+ // if (creditCardAsPaymentServiceOutput !== undefined) {
138
+ // paymentServiceOutput = creditCardAsPaymentServiceOutput;
139
+ // }
119
140
  break;
120
141
  case factory.service.paymentService.PaymentServiceType.MovieTicket:
121
142
  const paymentMethodType = paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.typeOf;
@@ -6,7 +6,7 @@ exports.createStartParams = void 0;
6
6
  */
7
7
  const factory = require("../../../factory");
8
8
  function createStartParams(params) {
9
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
9
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
10
10
  const paymentMethodType = (_a = params.object.paymentMethod) === null || _a === void 0 ? void 0 : _a.typeOf;
11
11
  if (typeof paymentMethodType !== 'string') {
12
12
  throw new factory.errors.ArgumentNull('object.paymentMethod.typeOf');
@@ -23,7 +23,7 @@ function createStartParams(params) {
23
23
  let refundFee;
24
24
  if (((_g = params.paymentService) === null || _g === void 0 ? void 0 : _g.typeOf) === factory.service.paymentService.PaymentServiceType.CreditCard) {
25
25
  // カード通貨区分の存在する決済サービスを考慮(2023-08-09~)
26
- const paymentServiceOutputAmountCurrency = (_j = (_h = params.paymentService.serviceOutput) === null || _h === void 0 ? void 0 : _h.amount) === null || _j === void 0 ? void 0 : _j.currency;
26
+ const paymentServiceOutputAmountCurrency = (_k = (_j = (_h = params.paymentService.serviceOutput) === null || _h === void 0 ? void 0 : _h.paymentMethod) === null || _j === void 0 ? void 0 : _j.amount) === null || _k === void 0 ? void 0 : _k.currency;
27
27
  if (typeof paymentServiceOutputAmountCurrency !== 'string') {
28
28
  if (typeof params.object.refundFee === 'number') {
29
29
  refundFee = params.object.refundFee;
@@ -80,17 +80,32 @@ function createMovieTicket(params) {
80
80
  };
81
81
  }
82
82
  function createAuthorizeResult(params) {
83
- var _a, _b, _c, _d, _e, _f;
83
+ var _a, _b, _c, _d;
84
84
  const payTransactionObject = params.payTransaction.object;
85
85
  const totalPaymentDue = (_a = payTransactionObject.paymentMethod) === null || _a === void 0 ? void 0 : _a.totalPaymentDue;
86
86
  if (typeof (totalPaymentDue === null || totalPaymentDue === void 0 ? void 0 : totalPaymentDue.typeOf) !== 'string') {
87
87
  throw new factory.errors.ServiceUnavailable('payTransaction.object.paymentMethod.totalPaymentDue undefined');
88
88
  }
89
- const issuedThrough = Object.assign({ typeOf: payTransactionObject.typeOf, id: (typeof payTransactionObject.id === 'string') ? payTransactionObject.id : '' }, (typeof ((_c = (_b = payTransactionObject.serviceOutput) === null || _b === void 0 ? void 0 : _b.amount) === null || _c === void 0 ? void 0 : _c.currency) === 'string')
90
- ? { serviceOutput: payTransactionObject.serviceOutput }
91
- : undefined);
89
+ const issuedThrough = {
90
+ typeOf: payTransactionObject.typeOf,
91
+ id: (typeof payTransactionObject.id === 'string') ? payTransactionObject.id : ''
92
+ // CreditCardIFのカード通貨区分を追加(2023-08-07~)
93
+ // ...(typeof payTransactionObject.paymentMethod?.amount !== 'number'
94
+ // && typeof payTransactionObject.paymentMethod?.amount?.currency === 'string')
95
+ // ? {
96
+ // serviceOutput: {
97
+ // paymentMethod: {
98
+ // amount: {
99
+ // currency: payTransactionObject.paymentMethod.amount.currency,
100
+ // value: payTransactionObject.paymentMethod.amount.value
101
+ // }
102
+ // }
103
+ // }
104
+ // }
105
+ // : undefined
106
+ };
92
107
  return {
93
- accountId: (typeof ((_d = payTransactionObject.paymentMethod) === null || _d === void 0 ? void 0 : _d.accountId) === 'string')
108
+ accountId: (typeof ((_b = payTransactionObject.paymentMethod) === null || _b === void 0 ? void 0 : _b.accountId) === 'string')
94
109
  ? payTransactionObject.paymentMethod.accountId
95
110
  : '',
96
111
  // 廃止(2023-08-07~)
@@ -98,10 +113,10 @@ function createAuthorizeResult(params) {
98
113
  issuedThrough,
99
114
  paymentMethod: params.object.paymentMethod,
100
115
  paymentStatus: factory.paymentStatusType.PaymentDue,
101
- paymentMethodId: (typeof ((_e = payTransactionObject.paymentMethod) === null || _e === void 0 ? void 0 : _e.paymentMethodId) === 'string')
116
+ paymentMethodId: (typeof ((_c = payTransactionObject.paymentMethod) === null || _c === void 0 ? void 0 : _c.paymentMethodId) === 'string')
102
117
  ? payTransactionObject.paymentMethod.paymentMethodId
103
118
  : '',
104
- name: (typeof ((_f = payTransactionObject.paymentMethod) === null || _f === void 0 ? void 0 : _f.name) === 'string')
119
+ name: (typeof ((_d = payTransactionObject.paymentMethod) === null || _d === void 0 ? void 0 : _d.name) === 'string')
105
120
  ? payTransactionObject.paymentMethod.name
106
121
  : params.object.paymentMethod,
107
122
  totalPaymentDue: totalPaymentDue,
@@ -114,7 +114,9 @@ function processAuthorizeCreditCard(params) {
114
114
  shopPass: params.shopPass,
115
115
  orderId: params.orderId,
116
116
  jobCd: GMO.utils.util.JobCd.Auth,
117
- amount: params.object.amount,
117
+ amount: (typeof params.object.amount === 'number')
118
+ ? params.object.amount
119
+ : params.object.amount.value,
118
120
  siteId: (_a = params.availableChannel.credentials) === null || _a === void 0 ? void 0 : _a.siteId,
119
121
  sitePass: (_b = params.availableChannel.credentials) === null || _b === void 0 ? void 0 : _b.sitePass
120
122
  };
@@ -127,7 +127,7 @@ function validatePaymentMethod(params, paymentServiceId) {
127
127
  }
128
128
  function processAccountTransaction(params) {
129
129
  return (repos) => __awaiter(this, void 0, void 0, function* () {
130
- var _a, _b, _c, _d, _e, _f;
130
+ var _a, _b, _c, _d, _e, _f, _g, _h;
131
131
  let pendingTransaction;
132
132
  const defaultName = `${factory.assetTransactionType.Pay} Transaction ${params.transactionNumber}`;
133
133
  const agent = Object.assign(Object.assign({}, params.agent), { name: (typeof params.agent.name === 'string') ? params.agent.name : defaultName });
@@ -165,7 +165,11 @@ function processAccountTransaction(params) {
165
165
  expires: params.expires,
166
166
  recipient: recipient,
167
167
  object: {
168
- amount: { value: (_f = params.paymentMethod) === null || _f === void 0 ? void 0 : _f.amount },
168
+ amount: {
169
+ value: (typeof ((_f = params.paymentMethod) === null || _f === void 0 ? void 0 : _f.amount) === 'number')
170
+ ? (_g = params.paymentMethod) === null || _g === void 0 ? void 0 : _g.amount
171
+ : (_h = params.paymentMethod) === null || _h === void 0 ? void 0 : _h.amount.value
172
+ },
169
173
  description: description,
170
174
  fromLocation: {
171
175
  accountNumber: accountNumber
@@ -214,9 +214,9 @@ function validatePaymentMethods(params) {
214
214
  if (typeof settings_1.settings.maxNumCreditCardPaymentMethod === 'number') {
215
215
  // CreditCard IFの決済方法の最大値検証
216
216
  const creditCardPaymentMethodCount = params.order.paymentMethods.filter((p) => {
217
- var _a, _b;
217
+ var _a, _b, _c;
218
218
  // カード通貨区分の存在する決済サービスを考慮(2023-08-09~)
219
- const serviceOutputAmountCurrency = (_b = (_a = p.issuedThrough.serviceOutput) === null || _a === void 0 ? void 0 : _a.amount) === null || _b === void 0 ? void 0 : _b.currency;
219
+ const serviceOutputAmountCurrency = (_c = (_b = (_a = p.issuedThrough.serviceOutput) === null || _a === void 0 ? void 0 : _a.paymentMethod) === null || _b === void 0 ? void 0 : _b.amount) === null || _c === void 0 ? void 0 : _c.currency;
220
220
  return p.issuedThrough.typeOf === factory.service.paymentService.PaymentServiceType.CreditCard
221
221
  && typeof serviceOutputAmountCurrency !== 'string';
222
222
  }).length;
package/package.json CHANGED
@@ -9,8 +9,8 @@
9
9
  }
10
10
  ],
11
11
  "dependencies": {
12
- "@chevre/factory": "^4.325.0-alpha.1",
13
- "@cinerino/sdk": "3.163.0",
12
+ "@chevre/factory": "4.325.0-alpha.2",
13
+ "@cinerino/sdk": "3.164.0",
14
14
  "@motionpicture/coa-service": "9.2.0",
15
15
  "@motionpicture/gmo-service": "5.2.0",
16
16
  "@sendgrid/mail": "6.4.0",
@@ -117,5 +117,5 @@
117
117
  "postversion": "git push origin --tags",
118
118
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
119
119
  },
120
- "version": "21.7.0-alpha.2"
120
+ "version": "21.7.0-alpha.4"
121
121
  }