Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

인증결제 가이드 통합 #426

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/content/docs/_redir.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,27 @@
- old: /ko/ready/3-v2
new: /ko/ready/readme?v=v2#integration-identifiers

- old: /ko/auth/guide/def
new: /ko/authpay/guide#definition
- old: /ko/auth/guide/1
new: /ko/authpay/guide?v=v1#sdk-installation
- old: /ko/auth/guide/2
new: /ko/authpay/guide?v=v1#sdk-initialization
- old: /ko/auth/guide/3
new: /ko/authpay/guide?v=v1#request-payment
- old: /ko/auth/guide/4/readme
new: /ko/authpay/guide?v=v1#handle-result
- old: /ko/auth/guide/4/iframe
new: /ko/authpay/guide?v=v1#handle-callback
- old: /ko/auth/guide/4/redirect
new: /ko/authpay/guide?v=v1#handle-redirect
- old: /ko/auth/guide/5/readme
new: /ko/authpay/guide?v=v1#complete
- old: /ko/auth/guide/5/post
new: /ko/authpay/guide?v=v1#complete
- old: /ko/v2-payment/authpay
new: /ko/authpay/guide?v=v2

# 신규 API 문서
- old: /ko/api/api
new: https://developers.portone.io/api/rest-v1
Expand Down
18 changes: 2 additions & 16 deletions src/content/docs/ko/_nav.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,7 @@
- label: 결제 연동
systemVersion: v1
items:
- slug: /ko/auth/guide/readme
items:
- /ko/auth/guide/def
- /ko/auth/guide/1
- /ko/auth/guide/2
- /ko/auth/guide/3
- slug: /ko/auth/guide/4/readme
items:
- /ko/auth/guide/4/iframe
- /ko/auth/guide/4/redirect
- slug: /ko/auth/guide/5/readme
items:
- /ko/auth/guide/5/pre
- /ko/auth/guide/5/post
- /ko/auth/guide/6
- slug: /ko/authpay/guide
- slug: /ko/auth/guide-1/readme
items:
- slug: /ko/auth/guide-1/bill/readme
Expand Down Expand Up @@ -303,7 +289,7 @@
systemVersion: v2
items:
- /ko/v2-payment/v2
- /ko/v2-payment/authpay
- /ko/authpay/guide
- /ko/v2-payment/key-in
- slug: /ko/v2-payment/billing-key/readme
items:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 61 additions & 0 deletions src/content/docs/ko/authpay/_components/v2-sdk-installation.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
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해서 사용합니다.

```javascript
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>
Loading