Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ChangJoo-Park committed Mar 26, 2018
1 parent 33107e2 commit ca6629f
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,35 @@

## TOSS API

[TOSS](https://tossdev.github.io/gettingstarted.html)
[TOSS 공식문서](https://tossdev.github.io/gettingstarted.html)를 보고 만들었습니다.

## 사용방법

```bash
npm install --save toss-node-api
```

```js
const TossAPI = require('toss-node-api')
const Toss = TossAPI.Toss

// 직접 발급받은 API 키를 사용하세요
const apiKey = 'sk_test_apikey1234567890a'
const tossObject = new Toss({ apiKey })
const requiredInfo = {} // 생략
const optionalInfo = {} // 생략

const main = async () => {
try {
const data = await tossObject.makePayment(requiredInfo, optionalInfo)
console.log(data)
} catch (e) {
// 에러 핸들링
}
}

main()
```

## 할 일

Expand Down

0 comments on commit ca6629f

Please sign in to comment.