Skip to content
This repository has been archived by the owner on Mar 7, 2022. It is now read-only.

iamport 결제 실패 오류 메시지가 전달되지 않음 #86

Open
iz4blue opened this issue Jul 1, 2018 · 1 comment
Open

iamport 결제 실패 오류 메시지가 전달되지 않음 #86

iz4blue opened this issue Jul 1, 2018 · 1 comment

Comments

@iz4blue
Copy link
Contributor

iz4blue commented Jul 1, 2018

다음과 같은 오류 처리를 try catch 문으로 잡아서 결제 오류 메시지가 사용자에게 전달 되어야 할 것 같습니다.

우선 오류부터 report 합니다.
줄바꿈 표시를 처리 못하고 로그를 가져 왔습니다. 넓은 이해심으로 수동으로 파악 부탁드립니다.

Internal Server Error: /2018/registration/payment/
Traceback (most recent call last):
  File "--python-evn-path--/site-packages/django/core/handlers/exception.py", line 4
1, in inner
    response = get_response(request)
  File "--python-evn-path--/site-packages/django/core/handlers/base.py", line 249, i
n _legacy_get_response
    response = self._get_response(request)
  File "--python-evn-path--/site-packages/django/core/handlers/base.py", line 187, i
n _get_response
    response = self.process_exception_by_middleware(e, request)
  File "--python-evn-path--/site-packages/django/core/handlers/base.py", line 185, i
n _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "--python-evn-path--/site-packages/django/contrib/auth/decorators.py", line 2
3, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/home/pyconkr/www.pycon.kr/pyconkr-2018/registration/views.py", line 179, in payment_process
    iamport.pay_onetime(**iamport_params)
  File "--python-evn-path--/site-packages/iamport/client.py", line 88, in pay_onetime
    return self._post(url, kwargs)
  File "--python-evn-path--/site-packages/iamport/client.py", line 58, in _post
    return self.get_response(response)
  File "--python-evn-path--/site-packages/iamport/client.py", line 37, in get_response
    raise Iamport.ResponseError(result.get('code'), result.get('message'))
iamport.client.Iamport.ResponseError: (-1, '결제승인에 실패하였습니다. [3002]카드 결제 실패 (생년월일/사업자번호 오류)')
@iz4blue
Copy link
Contributor Author

iz4blue commented Jul 18, 2018

@cmygray 이 부분입니다. 자세한 것은 추가로 이야기 드릴께요.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant