@cinerino/sdk 11.0.0-alpha.9 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15831,16 +15831,18 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
15831
15831
|
*/
|
|
15832
15832
|
PaymentService.prototype.publishCreditCardPaymentUrlAsync = function (params) {
|
|
15833
15833
|
return __awaiter(this, void 0, void 0, function () {
|
|
15834
|
+
var object, purpose;
|
|
15834
15835
|
var _this = this;
|
|
15835
15836
|
return __generator(this, function (_a) {
|
|
15837
|
+
object = params.object, purpose = params.purpose;
|
|
15836
15838
|
return [2 /*return*/, this.fetch({
|
|
15837
15839
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.CreditCard + "/publishPaymentUrl",
|
|
15838
15840
|
method: 'POST',
|
|
15839
15841
|
expectedStatusCodes: [http_status_1.ACCEPTED],
|
|
15840
|
-
body:
|
|
15842
|
+
body: { object: object, purpose: purpose },
|
|
15841
15843
|
qs: {
|
|
15842
15844
|
async: true,
|
|
15843
|
-
purpose: { id:
|
|
15845
|
+
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
15844
15846
|
}
|
|
15845
15847
|
})
|
|
15846
15848
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
@@ -113,6 +113,17 @@ async function main() {
|
|
|
113
113
|
authorizeSeatReservationResults.push(authorizeSeatReservationResult);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
// 出力メンバーシップ対応の場合チケット発行
|
|
117
|
+
const { ticketToken } = await paymentService.issueTicketThroughCreditCard({
|
|
118
|
+
ticketedPermit: {
|
|
119
|
+
issuedThrough: {
|
|
120
|
+
id: paymentServiceId
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
purpose: { id: transaction.id, typeOf: client.factory.transactionType.PlaceOrder }
|
|
124
|
+
});
|
|
125
|
+
console.log('ticketToken issued.', ticketToken);
|
|
126
|
+
|
|
116
127
|
// 決済URL発行
|
|
117
128
|
const { paymentMethodId, paymentUrl } = await publishPaymentUrlAsyncForcibly({
|
|
118
129
|
object: {
|
|
@@ -123,7 +134,8 @@ async function main() {
|
|
|
123
134
|
...creditCard,
|
|
124
135
|
retUrl: String(process.env.SECURE_TRAN_RET_URL) // callbackを指定すると3DSとして処理される
|
|
125
136
|
},
|
|
126
|
-
issuedThrough: { id: paymentServiceId }
|
|
137
|
+
issuedThrough: { id: paymentServiceId },
|
|
138
|
+
ticketToken
|
|
127
139
|
},
|
|
128
140
|
purpose: { id: transaction.id, typeOf: client.factory.transactionType.PlaceOrder }
|
|
129
141
|
})({ paymentService });
|
|
@@ -172,7 +184,8 @@ async function main() {
|
|
|
172
184
|
paymentMethodId, // URL発行時のpaymentMethodIdを指定
|
|
173
185
|
method: '1',
|
|
174
186
|
creditCard,
|
|
175
|
-
issuedThrough: { id: paymentServiceId }
|
|
187
|
+
issuedThrough: { id: paymentServiceId },
|
|
188
|
+
ticketToken
|
|
176
189
|
},
|
|
177
190
|
purpose: { id: transaction.id, typeOf: client.factory.transactionType.PlaceOrder }
|
|
178
191
|
})({ paymentService });
|
|
@@ -385,7 +398,7 @@ async function wait(waitInMilliseconds: number) {
|
|
|
385
398
|
const USE_FORCE_AUTHORIZE_PAYMENT_ASYNC_GIVE_UP_SECONDS = 10;
|
|
386
399
|
const USE_FORCE_AUTHORIZE_PAYMENT_ASYNC_CHECK_INTERVAL_MS = 1000;
|
|
387
400
|
function publishPaymentUrlAsyncForcibly(params: {
|
|
388
|
-
object: Pick<client.factory.action.authorize.paymentMethod.any.IObjectWithoutDetail, 'amount' | 'creditCard' | 'issuedThrough' | 'paymentMethod' | 'method'>;
|
|
401
|
+
object: Pick<client.factory.action.authorize.paymentMethod.any.IObjectWithoutDetail, 'amount' | 'creditCard' | 'issuedThrough' | 'paymentMethod' | 'method' | 'ticketToken'>;
|
|
389
402
|
purpose: {
|
|
390
403
|
typeOf: client.factory.transactionType.PlaceOrder;
|
|
391
404
|
id: string;
|
|
@@ -443,7 +456,7 @@ function publishPaymentUrlAsyncForcibly(params: {
|
|
|
443
456
|
function authorizeCreditCardAsyncForcibly(params: {
|
|
444
457
|
object: Pick<
|
|
445
458
|
client.factory.action.authorize.paymentMethod.any.IObjectWithoutDetail,
|
|
446
|
-
'amount' | 'issuedThrough' | 'paymentMethod' | 'creditCard' | 'method' | 'paymentMethodId' | 'name' | 'additionalProperty'
|
|
459
|
+
'amount' | 'issuedThrough' | 'paymentMethod' | 'creditCard' | 'method' | 'paymentMethodId' | 'name' | 'additionalProperty' | 'ticketToken'
|
|
447
460
|
>;
|
|
448
461
|
purpose: {
|
|
449
462
|
typeOf: client.factory.transactionType.PlaceOrder;
|
|
@@ -37,7 +37,7 @@ export declare type IAuthorizeMovieTicketObject = Pick<factory.action.authorize.
|
|
|
37
37
|
export declare type IAuthorizePaymentCardObject = Pick<factory.action.authorize.paymentMethod.any.IAuthorizePaymentCardObject, 'amount' | 'issuedThrough' | 'paymentMethod' | 'fromLocation' | 'name' | 'additionalProperty'> & {
|
|
38
38
|
description?: string;
|
|
39
39
|
};
|
|
40
|
-
export declare type IPublishPaymentUrlObject = Pick<factory.action.authorize.paymentMethod.any.IAuthorizeCreditCardObject, 'amount' | 'creditCard' | 'issuedThrough' | 'paymentMethod' | 'method'>;
|
|
40
|
+
export declare type IPublishPaymentUrlObject = Pick<factory.action.authorize.paymentMethod.any.IAuthorizeCreditCardObject, 'amount' | 'creditCard' | 'issuedThrough' | 'paymentMethod' | 'method' | 'ticketToken'>;
|
|
41
41
|
export declare type IPublishPaymentUrlResult = Pick<factory.action.accept.pay.IResult, 'paymentMethodId' | 'paymentUrl'>;
|
|
42
42
|
export interface IFindAuthorizeActionResult {
|
|
43
43
|
/**
|
|
@@ -221,16 +221,18 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
221
221
|
*/
|
|
222
222
|
PaymentService.prototype.publishCreditCardPaymentUrlAsync = function (params) {
|
|
223
223
|
return __awaiter(this, void 0, void 0, function () {
|
|
224
|
+
var object, purpose;
|
|
224
225
|
var _this = this;
|
|
225
226
|
return __generator(this, function (_a) {
|
|
227
|
+
object = params.object, purpose = params.purpose;
|
|
226
228
|
return [2 /*return*/, this.fetch({
|
|
227
229
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.CreditCard + "/publishPaymentUrl",
|
|
228
230
|
method: 'POST',
|
|
229
231
|
expectedStatusCodes: [http_status_1.ACCEPTED],
|
|
230
|
-
body:
|
|
232
|
+
body: { object: object, purpose: purpose },
|
|
231
233
|
qs: {
|
|
232
234
|
async: true,
|
|
233
|
-
purpose: { id:
|
|
235
|
+
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
234
236
|
}
|
|
235
237
|
})
|
|
236
238
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
package/lib/bundle.js
CHANGED
|
@@ -17193,16 +17193,18 @@ var PaymentService = /** @class */ (function (_super) {
|
|
|
17193
17193
|
*/
|
|
17194
17194
|
PaymentService.prototype.publishCreditCardPaymentUrlAsync = function (params) {
|
|
17195
17195
|
return __awaiter(this, void 0, void 0, function () {
|
|
17196
|
+
var object, purpose;
|
|
17196
17197
|
var _this = this;
|
|
17197
17198
|
return __generator(this, function (_a) {
|
|
17199
|
+
object = params.object, purpose = params.purpose;
|
|
17198
17200
|
return [2 /*return*/, this.fetch({
|
|
17199
17201
|
uri: "/payment/" + factory.service.paymentService.PaymentServiceType.CreditCard + "/publishPaymentUrl",
|
|
17200
17202
|
method: 'POST',
|
|
17201
17203
|
expectedStatusCodes: [http_status_1.ACCEPTED],
|
|
17202
|
-
body:
|
|
17204
|
+
body: { object: object, purpose: purpose },
|
|
17203
17205
|
qs: {
|
|
17204
17206
|
async: true,
|
|
17205
|
-
purpose: { id:
|
|
17207
|
+
purpose: { id: purpose.id } // 追加(2024-04-01~)
|
|
17206
17208
|
}
|
|
17207
17209
|
})
|
|
17208
17210
|
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|