Skip to content

Commit 902cc9f

Browse files
authored
Merge pull request #22 from Leop0ld/patch-1
Change tab to spaces
2 parents d8a5430 + 8a957f1 commit 902cc9f

File tree

1 file changed

+38
-34
lines changed

1 file changed

+38
-34
lines changed

README.rst

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Python 사용자를 위한 아임포트 REST API 연동 모듈입니다.
2929
2. 가격 확인
3030
3. 취소
3131
4. 비 인증 결제
32+
5. 정기 예약 결제
3233

3334

3435
사용법
@@ -150,60 +151,63 @@ Python 사용자를 위한 아임포트 REST API 연동 모듈입니다.
150151
pass
151152
152153
154+
정기 예약 결제
155+
----------------
156+
153157
정기 결제를 예약합니다.
154158

155159
.. code-block:: python
156160
157-
# 테스트용 값
158-
payload = {
159-
'customer_uid': '{고객 아이디}',
160-
'schedules': [
161+
# 테스트용 값
162+
payload = {
163+
'customer_uid': '{고객 아이디}',
164+
'schedules': [
161165
{
162166
'merchant_uid': 'test_merchant_01',
163167
# UNIX timestamp
164-
'schedule_at': 1478150985,
165-
'amount': 1004
168+
'schedule_at': 1478150985,
169+
'amount': 1004
166170
},
167171
{
168172
'merhcant_uid': 'test_merchant_02',
169-
# UNIX timestamp
170-
'schedule_at': 1478150985,
171-
'amount': 5000,
172-
'name': '{주문명}',
173-
'buyer_name': '{주문자명}',
174-
'buyer_email': '{주문자 이메일}',
175-
'buyer_tel': '{주문자 전화번호}',
176-
'buyer_addr': '{주문자 주소}',
177-
'buyer_postcode': '{주문자 우편번호}',
173+
# UNIX timestamp
174+
'schedule_at': 1478150985,
175+
'amount': 5000,
176+
'name': '{주문명}',
177+
'buyer_name': '{주문자명}',
178+
'buyer_email': '{주문자 이메일}',
179+
'buyer_tel': '{주문자 전화번호}',
180+
'buyer_addr': '{주문자 주소}',
181+
'buyer_postcode': '{주문자 우편번호}',
178182
},
179-
]
180-
}
181-
try:
182-
reponse = iamport.pay_schedule(**payload)
183-
except KeyError:
183+
]
184+
}
185+
try:
186+
reponse = iamport.pay_schedule(**payload)
187+
except KeyError:
184188
# 필수 값이 없을때 에러 처리
185189
pass
186-
except Iamport.ResponseError as e:
187-
# 응답 에러 처리
188-
pass
190+
except Iamport.ResponseError as e:
191+
# 응답 에러 처리
192+
pass
189193
190194
정기 결제 예약을 취소합니다.
191195

192196
.. code-block:: python
193197
194-
# 테스트용 값 (merchant_uid 가 누락되면 customer_uid 에 대한 결제예약정보 일괄취소)
195-
payload = {
196-
'customer_uid': '{고객 아이디}',
197-
'merchant_uid': 'test_merchant_01',
198-
}
199-
try:
200-
response = iamport.pay_unschedule(**payload)
201-
except KeyError:
198+
# 테스트용 값 (merchant_uid 가 누락되면 customer_uid 에 대한 결제예약정보 일괄취소)
199+
payload = {
200+
'customer_uid': '{고객 아이디}',
201+
'merchant_uid': 'test_merchant_01',
202+
}
203+
try:
204+
response = iamport.pay_unschedule(**payload)
205+
except KeyError:
202206
# 필수 값이 없을때 에러 처리
203207
pass
204-
except Iamport.ResponseError as e:
205-
# 응답 에러 처리
206-
pass
208+
except Iamport.ResponseError as e:
209+
# 응답 에러 처리
210+
pass
207211
208212
209213
결제 사전 검증

0 commit comments

Comments
 (0)