@portone/browser-sdk 0.0.3 → 0.0.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.
- package/dist/utils.d.ts +4 -1
- package/dist/v2/entity/BillingKeyAndPayMethod.d.ts +4 -0
- package/dist/v2/entity/Currency.d.ts +0 -1
- package/dist/v2/entity/EasyPayPaymentMethod.d.ts +7 -0
- package/dist/v2/entity/EasyPayProvider.d.ts +0 -4
- package/dist/v2/entity/GiftCertificateType.d.ts +1 -0
- package/dist/v2/entity/IssueBillingKeyUIType.d.ts +4 -0
- package/dist/v2/entity/LoadableUIType.d.ts +3 -0
- package/dist/v2/entity/OfferPeriod.d.ts +11 -0
- package/dist/v2/entity/PayMethod.d.ts +1 -1
- package/dist/v2/entity/PaymentUIType.d.ts +4 -0
- package/dist/v2/entity/PgProvider.d.ts +2 -0
- package/dist/v2/entity/TransactionType.d.ts +2 -0
- package/dist/v2/entity/bypass/issueBillingKey/TosspayV2.d.ts +7 -0
- package/dist/v2/entity/bypass/issueBillingKey/Welcome.d.ts +6 -0
- package/dist/v2/entity/bypass/issueBillingKey/index.d.ts +4 -2
- package/dist/v2/entity/bypass/issueBillingKeyAndPay/Welcome.d.ts +55 -0
- package/dist/v2/entity/bypass/issueBillingKeyAndPay/index.d.ts +4 -0
- package/dist/v2/entity/bypass/{issueBillingKey → loadIssueBillingKeyUI}/PaypalV2.d.ts +1 -1
- package/dist/v2/entity/bypass/loadIssueBillingKeyUI/index.d.ts +4 -0
- package/dist/v2/entity/bypass/{payment → loadPaymentUI}/PaypalV2.d.ts +1 -1
- package/dist/v2/entity/bypass/loadPaymentUI/index.d.ts +4 -0
- package/dist/v2/entity/bypass/payment/TosspayV2.d.ts +17 -0
- package/dist/v2/entity/bypass/payment/Welcome.d.ts +108 -0
- package/dist/v2/entity/bypass/payment/index.d.ts +4 -2
- package/dist/v2/entity/index.d.ts +8 -0
- package/dist/v2/exception/IssueBillingKeyAndPayError.d.ts +24 -0
- package/dist/v2/exception/LoadIssueBillingKeyUIError.d.ts +16 -0
- package/dist/v2/exception/LoadPaymentUIError.d.ts +16 -0
- package/dist/v2/exception/index.d.ts +3 -0
- package/dist/v2/index.d.ts +21 -6
- package/dist/v2/loadIssueBillingKeyUI.d.ts +27 -0
- package/dist/v2/loadPaymentUI.d.ts +36 -0
- package/dist/v2/loader.d.ts +17 -2
- package/dist/v2/requestIssueBillingKey.d.ts +3 -1
- package/dist/v2/requestIssueBillingKeyAndPay.d.ts +51 -0
- package/dist/v2/requestPayment.d.ts +7 -1
- package/dist/v2/updateLoadIssueBillingKeyUIRequest.d.ts +2 -0
- package/dist/v2/updateLoadPaymentUIRequest.d.ts +2 -0
- package/dist/v2.cjs +108 -12
- package/dist/v2.js +98 -13
- package/package.json +1 -1
package/dist/utils.d.ts
CHANGED
|
@@ -15,4 +15,7 @@ type OneOfByKey<Obj> = {
|
|
|
15
15
|
[key in keyof Obj]: OneOnly<Obj, key>;
|
|
16
16
|
};
|
|
17
17
|
type OneOfType<Obj> = ValueOf<OneOfByKey<Obj>>;
|
|
18
|
-
|
|
18
|
+
type Prettify<T> = {
|
|
19
|
+
[K in keyof T]: T[K];
|
|
20
|
+
} & {};
|
|
21
|
+
export { CapsToCamel, OneOfType, Prettify };
|
|
@@ -104,7 +104,6 @@ export declare const Currency: {
|
|
|
104
104
|
readonly MWK: "CURRENCY_MWK";
|
|
105
105
|
readonly MXN: "CURRENCY_MXN";
|
|
106
106
|
readonly MXV: "CURRENCY_MXV";
|
|
107
|
-
readonly MYR: "CURRENCY_MYR";
|
|
108
107
|
readonly MZN: "CURRENCY_MZN";
|
|
109
108
|
readonly NAD: "CURRENCY_NAD";
|
|
110
109
|
readonly NGN: "CURRENCY_NGN";
|
|
@@ -12,10 +12,6 @@ export declare const EasyPayProvider: {
|
|
|
12
12
|
readonly APPLEPAY: "EASY_PAY_PROVIDER_APPLEPAY";
|
|
13
13
|
readonly PINPAY: "EASY_PAY_PROVIDER_PINPAY";
|
|
14
14
|
readonly SKPAY: "EASY_PAY_PROVIDER_SKPAY";
|
|
15
|
-
readonly NAVERPAY_CARD: "EASY_PAY_PROVIDER_NAVERPAY_CARD";
|
|
16
|
-
readonly NAVERPAY_POINT: "EASY_PAY_PROVIDER_NAVERPAY_POINT";
|
|
17
|
-
readonly SSGPAY_POINT: "EASY_PAY_PROVIDER_SSGPAY_POINT";
|
|
18
|
-
readonly SSGPAY_BANK: "EASY_PAY_PROVIDER_SSGPAY_BANK";
|
|
19
15
|
readonly TOSS_BRANDPAY: "EASY_PAY_PROVIDER_TOSS_BRANDPAY";
|
|
20
16
|
};
|
|
21
17
|
export type EasyPayProvider = typeof EasyPayProvider[keyof typeof EasyPayProvider];
|
|
@@ -3,5 +3,6 @@ export declare const GiftCertificateType: {
|
|
|
3
3
|
readonly SMART_MUNSANG: "GIFT_CERTIFICATE_TYPE_SMART_MUNSANG";
|
|
4
4
|
readonly CULTURELAND: "GIFT_CERTIFICATE_TYPE_CULTURELAND";
|
|
5
5
|
readonly HAPPYMONEY: "GIFT_CERTIFICATE_TYPE_HAPPYMONEY";
|
|
6
|
+
readonly CULTURE_GIFT: "GIFT_CERTIFICATE_TYPE_CULTURE_GIFT";
|
|
6
7
|
};
|
|
7
8
|
export type GiftCertificateType = typeof GiftCertificateType[keyof typeof GiftCertificateType];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 제공 기간
|
|
3
3
|
* - range: 제공 기간 범위
|
|
4
|
+
* - interval: 제공 기간 주기
|
|
4
5
|
*
|
|
5
6
|
* 예1) 2023년 1월 1일 00시 00분 00초(KST) ~
|
|
6
7
|
* range: {
|
|
@@ -17,6 +18,15 @@
|
|
|
17
18
|
* from: '2023-12-31T23:59:59+09:00'
|
|
18
19
|
* to: '2023-01-01T00:00:00+09:00'
|
|
19
20
|
* }
|
|
21
|
+
*
|
|
22
|
+
* 예4) 30일 주기
|
|
23
|
+
* interval: '30d'
|
|
24
|
+
*
|
|
25
|
+
* 예5) 6개월 주기
|
|
26
|
+
* interval: '6m'
|
|
27
|
+
*
|
|
28
|
+
* 예6) 1년 주기
|
|
29
|
+
* interval: '1y'
|
|
20
30
|
*/
|
|
21
31
|
export type OfferPeriod = {
|
|
22
32
|
range?: {
|
|
@@ -24,4 +34,5 @@ export type OfferPeriod = {
|
|
|
24
34
|
} | {
|
|
25
35
|
to: string;
|
|
26
36
|
};
|
|
37
|
+
interval?: `${number}d` | `${number}m` | `${number}y`;
|
|
27
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type PayMethod = 'CARD' | 'VIRTUAL_ACCOUNT' | 'TRANSFER' | 'MOBILE' | 'GIFT_CERTIFICATE' | 'EASY_PAY' | 'PAYPAL';
|
|
1
|
+
export type PayMethod = 'CARD' | 'VIRTUAL_ACCOUNT' | 'TRANSFER' | 'MOBILE' | 'GIFT_CERTIFICATE' | 'EASY_PAY' | 'PAYPAL' | 'ALIPAY';
|
|
@@ -40,5 +40,7 @@ export declare const PgProvider: {
|
|
|
40
40
|
readonly SMARTRO_V2: "PG_PROVIDER_SMARTRO_V2";
|
|
41
41
|
readonly NICE_V2: "PG_PROVIDER_NICE_V2";
|
|
42
42
|
readonly TOSS_BRANDPAY: "PG_PROVIDER_TOSS_BRANDPAY";
|
|
43
|
+
readonly WELCOME: "PG_PROVIDER_WELCOME";
|
|
44
|
+
readonly TOSSPAY_V2: "PG_PROVIDER_TOSSPAY_V2";
|
|
43
45
|
};
|
|
44
46
|
export type PgProvider = typeof PgProvider[keyof typeof PgProvider];
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
* - PAYMENT: 결제
|
|
4
4
|
* - ISSUE_BILLING_KEY: 빌링키 발급
|
|
5
5
|
* - IDENTITY_VERIFICATION: 본인 인증
|
|
6
|
+
* - ISSUE_BILLING_KEY_AND_PAY: 빌링키 발급과 동시에 결제
|
|
6
7
|
*/
|
|
7
8
|
export declare const TransactionType: {
|
|
8
9
|
readonly PAYMENT: "PAYMENT";
|
|
9
10
|
readonly ISSUE_BILLING_KEY: "ISSUE_BILLING_KEY";
|
|
10
11
|
readonly IDENTITY_VERIFICATION: "IDENTITY_VERIFICATION";
|
|
12
|
+
readonly ISSUE_BILLING_KEY_AND_PAY: "ISSUE_BILLING_KEY_AND_PAY";
|
|
11
13
|
};
|
|
12
14
|
export type TransactionType = typeof TransactionType[keyof typeof TransactionType];
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { KakaopayPaymentBypass } from '../payment/Kakaopay.js';
|
|
2
2
|
import { SmartroV2IssueBillingKeyBypass } from './SmartroV2.js';
|
|
3
3
|
import { NaverpayIssueBillingKeyBypass } from './Naverpay.js';
|
|
4
|
-
import {
|
|
4
|
+
import { WelcomeIssueBillingKeyBypass } from './Welcome.js';
|
|
5
|
+
import { TosspayV2IssueBillingKeyBypass } from './TosspayV2.js';
|
|
5
6
|
export type IssueBillingKeyBypass = {
|
|
6
7
|
kakaopay?: KakaopayPaymentBypass;
|
|
7
8
|
smartro_v2?: SmartroV2IssueBillingKeyBypass;
|
|
8
9
|
naverpay?: NaverpayIssueBillingKeyBypass;
|
|
9
|
-
|
|
10
|
+
welcome?: WelcomeIssueBillingKeyBypass;
|
|
11
|
+
tosspay_v2?: TosspayV2IssueBillingKeyBypass;
|
|
10
12
|
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
type WelcomeCarrier = 'SKT' | 'KTF' | 'LGT' | 'MVNO' | 'CJH' | 'KCT' | 'SKL';
|
|
2
|
+
export type WelcomeIssueBillingKeyAndPayBypass = WelcomeIssueBillingKeyAndPayBypassOnPc & WelcomeIssueBillingKeyAndPayBypassOnMobile;
|
|
3
|
+
type WelcomeIssueBillingKeyAndPayBypassOnPc = {
|
|
4
|
+
acceptmethod?: AcceptMethodKey[];
|
|
5
|
+
};
|
|
6
|
+
type AcceptMethodKey =
|
|
7
|
+
/**
|
|
8
|
+
* 휴대폰 소액결제시 기본 선택 되어있는 통신사
|
|
9
|
+
* 기본) 기본 선택되어있는 통신사 없음
|
|
10
|
+
* 예시) KT 기본 선택 → hppdefaultcorp(KT) 전달
|
|
11
|
+
*
|
|
12
|
+
* - SKT: SKT
|
|
13
|
+
* - KT: KTF
|
|
14
|
+
* - LG 유플러스: LGT
|
|
15
|
+
* - 알뜰폰 전체: MVNO
|
|
16
|
+
* - 알뜰폰 CJ 헬로 모바일: CJH
|
|
17
|
+
* - 알뜰폰 티플러스: KCT
|
|
18
|
+
* - 알뜰폰 SK 세븐 모바일: SKL
|
|
19
|
+
*/
|
|
20
|
+
`hppdefaultcorp(${WelcomeCarrier})`
|
|
21
|
+
/**
|
|
22
|
+
* 휴대폰 소액결제창에 자동 입력되는 buyer_tel값을 수정할 수 있는지 여부
|
|
23
|
+
* 기본) 수정 가능
|
|
24
|
+
*
|
|
25
|
+
* - Y: 수정 불가능
|
|
26
|
+
* - N: 수정 가능
|
|
27
|
+
*/
|
|
28
|
+
| `hppnofix(${'Y' | 'N'})`;
|
|
29
|
+
type WelcomeIssueBillingKeyAndPayBypassOnMobile = {
|
|
30
|
+
P_RESERVED?: PReservedKey[];
|
|
31
|
+
};
|
|
32
|
+
type PReservedKey =
|
|
33
|
+
/**
|
|
34
|
+
* 휴대폰 소액결제시 기본 선택 되어있는 통신사
|
|
35
|
+
* 기본) 기본 선택 되어있는 통신사 없음
|
|
36
|
+
* 예시) KT 기본 선택 → hpp_default_corp=KT 전달
|
|
37
|
+
*
|
|
38
|
+
* - SKT: SKT
|
|
39
|
+
* - KT: KTF
|
|
40
|
+
* - LG 유플러스: LGT
|
|
41
|
+
* - 알뜰폰 전체: MVNO
|
|
42
|
+
* - 알뜰폰 CJ 헬로 모바일: CJH
|
|
43
|
+
* - 알뜰폰 티플러스: KCT
|
|
44
|
+
* - 알뜰폰 SK 세븐 모바일: SKL
|
|
45
|
+
*/
|
|
46
|
+
`hpp_default_corp=${WelcomeCarrier}`
|
|
47
|
+
/**
|
|
48
|
+
* 휴대폰 소액결제창에 자동 입력되는 buyer_tel값을 수정할 수 있는지 여부
|
|
49
|
+
* 기본) 수정 가능
|
|
50
|
+
*
|
|
51
|
+
* - Y: 수정 불가능
|
|
52
|
+
* - N: 수정 가능
|
|
53
|
+
*/
|
|
54
|
+
| `hpp_nofix=${'Y' | 'N'}`;
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 정규화가 어려운 토스페이 bypass 파라미터
|
|
3
|
+
* 가맹점으로부터 전달 된 값을 PG사로 그대로 전달
|
|
4
|
+
*/
|
|
5
|
+
export type TosspayV2PaymentBypass = {
|
|
6
|
+
/**
|
|
7
|
+
* 결제 만료 기한 (yyyy-MM-dd HH:mm:ss)
|
|
8
|
+
*/
|
|
9
|
+
expiredTime?: string;
|
|
10
|
+
/**
|
|
11
|
+
* 현금영수증 발급타입
|
|
12
|
+
* CULTURE : 문화비
|
|
13
|
+
* GENERAL : 일반 (default)
|
|
14
|
+
* PUBLIC_TP 교통비
|
|
15
|
+
*/
|
|
16
|
+
cashReceiptTradeOption?: 'CULTURE' | 'GENERAL' | 'PUBLIC_TP';
|
|
17
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
type WelcomeCarrier = 'SKT' | 'KTF' | 'LGT' | 'MVNO' | 'CJH' | 'KCT' | 'SKL';
|
|
2
|
+
/**
|
|
3
|
+
* 정규화가 어려운 웰컴페이먼츠 bypass 파라미터
|
|
4
|
+
* 가맹점으로부터 전달 된 값을 PG사로 그대로 전달
|
|
5
|
+
*/
|
|
6
|
+
export type WelcomePaymentBypass = WelcomePaymentBypassOnPc & WelcomePaymentBypassOnMobile;
|
|
7
|
+
type WelcomePaymentBypassOnPc = {
|
|
8
|
+
logo_url?: string;
|
|
9
|
+
logo_2nd?: string;
|
|
10
|
+
acceptmethod?: AcceptMethodKey[];
|
|
11
|
+
};
|
|
12
|
+
type AcceptMethodKey =
|
|
13
|
+
/**
|
|
14
|
+
* 결제 창의 배경 색상
|
|
15
|
+
* 기본) #c1272c
|
|
16
|
+
* 예시) SKIN(#fc6b2d)
|
|
17
|
+
*/
|
|
18
|
+
`SKIN(${string})` | 'below1000'
|
|
19
|
+
/**
|
|
20
|
+
* 카드 결제창 내 렌더링 될 간편 결제 리스트
|
|
21
|
+
* 예시) 카카오페이, 엘페이, 페이코만 렌더링 → onlyeasypaycode(kakaopay:lpay:payco) 전달
|
|
22
|
+
*
|
|
23
|
+
* - 카카오페이: kakaopay
|
|
24
|
+
* - 엘페이: lpay
|
|
25
|
+
* - 페이코: payco
|
|
26
|
+
* - 토스페이: tosspay
|
|
27
|
+
*/
|
|
28
|
+
| `onlyeasypaycode(${string})`
|
|
29
|
+
/**
|
|
30
|
+
* 부분 무이자 할부 옵션
|
|
31
|
+
* 형식) SLIMQUOTA(코드-개월:개월^코드-개월:개월)
|
|
32
|
+
*/
|
|
33
|
+
| `SLIMQUOTA(${string})` | 'paypopup'
|
|
34
|
+
/**
|
|
35
|
+
* 휴대폰 소액결제시 기본 선택 되어있는 통신사
|
|
36
|
+
* 기본) 기본 선택되어있는 통신사 없음
|
|
37
|
+
* 예시) KT 기본 선택 → hppdefaultcorp(KT) 전달
|
|
38
|
+
*
|
|
39
|
+
* - SKT: SKT
|
|
40
|
+
* - KT: KTF
|
|
41
|
+
* - LG 유플러스: LGT
|
|
42
|
+
* - 알뜰폰 전체: MVNO
|
|
43
|
+
* - 알뜰폰 CJ 헬로 모바일: CJH
|
|
44
|
+
* - 알뜰폰 티플러스: KCT
|
|
45
|
+
* - 알뜰폰 SK 세븐 모바일: SKL
|
|
46
|
+
*/
|
|
47
|
+
| `hppdefaultcorp(${WelcomeCarrier})`
|
|
48
|
+
/**
|
|
49
|
+
* 휴대폰 소액결제창에 자동 입력되는 buyer_tel값을 수정할 수 있는지 여부
|
|
50
|
+
* 기본) 수정 가능
|
|
51
|
+
*
|
|
52
|
+
* - Y: 수정 불가능
|
|
53
|
+
* - N: 수정 가능
|
|
54
|
+
*/
|
|
55
|
+
| `hppnofix(${'Y' | 'N'})` | 'va_ckprice';
|
|
56
|
+
type WelcomePaymentBypassOnMobile = {
|
|
57
|
+
/**
|
|
58
|
+
* 1. 신용카드 우선 선택 옵션
|
|
59
|
+
* 예) selcode=14
|
|
60
|
+
*
|
|
61
|
+
* - 해당 카드 코드에 해당하는 카드가 선택된 채로 Display
|
|
62
|
+
* - 간편결제는 불가능 (타 카드 선택 가능)
|
|
63
|
+
*
|
|
64
|
+
* 2. 선택적 표시 옵션
|
|
65
|
+
* 예1) onlycard=visa3d
|
|
66
|
+
* 예2) selcode=14:onlycard=visa3d
|
|
67
|
+
*
|
|
68
|
+
* - 안심결제(visa3d)
|
|
69
|
+
* - ISP(isp)
|
|
70
|
+
* - 간편결제(easypay) 중 선택 적 표시
|
|
71
|
+
*/
|
|
72
|
+
P_CARD_OPTION?: string;
|
|
73
|
+
/**
|
|
74
|
+
* 카드 결제창 내 렌더링 될 간편 결제 리스트
|
|
75
|
+
* 예시) 카카오페이, 엘페이, 페이코만 렌더링 → KAKAOPAY:LPAY:PAYCO 전달
|
|
76
|
+
*
|
|
77
|
+
* - 카카오페이: KAKAOPAY
|
|
78
|
+
* - 엘페이: LPAY
|
|
79
|
+
* - 페이코: PAYCO
|
|
80
|
+
* - 토스페이: TOSSPAY
|
|
81
|
+
*/
|
|
82
|
+
P_ONLY_EASYPAYCODE?: string;
|
|
83
|
+
P_RESERVED?: PReservedKey[];
|
|
84
|
+
};
|
|
85
|
+
type PReservedKey = 'below1000=Y'
|
|
86
|
+
/**
|
|
87
|
+
* 휴대폰 소액결제시 기본 선택 되어있는 통신사
|
|
88
|
+
* 기본) 기본 선택 되어있는 통신사 없음
|
|
89
|
+
* 예시) KT 기본 선택 → hpp_default_corp=KT 전달
|
|
90
|
+
*
|
|
91
|
+
* - SKT: SKT
|
|
92
|
+
* - KT: KTF
|
|
93
|
+
* - LG 유플러스: LGT
|
|
94
|
+
* - 알뜰폰 전체: MVNO
|
|
95
|
+
* - 알뜰폰 CJ 헬로 모바일: CJH
|
|
96
|
+
* - 알뜰폰 티플러스: KCT
|
|
97
|
+
* - 알뜰폰 SK 세븐 모바일: SKL
|
|
98
|
+
*/
|
|
99
|
+
| `hpp_default_corp=${WelcomeCarrier}`
|
|
100
|
+
/**
|
|
101
|
+
* 휴대폰 소액결제창에 자동 입력되는 buyer_tel값을 수정할 수 있는지 여부
|
|
102
|
+
* 기본) 수정 가능
|
|
103
|
+
*
|
|
104
|
+
* - Y: 수정 불가능
|
|
105
|
+
* - N: 수정 가능
|
|
106
|
+
*/
|
|
107
|
+
| `hpp_nofix=${'Y' | 'N'}`;
|
|
108
|
+
export {};
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { TosspaymentsPaymentBypass } from './Tosspayments.js';
|
|
2
2
|
import { KsnetPaymentBypass } from './Ksnet.js';
|
|
3
|
-
import { PaypalV2PaymentBypass } from './PaypalV2.js';
|
|
4
3
|
import { KakaopayPaymentBypass } from './Kakaopay.js';
|
|
5
4
|
import { SmartroV2PaymentBypass } from './SmartroV2.js';
|
|
6
5
|
import { NaverpayPaymentBypass } from './Naverpay.js';
|
|
7
6
|
import { NiceV2PaymentBypass } from './NiceV2.js';
|
|
8
7
|
import { TossBrandpayPaymentBypass } from './TossBrandpay.js';
|
|
8
|
+
import { WelcomePaymentBypass } from './Welcome.js';
|
|
9
|
+
import { TosspayV2PaymentBypass } from './TosspayV2.js';
|
|
9
10
|
export type PaymentBypass = {
|
|
10
11
|
tosspayments?: TosspaymentsPaymentBypass;
|
|
11
12
|
ksnet?: KsnetPaymentBypass;
|
|
12
|
-
paypal_v2?: PaypalV2PaymentBypass;
|
|
13
13
|
kakaopay?: KakaopayPaymentBypass;
|
|
14
14
|
smartro_v2?: SmartroV2PaymentBypass;
|
|
15
15
|
naverpay?: NaverpayPaymentBypass;
|
|
16
16
|
nice_v2?: NiceV2PaymentBypass;
|
|
17
17
|
toss_brandpay?: TossBrandpayPaymentBypass;
|
|
18
|
+
welcome?: WelcomePaymentBypass;
|
|
19
|
+
tosspay_v2?: TosspayV2PaymentBypass;
|
|
18
20
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { Bank } from './Bank.js';
|
|
2
|
+
export { BillingKeyAndPayMethod } from './BillingKeyAndPayMethod.js';
|
|
2
3
|
export { BillingKeyMethod } from './BillingKeyMethod.js';
|
|
3
4
|
export { CardCompany } from './CardCompany.js';
|
|
4
5
|
export { Carrier } from './Carrier.js';
|
|
@@ -11,9 +12,13 @@ export { Locale } from './Locale.js';
|
|
|
11
12
|
export { PgProvider } from './PgProvider.js';
|
|
12
13
|
export { TransactionType } from './TransactionType.js';
|
|
13
14
|
export { WindowType } from './WindowType.js';
|
|
15
|
+
export { LoadableUIType } from './LoadableUIType.js';
|
|
16
|
+
export { PaymentUIType } from './PaymentUIType.js';
|
|
17
|
+
export { IssueBillingKeyUIType } from './IssueBillingKeyUIType.js';
|
|
14
18
|
export type { Address } from './Address.js';
|
|
15
19
|
export type { CashReceiptType } from './CashReceiptType.js';
|
|
16
20
|
export type { Customer } from './Customer.js';
|
|
21
|
+
export type { EasyPayPaymentMethod } from './EasyPayPaymentMethod.js';
|
|
17
22
|
export type { FreeInstallmentPlan } from './FreeInstallmentPlan.js';
|
|
18
23
|
export type { Installment } from './Installment.js';
|
|
19
24
|
export type { OfferPeriod } from './OfferPeriod.js';
|
|
@@ -23,5 +28,8 @@ export type { ProductType } from './ProductType.js';
|
|
|
23
28
|
export type { StoreDetails } from './StoreDetails.js';
|
|
24
29
|
export type { WindowTypes } from './WindowType.js';
|
|
25
30
|
export type { IdentityVerificationBypass } from './bypass/identityVerification/index.js';
|
|
31
|
+
export type { IssueBillingKeyAndPayBypass } from './bypass/issueBillingKeyAndPay/index.js';
|
|
26
32
|
export type { IssueBillingKeyBypass } from './bypass/issueBillingKey/index.js';
|
|
27
33
|
export type { PaymentBypass } from './bypass/payment/index.js';
|
|
34
|
+
export type { LoadPaymentUIBypass } from './bypass/loadPaymentUI/index.js';
|
|
35
|
+
export type { LoadIssueBillingKeyUIBypass } from './bypass/loadIssueBillingKeyUI/index.js';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CheckoutServiceErrorCode } from './CheckoutServiceErrorCode.js';
|
|
2
|
+
import { GrpcErrorCode } from './GrpcErrorCode.js';
|
|
3
|
+
import { PortOneError } from './index.js';
|
|
4
|
+
import { TxServiceIssueErrorCode } from './TxServiceIssueErrorCode.js';
|
|
5
|
+
import { TxServicePayErrorCode } from './TxServicePayErrorCode.js';
|
|
6
|
+
export type IssueBillingKeyAndPayErrorCode = CheckoutServiceErrorCode | GrpcErrorCode | TxServiceIssueErrorCode | TxServicePayErrorCode;
|
|
7
|
+
export declare function isIssueBillingKeyAndPayError(error: unknown): error is IssueBillingKeyAndPayError;
|
|
8
|
+
export declare class IssueBillingKeyAndPayError extends Error implements PortOneError {
|
|
9
|
+
__portOneErrorType: string;
|
|
10
|
+
transactionType: "ISSUE_BILLING_KEY_AND_PAY";
|
|
11
|
+
txId?: string;
|
|
12
|
+
paymentId?: string;
|
|
13
|
+
billingKey?: string;
|
|
14
|
+
code: IssueBillingKeyAndPayErrorCode;
|
|
15
|
+
message: string;
|
|
16
|
+
constructor({ txId, paymentId, billingKey, code, message, }: {
|
|
17
|
+
txId?: string;
|
|
18
|
+
paymentId?: string;
|
|
19
|
+
billingKey?: string;
|
|
20
|
+
code: IssueBillingKeyAndPayErrorCode;
|
|
21
|
+
message: string;
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
export default IssueBillingKeyAndPayError;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PortOneError } from './index.js';
|
|
2
|
+
import { CheckoutServiceErrorCode } from './CheckoutServiceErrorCode.js';
|
|
3
|
+
import { GrpcErrorCode } from './GrpcErrorCode.js';
|
|
4
|
+
import { TxServiceIssueErrorCode } from './TxServiceIssueErrorCode.js';
|
|
5
|
+
export type LoadIssueBillingKeyUIErrorCode = CheckoutServiceErrorCode | GrpcErrorCode | TxServiceIssueErrorCode;
|
|
6
|
+
export declare function isLoadIssueBillingKeyUIError(error: unknown): error is LoadIssueBillingKeyUIError;
|
|
7
|
+
export declare class LoadIssueBillingKeyUIError extends Error implements PortOneError {
|
|
8
|
+
__portOneErrorType: string;
|
|
9
|
+
transactionType: "ISSUE_BILLING_KEY";
|
|
10
|
+
code: LoadIssueBillingKeyUIErrorCode;
|
|
11
|
+
message: string;
|
|
12
|
+
constructor({ code, message, }: {
|
|
13
|
+
code: LoadIssueBillingKeyUIErrorCode;
|
|
14
|
+
message: string;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PortOneError } from './index.js';
|
|
2
|
+
import { CheckoutServiceErrorCode } from './CheckoutServiceErrorCode.js';
|
|
3
|
+
import { GrpcErrorCode } from './GrpcErrorCode.js';
|
|
4
|
+
import { TxServicePayErrorCode } from './TxServicePayErrorCode.js';
|
|
5
|
+
export type LoadPaymentUIErrorCode = CheckoutServiceErrorCode | GrpcErrorCode | TxServicePayErrorCode;
|
|
6
|
+
export declare function isLoadPaymentUIError(error: unknown): error is LoadPaymentUIError;
|
|
7
|
+
export declare class LoadPaymentUIError extends Error implements PortOneError {
|
|
8
|
+
__portOneErrorType: string;
|
|
9
|
+
transactionType: "PAYMENT";
|
|
10
|
+
code: LoadPaymentUIErrorCode;
|
|
11
|
+
message: string;
|
|
12
|
+
constructor({ code, message, }: {
|
|
13
|
+
code: LoadPaymentUIErrorCode;
|
|
14
|
+
message: string;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
@@ -3,6 +3,9 @@ export interface PortOneError extends Error {
|
|
|
3
3
|
}
|
|
4
4
|
export declare function isPortOneError(error: unknown): error is PortOneError;
|
|
5
5
|
export * from './IdentityVerificationError.js';
|
|
6
|
+
export * from './IssueBillingKeyAndPayError.js';
|
|
6
7
|
export * from './IssueBillingKeyError.js';
|
|
7
8
|
export * from './ModuleError.js';
|
|
8
9
|
export * from './PaymentError.js';
|
|
10
|
+
export * from './LoadIssueBillingKeyUIError.js';
|
|
11
|
+
export * from './LoadPaymentUIError.js';
|
package/dist/v2/index.d.ts
CHANGED
|
@@ -1,15 +1,30 @@
|
|
|
1
|
-
import { requestPayment } from './requestPayment.js';
|
|
2
|
-
import { requestIssueBillingKey } from './requestIssueBillingKey.js';
|
|
3
1
|
import { requestIdentityVerification } from './requestIdentityVerification.js';
|
|
2
|
+
import { requestIssueBillingKeyAndPay } from './requestIssueBillingKeyAndPay.js';
|
|
3
|
+
import { requestIssueBillingKey } from './requestIssueBillingKey.js';
|
|
4
|
+
import { requestPayment } from './requestPayment.js';
|
|
5
|
+
import { loadPaymentUI } from './loadPaymentUI.js';
|
|
6
|
+
import { loadIssueBillingKeyUI } from './loadIssueBillingKeyUI.js';
|
|
7
|
+
import { updateLoadPaymentUIRequest } from './updateLoadPaymentUIRequest.js';
|
|
8
|
+
import { updateLoadIssueBillingKeyUIRequest } from './updateLoadIssueBillingKeyUIRequest.js';
|
|
4
9
|
declare const PortOne: {
|
|
5
|
-
requestPayment: typeof requestPayment;
|
|
6
|
-
requestIssueBillingKey: typeof requestIssueBillingKey;
|
|
7
10
|
requestIdentityVerification: typeof requestIdentityVerification;
|
|
11
|
+
requestIssueBillingKeyAndPay: typeof requestIssueBillingKeyAndPay;
|
|
12
|
+
requestIssueBillingKey: typeof requestIssueBillingKey;
|
|
13
|
+
requestPayment: typeof requestPayment;
|
|
14
|
+
loadPaymentUI: typeof loadPaymentUI;
|
|
15
|
+
loadIssueBillingKeyUI: typeof loadIssueBillingKeyUI;
|
|
16
|
+
updateLoadPaymentUIRequest: typeof updateLoadPaymentUIRequest;
|
|
17
|
+
updateLoadIssueBillingKeyUIRequest: typeof updateLoadIssueBillingKeyUIRequest;
|
|
8
18
|
};
|
|
9
19
|
export { setPortOneJsSdkUrl as __INTERNAL__setPortOneSdkUrl } from './loader.js';
|
|
10
|
-
export { requestPayment, type PaymentRequest, type PaymentResponse, } from './requestPayment.js';
|
|
11
|
-
export { requestIssueBillingKey, type IssueBillingKeyRequest, type IssueBillingKeyResponse, } from './requestIssueBillingKey.js';
|
|
12
20
|
export { requestIdentityVerification, type IdentityVerificationRequest, type IdentityVerificationResponse, } from './requestIdentityVerification.js';
|
|
21
|
+
export { requestIssueBillingKeyAndPay, type IssueBillingKeyAndPayRequest, type IssueBillingKeyAndPayResponse, } from './requestIssueBillingKeyAndPay.js';
|
|
22
|
+
export { requestIssueBillingKey, type IssueBillingKeyRequest, type IssueBillingKeyResponse, } from './requestIssueBillingKey.js';
|
|
23
|
+
export { requestPayment, type PaymentRequest, type PaymentResponse, } from './requestPayment.js';
|
|
24
|
+
export { loadPaymentUI, type LoadPaymentUIRequest } from './loadPaymentUI.js';
|
|
25
|
+
export { loadIssueBillingKeyUI, type LoadIssueBillingKeyUIRequest, } from './loadIssueBillingKeyUI.js';
|
|
26
|
+
export { updateLoadPaymentUIRequest } from './updateLoadPaymentUIRequest.js';
|
|
27
|
+
export { updateLoadIssueBillingKeyUIRequest } from './updateLoadIssueBillingKeyUIRequest.js';
|
|
13
28
|
export * as Entity from './entity/index.js';
|
|
14
29
|
export * from './exception/index.js';
|
|
15
30
|
export default PortOne;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Entity, IssueBillingKeyError, IssueBillingKeyResponse } from './index.js';
|
|
2
|
+
import { IssueBillingKeyUIType } from './entity/index.js';
|
|
3
|
+
export declare function loadIssueBillingKeyUI(request: LoadIssueBillingKeyUIRequest, callbacks: {
|
|
4
|
+
onIssueBillingKeySuccess: (response: IssueBillingKeyResponse) => void;
|
|
5
|
+
onIssueBillingKeyFail: (error: IssueBillingKeyError) => void;
|
|
6
|
+
}): Promise<void>;
|
|
7
|
+
export type LoadIssueBillingKeyUIRequest = {
|
|
8
|
+
uiType: IssueBillingKeyUIType;
|
|
9
|
+
displayAmount?: number;
|
|
10
|
+
currency?: Entity.Currency;
|
|
11
|
+
storeId: string;
|
|
12
|
+
channelKey: string;
|
|
13
|
+
pgProvider?: Entity.PgProvider;
|
|
14
|
+
isTestChannel?: boolean;
|
|
15
|
+
billingKeyMethod: Entity.BillingKeyMethod;
|
|
16
|
+
issueName?: string;
|
|
17
|
+
issueId?: string;
|
|
18
|
+
billingKey?: string;
|
|
19
|
+
customer?: Entity.Customer;
|
|
20
|
+
redirectUrl?: string;
|
|
21
|
+
locale?: Entity.Locale;
|
|
22
|
+
customData?: Record<string, any>;
|
|
23
|
+
appScheme?: string;
|
|
24
|
+
noticeUrls?: string[];
|
|
25
|
+
productType?: Entity.ProductType;
|
|
26
|
+
bypass?: Entity.LoadIssueBillingKeyUIBypass;
|
|
27
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Entity, PaymentError, PaymentResponse } from './index.js';
|
|
2
|
+
import { PaymentUIType } from './entity/index.js';
|
|
3
|
+
import { Prettify } from '../utils.js';
|
|
4
|
+
export declare function loadPaymentUI(request: LoadPaymentUIRequest, callbacks: {
|
|
5
|
+
onPaymentSuccess: (response: PaymentResponse) => void;
|
|
6
|
+
onPaymentFail: (error: PaymentError) => void;
|
|
7
|
+
}): Promise<void>;
|
|
8
|
+
export type LoadPaymentUIRequest = Prettify<{
|
|
9
|
+
uiType: PaymentUIType;
|
|
10
|
+
storeId: string;
|
|
11
|
+
paymentId: string;
|
|
12
|
+
orderName: string;
|
|
13
|
+
totalAmount: number;
|
|
14
|
+
channelKey: string;
|
|
15
|
+
pgProvider?: Entity.PgProvider;
|
|
16
|
+
isTestChannel?: boolean;
|
|
17
|
+
taxFreeAmount?: number;
|
|
18
|
+
vatAmount?: number;
|
|
19
|
+
customer?: Entity.Customer;
|
|
20
|
+
redirectUrl?: string;
|
|
21
|
+
noticeUrls?: string[];
|
|
22
|
+
confirmUrl?: string;
|
|
23
|
+
appScheme?: string;
|
|
24
|
+
isEscrow?: boolean;
|
|
25
|
+
products?: Entity.Product[];
|
|
26
|
+
isCulturalExpense?: boolean;
|
|
27
|
+
currency: Entity.Currency;
|
|
28
|
+
locale?: Entity.Locale;
|
|
29
|
+
customData?: Record<string, any>;
|
|
30
|
+
offerPeriod?: Entity.OfferPeriod;
|
|
31
|
+
productType?: Entity.ProductType;
|
|
32
|
+
storeDetails?: Entity.StoreDetails;
|
|
33
|
+
bypass?: Entity.LoadPaymentUIBypass;
|
|
34
|
+
country?: Entity.Country;
|
|
35
|
+
shippingAddress?: Entity.Address;
|
|
36
|
+
}>;
|
package/dist/v2/loader.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import type { PaymentRequest, PaymentResponse } from './requestPayment.js';
|
|
2
|
-
import type { IssueBillingKeyRequest, IssueBillingKeyResponse } from './requestIssueBillingKey.js';
|
|
3
1
|
import type { IdentityVerificationRequest, IdentityVerificationResponse } from './requestIdentityVerification.js';
|
|
2
|
+
import type { IssueBillingKeyAndPayRequest, IssueBillingKeyAndPayResponse } from './requestIssueBillingKeyAndPay.js';
|
|
3
|
+
import type { IssueBillingKeyRequest, IssueBillingKeyResponse } from './requestIssueBillingKey.js';
|
|
4
|
+
import type { PaymentRequest, PaymentResponse } from './requestPayment.js';
|
|
5
|
+
import { LoadPaymentUIRequest } from './loadPaymentUI.js';
|
|
6
|
+
import { LoadIssueBillingKeyUIRequest } from './loadIssueBillingKeyUI.js';
|
|
7
|
+
import { IssueBillingKeyError, PaymentError } from './exception/index.js';
|
|
4
8
|
declare global {
|
|
5
9
|
interface Window {
|
|
6
10
|
PortOne: PortOne | undefined;
|
|
@@ -8,8 +12,19 @@ declare global {
|
|
|
8
12
|
}
|
|
9
13
|
interface PortOne {
|
|
10
14
|
requestPayment(request: PaymentRequest): Promise<PaymentResponse>;
|
|
15
|
+
requestIssueBillingKeyAndPay(request: IssueBillingKeyAndPayRequest): Promise<IssueBillingKeyAndPayResponse>;
|
|
11
16
|
requestIssueBillingKey(request: IssueBillingKeyRequest): Promise<IssueBillingKeyResponse>;
|
|
12
17
|
requestIdentityVerification(request: IdentityVerificationRequest): Promise<IdentityVerificationResponse>;
|
|
18
|
+
loadPaymentUI(request: LoadPaymentUIRequest, callbacks: {
|
|
19
|
+
onPaymentSuccess: (response: PaymentResponse) => void;
|
|
20
|
+
onPaymentFail: (error: PaymentError) => void;
|
|
21
|
+
}): Promise<void>;
|
|
22
|
+
loadIssueBillingKeyUI(request: LoadIssueBillingKeyUIRequest, callbacks: {
|
|
23
|
+
onIssueBillingKeySuccess: (response: IssueBillingKeyResponse) => void;
|
|
24
|
+
onIssueBillingKeyFail: (error: IssueBillingKeyError) => void;
|
|
25
|
+
}): Promise<void>;
|
|
26
|
+
updateLoadPaymentUIRequest(request: LoadPaymentUIRequest): Promise<void>;
|
|
27
|
+
updateLoadIssueBillingKeyUIRequest(request: LoadIssueBillingKeyUIRequest): Promise<void>;
|
|
13
28
|
}
|
|
14
29
|
export declare function loadScript(): Promise<PortOne>;
|
|
15
30
|
export declare function setPortOneJsSdkUrl(url: string): string;
|
|
@@ -19,6 +19,7 @@ export type IssueBillingKeyRequest = {
|
|
|
19
19
|
customData?: Record<string, any>;
|
|
20
20
|
appScheme?: string;
|
|
21
21
|
noticeUrls?: string[];
|
|
22
|
+
productType?: Entity.ProductType;
|
|
22
23
|
bypass?: Entity.IssueBillingKeyBypass;
|
|
23
24
|
} & (BillingKeyMethodOptions<'CARD', Card> | BillingKeyMethodOptions<'MOBILE', Mobile> | BillingKeyMethodOptions<'EASY_PAY', EasyPay> | BillingKeyMethodOptions<'PAYPAL', Paypal>);
|
|
24
25
|
/**
|
|
@@ -27,7 +28,7 @@ export type IssueBillingKeyRequest = {
|
|
|
27
28
|
*/
|
|
28
29
|
export type IssueBillingKeyResponse = {
|
|
29
30
|
transactionType: typeof Entity.TransactionType.ISSUE_BILLING_KEY;
|
|
30
|
-
billingKey
|
|
31
|
+
billingKey: string;
|
|
31
32
|
code?: string;
|
|
32
33
|
message?: string;
|
|
33
34
|
};
|
|
@@ -44,6 +45,7 @@ type EasyPay = {
|
|
|
44
45
|
};
|
|
45
46
|
type Mobile = {
|
|
46
47
|
carrier?: Entity.Carrier;
|
|
48
|
+
availableCarriers?: Entity.Carrier[];
|
|
47
49
|
};
|
|
48
50
|
type Paypal = Record<string, never>;
|
|
49
51
|
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { CapsToCamel } from '../utils.js';
|
|
2
|
+
import { Entity } from './index.js';
|
|
3
|
+
export declare function requestIssueBillingKeyAndPay(request: IssueBillingKeyAndPayRequest): Promise<IssueBillingKeyAndPayResponse>;
|
|
4
|
+
export type IssueBillingKeyAndPayRequest = {
|
|
5
|
+
storeId: string;
|
|
6
|
+
paymentId: string;
|
|
7
|
+
orderName: string;
|
|
8
|
+
totalAmount: number;
|
|
9
|
+
channelKey?: string;
|
|
10
|
+
pgProvider?: Entity.PgProvider;
|
|
11
|
+
isTestChannel?: boolean;
|
|
12
|
+
taxFreeAmount?: number;
|
|
13
|
+
vatAmount?: number;
|
|
14
|
+
customer?: Entity.Customer;
|
|
15
|
+
billingKeyAndPayMethod: Entity.BillingKeyAndPayMethod;
|
|
16
|
+
windowType?: Entity.WindowTypes;
|
|
17
|
+
redirectUrl?: string;
|
|
18
|
+
noticeUrls?: string[];
|
|
19
|
+
confirmUrl?: string;
|
|
20
|
+
locale?: Entity.Locale;
|
|
21
|
+
isCulturalExpense?: boolean;
|
|
22
|
+
customData?: Record<string, any>;
|
|
23
|
+
offerPeriod?: Entity.OfferPeriod;
|
|
24
|
+
appScheme?: string;
|
|
25
|
+
productType?: Entity.ProductType;
|
|
26
|
+
storeDetails?: Entity.StoreDetails;
|
|
27
|
+
country?: Entity.Country;
|
|
28
|
+
bypass?: Entity.IssueBillingKeyAndPayBypass;
|
|
29
|
+
} & BillingKeyAndPayMethodOptions<'MOBILE', Mobile>;
|
|
30
|
+
/**
|
|
31
|
+
* iframe/popup 방식으로 PG사 창이 렌더링 된 경우
|
|
32
|
+
* 프로세스 종료 후, 콜백 함수로 전달 될 빌링키 발급 및 결제 정보 데이터
|
|
33
|
+
*/
|
|
34
|
+
export type IssueBillingKeyAndPayResponse = {
|
|
35
|
+
transactionType: typeof Entity.TransactionType.ISSUE_BILLING_KEY_AND_PAY;
|
|
36
|
+
txId: string;
|
|
37
|
+
paymentId: string;
|
|
38
|
+
billingKey: string;
|
|
39
|
+
code?: string;
|
|
40
|
+
message?: string;
|
|
41
|
+
};
|
|
42
|
+
type BillingKeyAndPayMethodOptions<Method extends Entity.BillingKeyAndPayMethod, T> = {
|
|
43
|
+
billingKeyAndPayMethod: Method;
|
|
44
|
+
} & {
|
|
45
|
+
[K in Method as CapsToCamel<K>]?: T;
|
|
46
|
+
};
|
|
47
|
+
type Mobile = {
|
|
48
|
+
carrier?: Entity.Carrier;
|
|
49
|
+
availableCarriers?: Entity.Carrier[];
|
|
50
|
+
};
|
|
51
|
+
export {};
|
|
@@ -9,6 +9,7 @@ export type PaymentRequest = {
|
|
|
9
9
|
channelKey?: string;
|
|
10
10
|
pgProvider?: Entity.PgProvider;
|
|
11
11
|
isTestChannel?: boolean;
|
|
12
|
+
channelGroupId?: string;
|
|
12
13
|
taxFreeAmount?: number;
|
|
13
14
|
vatAmount?: number;
|
|
14
15
|
customer?: Entity.Customer;
|
|
@@ -29,7 +30,7 @@ export type PaymentRequest = {
|
|
|
29
30
|
bypass?: Entity.PaymentBypass;
|
|
30
31
|
country?: Entity.Country;
|
|
31
32
|
shippingAddress?: Entity.Address;
|
|
32
|
-
} & (PayMethodOptions<'CARD', Card> | PayMethodOptions<'VIRTUAL_ACCOUNT', VirtualAccount> | PayMethodOptions<'TRANSFER', Transfer> | PayMethodOptions<'MOBILE', Mobile> | PayMethodOptions<'GIFT_CERTIFICATE', GiftCertificate> | PayMethodOptions<'EASY_PAY', EasyPay> | PayMethodOptions<'PAYPAL', Paypal>);
|
|
33
|
+
} & (PayMethodOptions<'CARD', Card> | PayMethodOptions<'VIRTUAL_ACCOUNT', VirtualAccount> | PayMethodOptions<'TRANSFER', Transfer> | PayMethodOptions<'MOBILE', Mobile> | PayMethodOptions<'GIFT_CERTIFICATE', GiftCertificate> | PayMethodOptions<'EASY_PAY', EasyPay> | PayMethodOptions<'PAYPAL', Paypal> | PayMethodOptions<'ALIPAY', Alipay>);
|
|
33
34
|
/**
|
|
34
35
|
* iframe/popup 방식으로 PG사 창이 렌더링 된 경우
|
|
35
36
|
* 프로세스 종료 후, 콜백 함수로 전달 될 결제 정보 데이터
|
|
@@ -53,6 +54,7 @@ type Card = {
|
|
|
53
54
|
useAppCardOnly?: boolean;
|
|
54
55
|
availableCards?: Entity.CardCompany[];
|
|
55
56
|
useFreeInterestFromMall?: boolean;
|
|
57
|
+
useInstallment?: boolean;
|
|
56
58
|
};
|
|
57
59
|
type VirtualAccount = {
|
|
58
60
|
cashReceiptType?: Entity.CashReceiptType;
|
|
@@ -74,6 +76,7 @@ type Transfer = {
|
|
|
74
76
|
};
|
|
75
77
|
type Mobile = {
|
|
76
78
|
carrier?: Entity.Carrier;
|
|
79
|
+
availableCarriers?: Entity.Carrier[];
|
|
77
80
|
};
|
|
78
81
|
type GiftCertificate = {
|
|
79
82
|
giftCertificateType?: Entity.GiftCertificateType;
|
|
@@ -86,6 +89,9 @@ type EasyPay = {
|
|
|
86
89
|
cashReceiptType?: Entity.CashReceiptType;
|
|
87
90
|
customerIdentifier?: string;
|
|
88
91
|
useCardPoint?: boolean;
|
|
92
|
+
availablePayMethods?: Entity.EasyPayPaymentMethod[];
|
|
93
|
+
useInstallment?: boolean;
|
|
89
94
|
};
|
|
90
95
|
type Paypal = Record<string, never>;
|
|
96
|
+
type Alipay = Record<string, never>;
|
|
91
97
|
export {};
|
package/dist/v2.cjs
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _a;
|
|
6
6
|
let promise = null;
|
|
7
7
|
const portone = {
|
|
8
|
-
jsSdkUrl: (_a =
|
|
8
|
+
jsSdkUrl: (_a = '/v2/browser-sdk.js') !== null && _a !== void 0 ? _a : 'https://cdn.portone.io/v2/browser-sdk.js',
|
|
9
9
|
};
|
|
10
10
|
function findScript() {
|
|
11
11
|
return document.querySelector(`script[src="${portone.jsSdkUrl}"]`);
|
|
@@ -52,16 +52,36 @@ function setPortOneJsSdkUrl(url) {
|
|
|
52
52
|
return (portone.jsSdkUrl = url);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
function
|
|
56
|
-
return loadScript().then((sdk) => sdk.
|
|
55
|
+
function requestIdentityVerification(request) {
|
|
56
|
+
return loadScript().then((sdk) => sdk.requestIdentityVerification(request));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function requestIssueBillingKeyAndPay(request) {
|
|
60
|
+
return loadScript().then((sdk) => sdk.requestIssueBillingKeyAndPay(request));
|
|
57
61
|
}
|
|
58
62
|
|
|
59
63
|
function requestIssueBillingKey(request) {
|
|
60
64
|
return loadScript().then((sdk) => sdk.requestIssueBillingKey(request));
|
|
61
65
|
}
|
|
62
66
|
|
|
63
|
-
function
|
|
64
|
-
return loadScript().then((sdk) => sdk.
|
|
67
|
+
function requestPayment(request) {
|
|
68
|
+
return loadScript().then((sdk) => sdk.requestPayment(request));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function loadPaymentUI(request, callbacks) {
|
|
72
|
+
return loadScript().then((sdk) => sdk.loadPaymentUI(request, callbacks));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function loadIssueBillingKeyUI(request, callbacks) {
|
|
76
|
+
return loadScript().then((sdk) => sdk.loadIssueBillingKeyUI(request, callbacks));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function updateLoadPaymentUIRequest(request) {
|
|
80
|
+
return loadScript().then((sdk) => sdk.updateLoadPaymentUIRequest(request));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function updateLoadIssueBillingKeyUIRequest(request) {
|
|
84
|
+
return loadScript().then((sdk) => sdk.updateLoadIssueBillingKeyUIRequest(request));
|
|
65
85
|
}
|
|
66
86
|
|
|
67
87
|
// 계좌이체, 가상계좌 발급시 사용되는 은행 코드
|
|
@@ -144,6 +164,11 @@ const Bank = {
|
|
|
144
164
|
CAPE_INVESTMENT_CERTIFICATE: 'BANK_CAPE_INVESTMENT_CERTIFICATE', // 케이프투자증권
|
|
145
165
|
};
|
|
146
166
|
|
|
167
|
+
// 빌링키 발급 및 결제 수단
|
|
168
|
+
const BillingKeyAndPayMethod = {
|
|
169
|
+
MOBILE: 'MOBILE', // 휴대폰
|
|
170
|
+
};
|
|
171
|
+
|
|
147
172
|
// 빌링키 발급 수단
|
|
148
173
|
const BillingKeyMethod = {
|
|
149
174
|
CARD: 'CARD',
|
|
@@ -557,7 +582,6 @@ const Currency = {
|
|
|
557
582
|
MWK: 'CURRENCY_MWK',
|
|
558
583
|
MXN: 'CURRENCY_MXN',
|
|
559
584
|
MXV: 'CURRENCY_MXV',
|
|
560
|
-
MYR: 'CURRENCY_MYR',
|
|
561
585
|
MZN: 'CURRENCY_MZN',
|
|
562
586
|
NAD: 'CURRENCY_NAD',
|
|
563
587
|
NGN: 'CURRENCY_NGN',
|
|
@@ -650,10 +674,6 @@ const EasyPayProvider = {
|
|
|
650
674
|
APPLEPAY: 'EASY_PAY_PROVIDER_APPLEPAY',
|
|
651
675
|
PINPAY: 'EASY_PAY_PROVIDER_PINPAY',
|
|
652
676
|
SKPAY: 'EASY_PAY_PROVIDER_SKPAY',
|
|
653
|
-
NAVERPAY_CARD: 'EASY_PAY_PROVIDER_NAVERPAY_CARD',
|
|
654
|
-
NAVERPAY_POINT: 'EASY_PAY_PROVIDER_NAVERPAY_POINT',
|
|
655
|
-
SSGPAY_POINT: 'EASY_PAY_PROVIDER_SSGPAY_POINT',
|
|
656
|
-
SSGPAY_BANK: 'EASY_PAY_PROVIDER_SSGPAY_BANK',
|
|
657
677
|
TOSS_BRANDPAY: 'EASY_PAY_PROVIDER_TOSS_BRANDPAY',
|
|
658
678
|
};
|
|
659
679
|
|
|
@@ -670,6 +690,7 @@ const GiftCertificateType = {
|
|
|
670
690
|
SMART_MUNSANG: 'GIFT_CERTIFICATE_TYPE_SMART_MUNSANG',
|
|
671
691
|
CULTURELAND: 'GIFT_CERTIFICATE_TYPE_CULTURELAND',
|
|
672
692
|
HAPPYMONEY: 'GIFT_CERTIFICATE_TYPE_HAPPYMONEY',
|
|
693
|
+
CULTURE_GIFT: 'GIFT_CERTIFICATE_TYPE_CULTURE_GIFT',
|
|
673
694
|
};
|
|
674
695
|
|
|
675
696
|
// PG사 창 언어 설정
|
|
@@ -722,6 +743,8 @@ const PgProvider = {
|
|
|
722
743
|
SMARTRO_V2: 'PG_PROVIDER_SMARTRO_V2',
|
|
723
744
|
NICE_V2: 'PG_PROVIDER_NICE_V2',
|
|
724
745
|
TOSS_BRANDPAY: 'PG_PROVIDER_TOSS_BRANDPAY',
|
|
746
|
+
WELCOME: 'PG_PROVIDER_WELCOME',
|
|
747
|
+
TOSSPAY_V2: 'PG_PROVIDER_TOSSPAY_V2',
|
|
725
748
|
};
|
|
726
749
|
|
|
727
750
|
/**
|
|
@@ -729,11 +752,13 @@ const PgProvider = {
|
|
|
729
752
|
* - PAYMENT: 결제
|
|
730
753
|
* - ISSUE_BILLING_KEY: 빌링키 발급
|
|
731
754
|
* - IDENTITY_VERIFICATION: 본인 인증
|
|
755
|
+
* - ISSUE_BILLING_KEY_AND_PAY: 빌링키 발급과 동시에 결제
|
|
732
756
|
*/
|
|
733
757
|
const TransactionType = {
|
|
734
758
|
PAYMENT: 'PAYMENT',
|
|
735
759
|
ISSUE_BILLING_KEY: 'ISSUE_BILLING_KEY',
|
|
736
760
|
IDENTITY_VERIFICATION: 'IDENTITY_VERIFICATION',
|
|
761
|
+
ISSUE_BILLING_KEY_AND_PAY: 'ISSUE_BILLING_KEY_AND_PAY',
|
|
737
762
|
};
|
|
738
763
|
|
|
739
764
|
/**
|
|
@@ -747,9 +772,18 @@ const WindowType = {
|
|
|
747
772
|
UI: 'UI',
|
|
748
773
|
};
|
|
749
774
|
|
|
775
|
+
const PaymentUIType = {
|
|
776
|
+
PAYPAL_SPB: 'PAYPAL_SPB',
|
|
777
|
+
};
|
|
778
|
+
|
|
779
|
+
const IssueBillingKeyUIType = {
|
|
780
|
+
PAYPAL_RT: 'PAYPAL_RT',
|
|
781
|
+
};
|
|
782
|
+
|
|
750
783
|
var index = /*#__PURE__*/Object.freeze({
|
|
751
784
|
__proto__: null,
|
|
752
785
|
Bank: Bank,
|
|
786
|
+
BillingKeyAndPayMethod: BillingKeyAndPayMethod,
|
|
753
787
|
BillingKeyMethod: BillingKeyMethod,
|
|
754
788
|
CardCompany: CardCompany,
|
|
755
789
|
Carrier: Carrier,
|
|
@@ -758,7 +792,9 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
758
792
|
EasyPayProvider: EasyPayProvider,
|
|
759
793
|
Gender: Gender,
|
|
760
794
|
GiftCertificateType: GiftCertificateType,
|
|
795
|
+
IssueBillingKeyUIType: IssueBillingKeyUIType,
|
|
761
796
|
Locale: Locale,
|
|
797
|
+
PaymentUIType: PaymentUIType,
|
|
762
798
|
PgProvider: PgProvider,
|
|
763
799
|
TransactionType: TransactionType,
|
|
764
800
|
WindowType: WindowType
|
|
@@ -780,6 +816,23 @@ class IdentityVerificationError extends Error {
|
|
|
780
816
|
}
|
|
781
817
|
}
|
|
782
818
|
|
|
819
|
+
function isIssueBillingKeyAndPayError(error) {
|
|
820
|
+
return (isPortOneError(error) &&
|
|
821
|
+
error.__portOneErrorType === 'IssueBillingKeyAndPayError');
|
|
822
|
+
}
|
|
823
|
+
class IssueBillingKeyAndPayError extends Error {
|
|
824
|
+
constructor({ txId, paymentId, billingKey, code, message, }) {
|
|
825
|
+
super(message);
|
|
826
|
+
this.__portOneErrorType = 'IssueBillingKeyAndPayError';
|
|
827
|
+
this.transactionType = TransactionType.ISSUE_BILLING_KEY_AND_PAY;
|
|
828
|
+
this.txId = txId;
|
|
829
|
+
this.paymentId = paymentId;
|
|
830
|
+
this.billingKey = billingKey;
|
|
831
|
+
this.code = code;
|
|
832
|
+
this.message = message;
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
|
|
783
836
|
function isIssueBillingKeyError(error) {
|
|
784
837
|
return (isPortOneError(error) && error.__portOneErrorType === 'IssueBillingKeyError');
|
|
785
838
|
}
|
|
@@ -821,6 +874,33 @@ class PaymentError extends Error {
|
|
|
821
874
|
}
|
|
822
875
|
}
|
|
823
876
|
|
|
877
|
+
function isLoadIssueBillingKeyUIError(error) {
|
|
878
|
+
return (isPortOneError(error) &&
|
|
879
|
+
error.__portOneErrorType === 'LoadIssueBillingKeyUIError');
|
|
880
|
+
}
|
|
881
|
+
class LoadIssueBillingKeyUIError extends Error {
|
|
882
|
+
constructor({ code, message, }) {
|
|
883
|
+
super(message);
|
|
884
|
+
this.__portOneErrorType = 'LoadIssueBillingKeyUIError';
|
|
885
|
+
this.transactionType = TransactionType.ISSUE_BILLING_KEY;
|
|
886
|
+
this.code = code;
|
|
887
|
+
this.message = message;
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
function isLoadPaymentUIError(error) {
|
|
892
|
+
return (isPortOneError(error) && error.__portOneErrorType === 'LoadPaymentUIError');
|
|
893
|
+
}
|
|
894
|
+
class LoadPaymentUIError extends Error {
|
|
895
|
+
constructor({ code, message, }) {
|
|
896
|
+
super(message);
|
|
897
|
+
this.__portOneErrorType = 'LoadPaymentUIError';
|
|
898
|
+
this.transactionType = TransactionType.PAYMENT;
|
|
899
|
+
this.code = code;
|
|
900
|
+
this.message = message;
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
|
|
824
904
|
function isPortOneError(error) {
|
|
825
905
|
return (error != null &&
|
|
826
906
|
typeof error === 'object' &&
|
|
@@ -829,23 +909,39 @@ function isPortOneError(error) {
|
|
|
829
909
|
}
|
|
830
910
|
|
|
831
911
|
const PortOne = {
|
|
832
|
-
requestPayment,
|
|
833
|
-
requestIssueBillingKey,
|
|
834
912
|
requestIdentityVerification,
|
|
913
|
+
requestIssueBillingKeyAndPay,
|
|
914
|
+
requestIssueBillingKey,
|
|
915
|
+
requestPayment,
|
|
916
|
+
loadPaymentUI,
|
|
917
|
+
loadIssueBillingKeyUI,
|
|
918
|
+
updateLoadPaymentUIRequest,
|
|
919
|
+
updateLoadIssueBillingKeyUIRequest,
|
|
835
920
|
};
|
|
836
921
|
|
|
837
922
|
exports.Entity = index;
|
|
838
923
|
exports.IdentityVerificationError = IdentityVerificationError;
|
|
924
|
+
exports.IssueBillingKeyAndPayError = IssueBillingKeyAndPayError;
|
|
839
925
|
exports.IssueBillingKeyError = IssueBillingKeyError;
|
|
926
|
+
exports.LoadIssueBillingKeyUIError = LoadIssueBillingKeyUIError;
|
|
927
|
+
exports.LoadPaymentUIError = LoadPaymentUIError;
|
|
840
928
|
exports.ModuleError = ModuleError;
|
|
841
929
|
exports.PaymentError = PaymentError;
|
|
842
930
|
exports.__INTERNAL__setPortOneSdkUrl = setPortOneJsSdkUrl;
|
|
843
931
|
exports.default = PortOne;
|
|
844
932
|
exports.isIdentityVerificationError = isIdentityVerificationError;
|
|
933
|
+
exports.isIssueBillingKeyAndPayError = isIssueBillingKeyAndPayError;
|
|
845
934
|
exports.isIssueBillingKeyError = isIssueBillingKeyError;
|
|
935
|
+
exports.isLoadIssueBillingKeyUIError = isLoadIssueBillingKeyUIError;
|
|
936
|
+
exports.isLoadPaymentUIError = isLoadPaymentUIError;
|
|
846
937
|
exports.isModuleError = isModuleError;
|
|
847
938
|
exports.isPaymentError = isPaymentError;
|
|
848
939
|
exports.isPortOneError = isPortOneError;
|
|
940
|
+
exports.loadIssueBillingKeyUI = loadIssueBillingKeyUI;
|
|
941
|
+
exports.loadPaymentUI = loadPaymentUI;
|
|
849
942
|
exports.requestIdentityVerification = requestIdentityVerification;
|
|
850
943
|
exports.requestIssueBillingKey = requestIssueBillingKey;
|
|
944
|
+
exports.requestIssueBillingKeyAndPay = requestIssueBillingKeyAndPay;
|
|
851
945
|
exports.requestPayment = requestPayment;
|
|
946
|
+
exports.updateLoadIssueBillingKeyUIRequest = updateLoadIssueBillingKeyUIRequest;
|
|
947
|
+
exports.updateLoadPaymentUIRequest = updateLoadPaymentUIRequest;
|
package/dist/v2.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _a;
|
|
2
2
|
let promise = null;
|
|
3
3
|
const portone = {
|
|
4
|
-
jsSdkUrl: (_a =
|
|
4
|
+
jsSdkUrl: (_a = '/v2/browser-sdk.js') !== null && _a !== void 0 ? _a : 'https://cdn.portone.io/v2/browser-sdk.js',
|
|
5
5
|
};
|
|
6
6
|
function findScript() {
|
|
7
7
|
return document.querySelector(`script[src="${portone.jsSdkUrl}"]`);
|
|
@@ -48,16 +48,36 @@ function setPortOneJsSdkUrl(url) {
|
|
|
48
48
|
return (portone.jsSdkUrl = url);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
function
|
|
52
|
-
return loadScript().then((sdk) => sdk.
|
|
51
|
+
function requestIdentityVerification(request) {
|
|
52
|
+
return loadScript().then((sdk) => sdk.requestIdentityVerification(request));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function requestIssueBillingKeyAndPay(request) {
|
|
56
|
+
return loadScript().then((sdk) => sdk.requestIssueBillingKeyAndPay(request));
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
function requestIssueBillingKey(request) {
|
|
56
60
|
return loadScript().then((sdk) => sdk.requestIssueBillingKey(request));
|
|
57
61
|
}
|
|
58
62
|
|
|
59
|
-
function
|
|
60
|
-
return loadScript().then((sdk) => sdk.
|
|
63
|
+
function requestPayment(request) {
|
|
64
|
+
return loadScript().then((sdk) => sdk.requestPayment(request));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function loadPaymentUI(request, callbacks) {
|
|
68
|
+
return loadScript().then((sdk) => sdk.loadPaymentUI(request, callbacks));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function loadIssueBillingKeyUI(request, callbacks) {
|
|
72
|
+
return loadScript().then((sdk) => sdk.loadIssueBillingKeyUI(request, callbacks));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function updateLoadPaymentUIRequest(request) {
|
|
76
|
+
return loadScript().then((sdk) => sdk.updateLoadPaymentUIRequest(request));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function updateLoadIssueBillingKeyUIRequest(request) {
|
|
80
|
+
return loadScript().then((sdk) => sdk.updateLoadIssueBillingKeyUIRequest(request));
|
|
61
81
|
}
|
|
62
82
|
|
|
63
83
|
// 계좌이체, 가상계좌 발급시 사용되는 은행 코드
|
|
@@ -140,6 +160,11 @@ const Bank = {
|
|
|
140
160
|
CAPE_INVESTMENT_CERTIFICATE: 'BANK_CAPE_INVESTMENT_CERTIFICATE', // 케이프투자증권
|
|
141
161
|
};
|
|
142
162
|
|
|
163
|
+
// 빌링키 발급 및 결제 수단
|
|
164
|
+
const BillingKeyAndPayMethod = {
|
|
165
|
+
MOBILE: 'MOBILE', // 휴대폰
|
|
166
|
+
};
|
|
167
|
+
|
|
143
168
|
// 빌링키 발급 수단
|
|
144
169
|
const BillingKeyMethod = {
|
|
145
170
|
CARD: 'CARD',
|
|
@@ -553,7 +578,6 @@ const Currency = {
|
|
|
553
578
|
MWK: 'CURRENCY_MWK',
|
|
554
579
|
MXN: 'CURRENCY_MXN',
|
|
555
580
|
MXV: 'CURRENCY_MXV',
|
|
556
|
-
MYR: 'CURRENCY_MYR',
|
|
557
581
|
MZN: 'CURRENCY_MZN',
|
|
558
582
|
NAD: 'CURRENCY_NAD',
|
|
559
583
|
NGN: 'CURRENCY_NGN',
|
|
@@ -646,10 +670,6 @@ const EasyPayProvider = {
|
|
|
646
670
|
APPLEPAY: 'EASY_PAY_PROVIDER_APPLEPAY',
|
|
647
671
|
PINPAY: 'EASY_PAY_PROVIDER_PINPAY',
|
|
648
672
|
SKPAY: 'EASY_PAY_PROVIDER_SKPAY',
|
|
649
|
-
NAVERPAY_CARD: 'EASY_PAY_PROVIDER_NAVERPAY_CARD',
|
|
650
|
-
NAVERPAY_POINT: 'EASY_PAY_PROVIDER_NAVERPAY_POINT',
|
|
651
|
-
SSGPAY_POINT: 'EASY_PAY_PROVIDER_SSGPAY_POINT',
|
|
652
|
-
SSGPAY_BANK: 'EASY_PAY_PROVIDER_SSGPAY_BANK',
|
|
653
673
|
TOSS_BRANDPAY: 'EASY_PAY_PROVIDER_TOSS_BRANDPAY',
|
|
654
674
|
};
|
|
655
675
|
|
|
@@ -666,6 +686,7 @@ const GiftCertificateType = {
|
|
|
666
686
|
SMART_MUNSANG: 'GIFT_CERTIFICATE_TYPE_SMART_MUNSANG',
|
|
667
687
|
CULTURELAND: 'GIFT_CERTIFICATE_TYPE_CULTURELAND',
|
|
668
688
|
HAPPYMONEY: 'GIFT_CERTIFICATE_TYPE_HAPPYMONEY',
|
|
689
|
+
CULTURE_GIFT: 'GIFT_CERTIFICATE_TYPE_CULTURE_GIFT',
|
|
669
690
|
};
|
|
670
691
|
|
|
671
692
|
// PG사 창 언어 설정
|
|
@@ -718,6 +739,8 @@ const PgProvider = {
|
|
|
718
739
|
SMARTRO_V2: 'PG_PROVIDER_SMARTRO_V2',
|
|
719
740
|
NICE_V2: 'PG_PROVIDER_NICE_V2',
|
|
720
741
|
TOSS_BRANDPAY: 'PG_PROVIDER_TOSS_BRANDPAY',
|
|
742
|
+
WELCOME: 'PG_PROVIDER_WELCOME',
|
|
743
|
+
TOSSPAY_V2: 'PG_PROVIDER_TOSSPAY_V2',
|
|
721
744
|
};
|
|
722
745
|
|
|
723
746
|
/**
|
|
@@ -725,11 +748,13 @@ const PgProvider = {
|
|
|
725
748
|
* - PAYMENT: 결제
|
|
726
749
|
* - ISSUE_BILLING_KEY: 빌링키 발급
|
|
727
750
|
* - IDENTITY_VERIFICATION: 본인 인증
|
|
751
|
+
* - ISSUE_BILLING_KEY_AND_PAY: 빌링키 발급과 동시에 결제
|
|
728
752
|
*/
|
|
729
753
|
const TransactionType = {
|
|
730
754
|
PAYMENT: 'PAYMENT',
|
|
731
755
|
ISSUE_BILLING_KEY: 'ISSUE_BILLING_KEY',
|
|
732
756
|
IDENTITY_VERIFICATION: 'IDENTITY_VERIFICATION',
|
|
757
|
+
ISSUE_BILLING_KEY_AND_PAY: 'ISSUE_BILLING_KEY_AND_PAY',
|
|
733
758
|
};
|
|
734
759
|
|
|
735
760
|
/**
|
|
@@ -743,9 +768,18 @@ const WindowType = {
|
|
|
743
768
|
UI: 'UI',
|
|
744
769
|
};
|
|
745
770
|
|
|
771
|
+
const PaymentUIType = {
|
|
772
|
+
PAYPAL_SPB: 'PAYPAL_SPB',
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
const IssueBillingKeyUIType = {
|
|
776
|
+
PAYPAL_RT: 'PAYPAL_RT',
|
|
777
|
+
};
|
|
778
|
+
|
|
746
779
|
var index = /*#__PURE__*/Object.freeze({
|
|
747
780
|
__proto__: null,
|
|
748
781
|
Bank: Bank,
|
|
782
|
+
BillingKeyAndPayMethod: BillingKeyAndPayMethod,
|
|
749
783
|
BillingKeyMethod: BillingKeyMethod,
|
|
750
784
|
CardCompany: CardCompany,
|
|
751
785
|
Carrier: Carrier,
|
|
@@ -754,7 +788,9 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
754
788
|
EasyPayProvider: EasyPayProvider,
|
|
755
789
|
Gender: Gender,
|
|
756
790
|
GiftCertificateType: GiftCertificateType,
|
|
791
|
+
IssueBillingKeyUIType: IssueBillingKeyUIType,
|
|
757
792
|
Locale: Locale,
|
|
793
|
+
PaymentUIType: PaymentUIType,
|
|
758
794
|
PgProvider: PgProvider,
|
|
759
795
|
TransactionType: TransactionType,
|
|
760
796
|
WindowType: WindowType
|
|
@@ -776,6 +812,23 @@ class IdentityVerificationError extends Error {
|
|
|
776
812
|
}
|
|
777
813
|
}
|
|
778
814
|
|
|
815
|
+
function isIssueBillingKeyAndPayError(error) {
|
|
816
|
+
return (isPortOneError(error) &&
|
|
817
|
+
error.__portOneErrorType === 'IssueBillingKeyAndPayError');
|
|
818
|
+
}
|
|
819
|
+
class IssueBillingKeyAndPayError extends Error {
|
|
820
|
+
constructor({ txId, paymentId, billingKey, code, message, }) {
|
|
821
|
+
super(message);
|
|
822
|
+
this.__portOneErrorType = 'IssueBillingKeyAndPayError';
|
|
823
|
+
this.transactionType = TransactionType.ISSUE_BILLING_KEY_AND_PAY;
|
|
824
|
+
this.txId = txId;
|
|
825
|
+
this.paymentId = paymentId;
|
|
826
|
+
this.billingKey = billingKey;
|
|
827
|
+
this.code = code;
|
|
828
|
+
this.message = message;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
|
|
779
832
|
function isIssueBillingKeyError(error) {
|
|
780
833
|
return (isPortOneError(error) && error.__portOneErrorType === 'IssueBillingKeyError');
|
|
781
834
|
}
|
|
@@ -817,6 +870,33 @@ class PaymentError extends Error {
|
|
|
817
870
|
}
|
|
818
871
|
}
|
|
819
872
|
|
|
873
|
+
function isLoadIssueBillingKeyUIError(error) {
|
|
874
|
+
return (isPortOneError(error) &&
|
|
875
|
+
error.__portOneErrorType === 'LoadIssueBillingKeyUIError');
|
|
876
|
+
}
|
|
877
|
+
class LoadIssueBillingKeyUIError extends Error {
|
|
878
|
+
constructor({ code, message, }) {
|
|
879
|
+
super(message);
|
|
880
|
+
this.__portOneErrorType = 'LoadIssueBillingKeyUIError';
|
|
881
|
+
this.transactionType = TransactionType.ISSUE_BILLING_KEY;
|
|
882
|
+
this.code = code;
|
|
883
|
+
this.message = message;
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
function isLoadPaymentUIError(error) {
|
|
888
|
+
return (isPortOneError(error) && error.__portOneErrorType === 'LoadPaymentUIError');
|
|
889
|
+
}
|
|
890
|
+
class LoadPaymentUIError extends Error {
|
|
891
|
+
constructor({ code, message, }) {
|
|
892
|
+
super(message);
|
|
893
|
+
this.__portOneErrorType = 'LoadPaymentUIError';
|
|
894
|
+
this.transactionType = TransactionType.PAYMENT;
|
|
895
|
+
this.code = code;
|
|
896
|
+
this.message = message;
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
|
|
820
900
|
function isPortOneError(error) {
|
|
821
901
|
return (error != null &&
|
|
822
902
|
typeof error === 'object' &&
|
|
@@ -825,9 +905,14 @@ function isPortOneError(error) {
|
|
|
825
905
|
}
|
|
826
906
|
|
|
827
907
|
const PortOne = {
|
|
828
|
-
requestPayment,
|
|
829
|
-
requestIssueBillingKey,
|
|
830
908
|
requestIdentityVerification,
|
|
909
|
+
requestIssueBillingKeyAndPay,
|
|
910
|
+
requestIssueBillingKey,
|
|
911
|
+
requestPayment,
|
|
912
|
+
loadPaymentUI,
|
|
913
|
+
loadIssueBillingKeyUI,
|
|
914
|
+
updateLoadPaymentUIRequest,
|
|
915
|
+
updateLoadIssueBillingKeyUIRequest,
|
|
831
916
|
};
|
|
832
917
|
|
|
833
|
-
export { index as Entity, IdentityVerificationError, IssueBillingKeyError, ModuleError, PaymentError, setPortOneJsSdkUrl as __INTERNAL__setPortOneSdkUrl, PortOne as default, isIdentityVerificationError, isIssueBillingKeyError, isModuleError, isPaymentError, isPortOneError, requestIdentityVerification, requestIssueBillingKey, requestPayment };
|
|
918
|
+
export { index as Entity, IdentityVerificationError, IssueBillingKeyAndPayError, IssueBillingKeyError, LoadIssueBillingKeyUIError, LoadPaymentUIError, ModuleError, PaymentError, setPortOneJsSdkUrl as __INTERNAL__setPortOneSdkUrl, PortOne as default, isIdentityVerificationError, isIssueBillingKeyAndPayError, isIssueBillingKeyError, isLoadIssueBillingKeyUIError, isLoadPaymentUIError, isModuleError, isPaymentError, isPortOneError, loadIssueBillingKeyUI, loadPaymentUI, requestIdentityVerification, requestIssueBillingKey, requestIssueBillingKeyAndPay, requestPayment, updateLoadIssueBillingKeyUIRequest, updateLoadPaymentUIRequest };
|