Skip to content

Commit

Permalink
ready/paymentwall: 핑백에 국가 코드 설정 설명 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
aimpugn committed Mar 7, 2024
1 parent 5b9884b commit e88539a
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 4 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import Figure from "~/components/Figure.astro";
import Hint from "~/components/gitbook/Hint.astro";
import Tabs from "~/components/gitbook/tabs/Tabs.astro";
import Tab from "~/components/gitbook/tabs/Tab.astro";
import image1 from "./_assets/paymentwall/paymentwall.tab.widget.png";
import image2 from "./_assets/paymentwall/paymentwall.widget.jpg";
import image3 from "./_assets/paymentwall/paymentwall.pingback.country_code.png";

### Widget (payment window) payment

Check failure on line 14 in src/content/docs/en/ready/2-pg/payment-gateway-settings/undefined-1.mdx

View workflow job for this annotation

GitHub Actions / Lint changed MDX files

First heading level should be `2`

Expand Down Expand Up @@ -92,20 +95,44 @@ Currently, PortOne supports widget codes `pw_1` and `t3_1`. To use the `pw_1` wi
1. Go to [Paymentwall Console](https://api.paymentwall.com/developers/applications) → My Projects, select the relevant project → Widgets

Check failure on line 95 in src/content/docs/en/ready/2-pg/payment-gateway-settings/undefined-1.mdx

View workflow job for this annotation

GitHub Actions / Lint changed MDX files

Line must be at most 100 characters
2. Select Version 1.2 and then save changes (SAVE CHANGES)

import image1 from "./_assets/paymentwall/paymentwall.tab.widget.png";

<Figure
src={image1}
caption="My Projects → Select relevant project → Widgets"
/>

import image2 from "./_assets/paymentwall/paymentwall.widget.jpg";

<Figure
src={image2}
caption="Select 1.2 from the top left Version → SAVE CHANGES"
/>

### User country code

You can know the user country code(alpha-2, e.g. US) as a pingback upon completion of a payment wall checkout. To get this, you need to add the [parameter provided by the paymentwall](https://docs.paymentwall.com/reference/pingback/custom-parameter#parameter-with-value-paymentwall-provides) as a pingback parameter.

Check failure on line 110 in src/content/docs/en/ready/2-pg/payment-gateway-settings/undefined-1.mdx

View workflow job for this annotation

GitHub Actions / Lint changed MDX files

Line must be at most 100 characters

1. Go to [Paymentwall Console](https://api.paymentwall.com/developers/applications) → My Projects, select the relevant project → Settings

Check failure on line 112 in src/content/docs/en/ready/2-pg/payment-gateway-settings/undefined-1.mdx

View workflow job for this annotation

GitHub Actions / Lint changed MDX files

Line must be at most 100 characters
2. Go to *Custom Pingback parameters* section

Check failure on line 113 in src/content/docs/en/ready/2-pg/payment-gateway-settings/undefined-1.mdx

View workflow job for this annotation

GitHub Actions / Lint changed MDX files

Emphasis should use `_` as a marker
3. Add *Name* as `country_code` and select *Value* as `COUNTRY_CODE`

Check failure on line 114 in src/content/docs/en/ready/2-pg/payment-gateway-settings/undefined-1.mdx

View workflow job for this annotation

GitHub Actions / Lint changed MDX files

Emphasis should use `_` as a marker

Check failure on line 114 in src/content/docs/en/ready/2-pg/payment-gateway-settings/undefined-1.mdx

View workflow job for this annotation

GitHub Actions / Lint changed MDX files

Emphasis should use `_` as a marker

<Figure src={image3} caption="Add COUNTRY_CODE at Custom Pingback parameters" />

You can check this result by adding the `extension=true` query parameter when querying payment as follows.

```jsx
GET http://api.iamport.kr/payments/{imp_uid}?extension=true
```

```json
{
// ...
"vbank_name": null,
"vbank_num": null,
"extension": {
"country_code": "KR", // User Country Code
// ...
}
}
```

### API Payment

<Tabs>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions src/content/docs/ko/ready/2-pg/payment-gateway/paymentwall.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import image3 from "./_assets/paymentwall/paymentwall-3.png";
import image4 from "./_assets/paymentwall/paymentwall-4.png";
import image5 from "./_assets/paymentwall/paymentwall.tab.widget.png";
import image6 from "./_assets/paymentwall/paymentwall.widget.jpg";
import image7 from "./_assets/paymentwall/paymentwall.pingback.country_code.png";

### 위젯(결제창)결제

Expand Down Expand Up @@ -103,6 +104,34 @@ import image6 from "./_assets/paymentwall/paymentwall.widget.jpg";

<Figure src={image6} caption="좌측 상단 Version에서 1.2 선택 → SAVE CHANGES" />

### 사용자의 국가 코드

페이먼트월 결제 완료시 핑백으로 사용자의 국가 코드(alpha-2, e.g. US)를 수신할 수 있습니다. 이를 수신하기 위해서는 [페이먼트월이 제공하는 파라미터](https://docs.paymentwall.com/reference/pingback/custom-parameter#parameter-with-value-paymentwall-provides)를 핑백 파라미터로 추가해야 합니다.

1. [페이먼트월 콘솔](https://api.paymentwall.com/developers/applications) → My Projects에서 해당 프로젝트 선택 → Settings
2. *Custom Pingback parameters* 항목으로 이동합니다.
3. Name에 `country_code` 추가 후 우측 Value에서 `COUNTRY_CODE`를 선택합니다.

<Figure src={image7} caption="Custom Pingback parameters에 COUNTRY_CODE 추가" />

이 결과는 다음과 같이 결제 건 조회시 `extension=true` 쿼리 파라미터 추가하여 확인할 수 있습니다.

```jsx
GET http://api.iamport.kr/payments/{포트원 번호}?extension=true
```

```json
{
// 중략
"vbank_name": null,
"vbank_num": null,
"extension": {
"country_code": "KR", // 사용자의 국가 코드
// 중략
}
}
```

### API 결제

<Tabs>
Expand Down

0 comments on commit e88539a

Please sign in to comment.