toss

Toss payment client library


Keywords
payment, payment-gateway, python, shop, toss
License
Unlicense
Install
pip install toss==0.0.4

Documentation

toss

Toss ๊ฒฐ์ œ๋ฅผ ์œ„ํ•œ python client library wrapper (๋ณธ๊ฒฉ ๋‚ ๋กœ ๋จน๊ธฐ์˜ ๊ฟˆ)

CircleCI

์ฐธ๊ณ ์ž๋ฃŒ

requirements

  • python3
  • strong mentality

install

pip install toss

usage

from toss import TossPayClient

client = TossPayClient() # ์•„๋ฌด ๊ฐ’๋„ ์—†์œผ๋ฉด ์ƒŒ๋“œ๋ฐ•์Šค

๊ฒฐ์ œ ์š”์ฒญ

result = client.purchase(
    '์ฃผ๋ฌธ๋ฒˆํ˜ธ', 1000, '์ƒํ’ˆ์„ค๋ช…', 'http://returning .url', False)

๊ฒฐ์ œ ์ •๋ณด ๊ฐ€์ ธ์˜ค๊ธฐ

payment = client.get_payment(result.pay_token)

๊ฒฐ์ œ ์Šน์ธ

client.approve(payment.pay_token)

๊ฒฐ์ œ ์ทจ์†Œ

client.cancel(payment.pay_token, '๊ณ ๊ฐ ์š”์ฒญ์œผ๋กœ ์ทจ์†Œ')

ํ™˜๋ถˆ

client.refund(payment.token, 1000, 0)

FAQ

์™œ ์ด๋ ‡๊ฒŒ ์ฝ”๋“œ๊ฐ€ ์—‰๋ง์ธ๊ฐ€์š”?

์ œ๊ฐ€ ์ฃฝ์„ ์ฃ„๋ฅผ ์ง€์—ˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‹ˆ https://github.com/styleshare/toss/pulls ๊ตฝ์‹ ๊ตฝ์‹ 

์‚ฌ์šฉํ•˜๋Š” ๊ฒŒ ๋„ˆ๋ฌด ๋ถˆํŽธํ•ด์š”.

์ €๋„์š”. ์–ด๋จธ ์šฐ๋ฆฌ ํ†ตํ•˜๋Š” ๊ฒŒ ์žˆ๋‚˜๋ด์š”. https://github.com/styleshare/toss/pulls ๊ทธ๋Ÿฐ ๋‹น์‹ ์„ ์œ„ํ•ด ์ œ๊ฐ€ ํŠน๋ณ„ํžˆ ๋งˆ๋ จํ–ˆ์Šต๋‹ˆ๋‹ค.

์™œ ๋ผ์ด์„ ์Šค๊ฐ€ Public domain ์ธ๊ฐ€์š”?

์ €๋Š” FSF๋ฅผ ์ง€์ง€ํ•ฉ๋‹ˆ๋‹ค.

toss ๊ฐœ๋ฐœ์ž๋“ค์ด ์š•ํ•˜์ง€ ์•Š์„๊นŒ์š”?

์ œ๊ฐ€ ์™œ public domain ํ–ˆ๊ฒ ์–ด์š”?

์ด๊ฑฐ FAQ ๋งž๋‚˜์š”?

๋ˆˆ์น˜๊ฐ€ ๋น ๋ฅธ ๊ผฌ๋งน์ด๋Š” PR์ด๋‚˜ ๋‚ ๋ฆฌ๋ผ๊ตฌ https://github.com/styleshare/toss/pulls