Skip to main content

Toss payment client library

Project description

# toss

Toss 결제를 위한 python client library wrapper (본격 날로 먹기의 꿈)

[![CircleCI](https://circleci.com/gh/StyleShare/toss.svg?style=svg)](https://circleci.com/gh/StyleShare/toss)

## 참고자료

- [가입부터 결제 완료까지](https://tossdev.github.io/gettingstarted.html)
- [Toss Payment API](https://tossdev.github.io/api.html)

## requirements

- python3
- strong mentality

## install

> pip install toss

## usage


```python
from toss import TossPayClient

client = TossPayClient() # 아무 값도 없으면 샌드박스
```

### 결제 요청

```python
result = client.purchase(
'주문번호', 1000, '상품설명', 'http://returning .url', False)
```

### 결제 정보 가져오기

```python
payment = client.get_payment(result.pay_token)
```

### 결제 승인

```python
client.approve(payment.pay_token)
```

### 결제 취소

```python
client.cancel(payment.pay_token, '고객 요청으로 취소')
```

### 환불

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

## FAQ

### 왜 이렇게 코드가 엉망인가요?

제가 죽을 죄를 지었습니다. 그러니 https://github.com/styleshare/toss/pulls 굽신굽신

### 사용하는 게 너무 불편해요.

저도요. 어머 우리 통하는 게 있나봐요. https://github.com/styleshare/toss/pulls
그런 당신을 위해 제가 특별히 마련했습니다.

### 왜 라이선스가 Public domain 인가요?

저는 [FSF](https://www.fsf.org/)를 지지합니다.

### toss 개발자들이 욕하지 않을까요?

제가 왜 public domain 했겠어요?

### 이거 FAQ 맞나요?

눈치가 빠른 꼬맹이는 PR이나 날리라구 https://github.com/styleshare/toss/pulls

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

toss-0.0.3.tar.gz (6.2 kB view details)

Uploaded Source

File details

Details for the file toss-0.0.3.tar.gz.

File metadata

  • Download URL: toss-0.0.3.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for toss-0.0.3.tar.gz
Algorithm Hash digest
SHA256 57075d99882fc782befc3a6d91c30d2cd444b4409c30ddda48debc76722db954
MD5 7d270024190a99058b5d7468ea36e30b
BLAKE2b-256 c2d241d98bbf8d34d8f5a230958c423799431c11524c41ec88d5be886a275377

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page