@portone/browser-sdk 0.0.4 → 0.0.6

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/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  > **Warning**
4
4
  >
5
- > Browser SDK에서는 포트원 V2 베타 기능만 제공하고 있습니다.\
6
- > [V2 연동 시작하기 > 사용 가능한 PG사](https://developers.portone.io/docs/ko/v2-payment/v2#%EC%82%AC%EC%9A%A9-%EA%B0%80%EB%8A%A5%ED%95%9C-pg%EC%82%AC)
5
+ > Browser SDK 포트원 V2 모듈만을 지원합니다.\
6
+ > [V2 신모듈 소개](https://developers.portone.io/docs/ko/v2-payment/v2?v=v2)
7
7
  > 문서를 참고해주세요.
8
8
 
9
9
  `@portone/browser-sdk` 패키지를 통해 포트원 결제 연동을 빠르게 진행할 수
@@ -16,13 +16,18 @@
16
16
  npm i @portone/browser-sdk
17
17
  yarn add @portone/browser-sdk
18
18
  pnpm i @portone/browser-sdk
19
+ bun add @portone/browser-sdk
19
20
  ```
20
21
 
21
22
  ## Documentation
22
23
 
23
- [V2 연동하기 > 인증결제 연동하기](https://developers.portone.io/docs/ko/v2-payment/v2)
24
+ [V2 연동하기 > 인증 결제 연동하기](https://developers.portone.io/docs/ko/v2-payment/authpay?v=v2)
24
25
  문서를 참고해주세요.
25
26
 
27
+ ## Changelog
28
+
29
+ [JavaScript SDK 연동하기 > 버전별 Changelog](https://developers.portone.io/docs/ko/v2-payment/v2-sdk/changelog?v=v2) 문서를 참고해주세요.
30
+
26
31
  ## Support
27
32
 
28
33
  패키지에 문제가 있거나 결제 연동 시 도움이 필요하신 경우
@@ -21,5 +21,6 @@ export declare const CardCompany: {
21
21
  readonly KOOKMIN_CARD: "CARD_COMPANY_KOOKMIN_CARD";
22
22
  readonly K_BANK: "CARD_COMPANY_K_BANK";
23
23
  readonly TOSS_BANK: "CARD_COMPANY_TOSS_BANK";
24
+ readonly MIRAE_ASSET_SECURITIES: "CARD_COMPANY_MIRAE_ASSET_SECURITIES";
24
25
  };
25
26
  export type CardCompany = typeof CardCompany[keyof typeof CardCompany];
@@ -42,5 +42,7 @@ export declare const PgProvider: {
42
42
  readonly TOSS_BRANDPAY: "PG_PROVIDER_TOSS_BRANDPAY";
43
43
  readonly WELCOME: "PG_PROVIDER_WELCOME";
44
44
  readonly TOSSPAY_V2: "PG_PROVIDER_TOSSPAY_V2";
45
+ readonly INICIS_V2: "PG_PROVIDER_INICIS_V2";
46
+ readonly KPN: "PG_PROVIDER_KPN";
45
47
  };
46
48
  export type PgProvider = typeof PgProvider[keyof typeof PgProvider];
@@ -0,0 +1,8 @@
1
+ export type InicisV2IssueBillingKeyBypass = InicisV2IssueBillingKeyBypassOnMobile;
2
+ type InicisV2IssueBillingKeyBypassOnMobile = {
3
+ /**
4
+ * 개인/법인카드 선택 옵션 ["percard":개인카드만 선택 가능,"cocard":법인 카드만 선택 가능]
5
+ */
6
+ carduse?: 'percard' | 'cocard';
7
+ };
8
+ export {};
@@ -3,10 +3,12 @@ import { SmartroV2IssueBillingKeyBypass } from './SmartroV2.js';
3
3
  import { NaverpayIssueBillingKeyBypass } from './Naverpay.js';
4
4
  import { WelcomeIssueBillingKeyBypass } from './Welcome.js';
5
5
  import { TosspayV2IssueBillingKeyBypass } from './TosspayV2.js';
6
+ import { InicisV2IssueBillingKeyBypass } from './InicisV2.js';
6
7
  export type IssueBillingKeyBypass = {
7
8
  kakaopay?: KakaopayPaymentBypass;
8
9
  smartro_v2?: SmartroV2IssueBillingKeyBypass;
9
10
  naverpay?: NaverpayIssueBillingKeyBypass;
10
11
  welcome?: WelcomeIssueBillingKeyBypass;
11
12
  tosspay_v2?: TosspayV2IssueBillingKeyBypass;
13
+ inicis_v2?: InicisV2IssueBillingKeyBypass;
12
14
  };
@@ -0,0 +1,98 @@
1
+ export type InicisV2Bypass = InicisV2BypassOnPc & InicisV2BypassOnMobile;
2
+ type InicisV2BypassOnPc = {
3
+ /**
4
+ * 메인로고 삽입 [size: 89*18]
5
+ */
6
+ logo_url?: string;
7
+ /**
8
+ * 서브로고 삽입 [size: 64*13]
9
+ */
10
+ logo_2nd?: string;
11
+ /**
12
+ * 보호자 이메일주소
13
+ * 14세 미만 필수, "@", "." 외 특수문자 입력불가
14
+ */
15
+ parentemail?: string;
16
+ /**
17
+ * SSGPAY 결제요청 시 PUSH전송 휴대폰번호
18
+ * 숫자만 허용
19
+ */
20
+ Ini_SSGPAY_MDN?: string;
21
+ /**
22
+ * 지불수단별 추가옵션
23
+ */
24
+ acceptmethod?: AcceptMethodKeyFromBypass[];
25
+ };
26
+ type InicisV2BypassOnMobile = {
27
+ /**
28
+ * 신용카드 우선선택 옵션
29
+ * 설정한 카드코드에 해당하는 카드가 선택된 채로 Display 됨
30
+ *
31
+ * 형식) selcode=카드코드
32
+ * 예시) selcode=14
33
+ */
34
+ P_CARD_OPTION?: string;
35
+ /**
36
+ * 가맹점 이름
37
+ */
38
+ P_MNAME?: string;
39
+ /**
40
+ * 지불수단별 추가옵션
41
+ */
42
+ P_RESERVED?: ReservedKeyFromBypass[];
43
+ };
44
+ type AcceptMethodKeyFromBypass =
45
+ /**
46
+ * 결제창 배경색상 [Default: #C1272C]
47
+ */
48
+ `SKIN(${string})`
49
+ /**
50
+ * 신용카드 결제 시 1000원 이하금액 결제가능 옵션
51
+ */
52
+ | `below1000`
53
+ /**
54
+ * 카드 메인화면에 OCB 적립을 위한 카드번호 창 표시옵션
55
+ */
56
+ | `ocb`
57
+ /**
58
+ * 안심클릭계열 신용카드 POPUP 형태 표시옵션
59
+ */
60
+ | `paypopup`
61
+ /**
62
+ * 프로그래스바 미노출 옵션
63
+ */
64
+ | `hidebar`
65
+ /**
66
+ * 간편결제 미노출 옵션
67
+ */
68
+ | `noeasypay`
69
+ /**
70
+ * 부분 무이자 설정. 슬림 할부
71
+ * 형식) slimquota(코드-개월:개월^코드-개월:개월)
72
+ * 예시) slimquota(11-2:3^34-2:3)
73
+ */
74
+ | `slimquota(${string})`
75
+ /**
76
+ * 형식) mallpoint(카드코드:카드코드)
77
+ * 예시) mallpoint(11:34)
78
+ */
79
+ | `mallpoint(${string})`;
80
+ type ReservedKeyFromBypass =
81
+ /**
82
+ * 신용카드 결제 시 1000원 이하금액 결제가능 옵션
83
+ */
84
+ `below1000=Y`
85
+ /**
86
+ * 간편결제 미노출 옵션
87
+ */
88
+ | `noeasypay=Y`
89
+ /**
90
+ * 해외카드 노출 옵션
91
+ */
92
+ | `global_visa3d=Y`
93
+ /**
94
+ * 안드로이드 앱 내 웹뷰에서 ISP 결제 진행 시
95
+ * custom url scheme(ispmobile://) 대신 intent:// 로 처리할 지 여부
96
+ */
97
+ | `apprun_check=Y`;
98
+ export {};
@@ -0,0 +1,15 @@
1
+ /**
2
+ * 정규화가 어려운 KPN bypass 파라미터
3
+ * 가맹점으로부터 전달 된 값을 PG사로 그대로 전달
4
+ */
5
+ export type KpnBypass = {
6
+ /**
7
+ * GLOBAL('09') : 해외카드 (VISA + MASTER + JCB)
8
+ * 11PAY('96') : 11Pay (SKPay)
9
+ * LEGACY_AUTH('98') : 구인증
10
+ * KEY_IN('99') : 키인
11
+ * 'W2' : 페이코 (now Unsupported!!)
12
+ * 'X4' : 카카오페이 (now Unsupported!!)
13
+ */
14
+ CardSelect: Array<'GLOBAL' | '11PAY' | 'LEGACY_AUTH' | 'KEY_IN'>;
15
+ };
@@ -7,6 +7,8 @@ import { NiceV2PaymentBypass } from './NiceV2.js';
7
7
  import { TossBrandpayPaymentBypass } from './TossBrandpay.js';
8
8
  import { WelcomePaymentBypass } from './Welcome.js';
9
9
  import { TosspayV2PaymentBypass } from './TosspayV2.js';
10
+ import { InicisV2Bypass } from './InicisV2.js';
11
+ import { KpnBypass } from './Kpn.js';
10
12
  export type PaymentBypass = {
11
13
  tosspayments?: TosspaymentsPaymentBypass;
12
14
  ksnet?: KsnetPaymentBypass;
@@ -17,4 +19,6 @@ export type PaymentBypass = {
17
19
  toss_brandpay?: TossBrandpayPaymentBypass;
18
20
  welcome?: WelcomePaymentBypass;
19
21
  tosspay_v2?: TosspayV2PaymentBypass;
22
+ inicis_v2?: InicisV2Bypass;
23
+ kpn?: KpnBypass;
20
24
  };
@@ -15,7 +15,6 @@ export type LoadIssueBillingKeyUIRequest = {
15
15
  billingKeyMethod: Entity.BillingKeyMethod;
16
16
  issueName?: string;
17
17
  issueId?: string;
18
- billingKey?: string;
19
18
  customer?: Entity.Customer;
20
19
  redirectUrl?: string;
21
20
  locale?: Entity.Locale;
@@ -11,12 +11,12 @@ export type IssueBillingKeyRequest = {
11
11
  billingKeyMethod: Entity.BillingKeyMethod;
12
12
  issueName?: string;
13
13
  issueId?: string;
14
- billingKey?: string;
15
14
  customer?: Entity.Customer;
16
15
  windowType?: Entity.WindowTypes;
17
16
  redirectUrl?: string;
18
17
  locale?: Entity.Locale;
19
18
  customData?: Record<string, any>;
19
+ offerPeriod?: Entity.OfferPeriod;
20
20
  appScheme?: string;
21
21
  noticeUrls?: string[];
22
22
  productType?: Entity.ProductType;
@@ -6,6 +6,7 @@ export type IssueBillingKeyAndPayRequest = {
6
6
  paymentId: string;
7
7
  orderName: string;
8
8
  totalAmount: number;
9
+ currency: Entity.Currency;
9
10
  channelKey?: string;
10
11
  pgProvider?: Entity.PgProvider;
11
12
  isTestChannel?: boolean;
@@ -16,7 +17,6 @@ export type IssueBillingKeyAndPayRequest = {
16
17
  windowType?: Entity.WindowTypes;
17
18
  redirectUrl?: string;
18
19
  noticeUrls?: string[];
19
- confirmUrl?: string;
20
20
  locale?: Entity.Locale;
21
21
  isCulturalExpense?: boolean;
22
22
  customData?: Record<string, any>;
@@ -9,7 +9,6 @@ export type PaymentRequest = {
9
9
  channelKey?: string;
10
10
  pgProvider?: Entity.PgProvider;
11
11
  isTestChannel?: boolean;
12
- channelGroupId?: string;
13
12
  taxFreeAmount?: number;
14
13
  vatAmount?: number;
15
14
  customer?: Entity.Customer;
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 = '/v2/browser-sdk.js') !== null && _a !== void 0 ? _a : 'https://cdn.portone.io/v2/browser-sdk.js',
8
+ jsSdkUrl: (_a = undefined) !== 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}"]`);
@@ -201,6 +201,7 @@ const CardCompany = {
201
201
  KOOKMIN_CARD: 'CARD_COMPANY_KOOKMIN_CARD',
202
202
  K_BANK: 'CARD_COMPANY_K_BANK',
203
203
  TOSS_BANK: 'CARD_COMPANY_TOSS_BANK',
204
+ MIRAE_ASSET_SECURITIES: 'CARD_COMPANY_MIRAE_ASSET_SECURITIES',
204
205
  };
205
206
 
206
207
  /**
@@ -745,6 +746,8 @@ const PgProvider = {
745
746
  TOSS_BRANDPAY: 'PG_PROVIDER_TOSS_BRANDPAY',
746
747
  WELCOME: 'PG_PROVIDER_WELCOME',
747
748
  TOSSPAY_V2: 'PG_PROVIDER_TOSSPAY_V2',
749
+ INICIS_V2: 'PG_PROVIDER_INICIS_V2',
750
+ KPN: 'PG_PROVIDER_KPN',
748
751
  };
749
752
 
750
753
  /**
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 = '/v2/browser-sdk.js') !== null && _a !== void 0 ? _a : 'https://cdn.portone.io/v2/browser-sdk.js',
4
+ jsSdkUrl: (_a = undefined) !== 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}"]`);
@@ -197,6 +197,7 @@ const CardCompany = {
197
197
  KOOKMIN_CARD: 'CARD_COMPANY_KOOKMIN_CARD',
198
198
  K_BANK: 'CARD_COMPANY_K_BANK',
199
199
  TOSS_BANK: 'CARD_COMPANY_TOSS_BANK',
200
+ MIRAE_ASSET_SECURITIES: 'CARD_COMPANY_MIRAE_ASSET_SECURITIES',
200
201
  };
201
202
 
202
203
  /**
@@ -741,6 +742,8 @@ const PgProvider = {
741
742
  TOSS_BRANDPAY: 'PG_PROVIDER_TOSS_BRANDPAY',
742
743
  WELCOME: 'PG_PROVIDER_WELCOME',
743
744
  TOSSPAY_V2: 'PG_PROVIDER_TOSSPAY_V2',
745
+ INICIS_V2: 'PG_PROVIDER_INICIS_V2',
746
+ KPN: 'PG_PROVIDER_KPN',
744
747
  };
745
748
 
746
749
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@portone/browser-sdk",
3
3
  "type": "module",
4
- "version": "0.0.4",
4
+ "version": "0.0.6",
5
5
  "description": "PortOne SDK for browser",
6
6
  "keywords": [
7
7
  "PortOne",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "scripts": {
41
41
  "build": "rm -rf dist && rollup -c && tsconfig-replace-paths -s src",
42
- "prepublishOnly": "npm run build"
42
+ "prepublishOnly": "yarn build"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@rollup/plugin-alias": "^5.0.0",
@@ -51,4 +51,4 @@
51
51
  "tslib": "^2.6.0",
52
52
  "typescript": "^5.1.6"
53
53
  }
54
- }
54
+ }