-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ESM url in v2-sdk readme & remove mention to access_token in v2
- Loading branch information
Showing
10 changed files
with
79 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
src/content/docs/ko/v2-payment/_components/sdk-installation.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import Tab from "~/components/gitbook/tabs/Tab.astro"; | ||
import Tabs from "~/components/gitbook/tabs/Tabs.astro"; | ||
import Hint from "~/components/Hint.astro"; | ||
import * as prose from '~/components/prose'; | ||
|
||
export const components = prose; | ||
|
||
포트원 V2 SDK는 npm 레지스트리와 CDN을 통해 배포되고 있습니다. | ||
|
||
- npm, yarn 등 패키지 매니저를 사용한다면 의존 대상으로 [@portone/browser-sdk](https://www.npmjs.com/package/@portone/browser-sdk)를 추가하세요. | ||
- 패키지 매니저를 사용하지 않는다면 `<script>` 요소를 이용하여 CDN에서 SDK를 직접 불러오세요. | ||
- CDN에서 ESM 모듈 형태로도 SDK를 제공하고 있습니다. | ||
|
||
<Tabs> | ||
|
||
<Tab title="패키지 의존 대상으로 추가"> | ||
|
||
사용하는 패키지 매니저에 알맞은 명령어를 실행하세요. | ||
|
||
```shell | ||
npm i @portone/browser-sdk | ||
``` | ||
|
||
```shell | ||
yarn add @portone/browser-sdk | ||
``` | ||
|
||
```shell | ||
pnpm add @portone/browser-sdk | ||
``` | ||
|
||
패키지 매니저로 SDK를 불러온 경우 `PortOne` 객체를 import해서 사용합니다. | ||
|
||
```typescript | ||
import * as PortOne from "@portone/browser-sdk/v2"; | ||
``` | ||
|
||
</Tab> | ||
|
||
<Tab title="<script> 요소로 추가"> | ||
```html | ||
<script src="https://cdn.portone.io/v2/browser-sdk.js"></script> | ||
``` | ||
|
||
`<script>` 요소로 SDK를 불러온 경우 전역 객체 `window`에 `PortOne` 객체가 추가됩니다. | ||
|
||
</Tab> | ||
|
||
<Tab title="ESM 모듈로 추가"> | ||
ESM 모듈을 사용하는 경우 URL에서 `PortOne` 객체를 직접 import할 수 있습니다. | ||
|
||
```javascript | ||
import * as PortOne from "https://cdn.portone.io/v2/browser-sdk.esm.js"; | ||
``` | ||
</Tab> | ||
|
||
</Tabs> | ||
|
||
<Hint style="info"> | ||
**타입스크립트 지원** | ||
|
||
포트원 V2 SDK는 타입스크립트 선언 파일(`.d.ts`)의 형식으로 타입 정보를 제공하고 있습니다. npm 레지스트리를 이용하는 경우 각종 개발 환경에서 별도 설정 없이 사용 가능합니다. | ||
|
||
</Hint> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/content/docs/ko/v2-payment/v2-sdk/identity-verification-request.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/content/docs/ko/v2-payment/v2-sdk/identity-verification-response.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,8 @@ | ||
--- | ||
title: JavaScript SDK 연동하기 | ||
description: 결제창 연동시 호출 및 응답 파라미터를 확인할 수 있습니다. | ||
title: JavaScript SDK 레퍼런스 | ||
description: 결제창 연동시 사용되는 SDK에 대한 설명 문서입니다. | ||
--- | ||
|
||
import Hint from "~/components/Hint.astro"; | ||
import Tab from "~/components/gitbook/tabs/Tab.astro"; | ||
import Tabs from "~/components/gitbook/tabs/Tabs.astro"; | ||
import SdkInstallation from '../_components/sdk-installation.mdx'; | ||
|
||
<Hint style="info"> | ||
이 문서는 V2 SDK 연동을 위한 문서로 [v2](../v2 "mention")을 먼저 읽으시길 권장드립니다. | ||
|
||
</Hint> | ||
|
||
고객사 프로젝트 설정에 따라 설치 방법을 선택할 수 있습니다. | ||
|
||
- NPM 의존성이 사용 가능한 경우 NPM으로 배포된 SDK를 설치하세요. | ||
- HTML `<script>` 태그를 이용하는 경우 결제창 연동을 진행할 주문 페이지에 SDK를 설치하세요. | ||
|
||
<Tabs> | ||
<Tab title="NPM 패키지로 추가"> | ||
NPM 이나 yarn 패키지 매니저를 이용해 포트원 SDK를 설치할 수 있습니다. | ||
|
||
```shell | ||
npm i @portone/browser-sdk | ||
``` | ||
|
||
```shell | ||
yarn add @portone/browser-sdk | ||
``` | ||
|
||
</Tab> | ||
|
||
<Tab title="<script> 태그로 추가"> | ||
```html | ||
<script src="https://cdn.portone.io/v2/browser-sdk.js"></script> | ||
``` | ||
|
||
</Tab> | ||
</Tabs> | ||
<SdkInstallation /> |