Commit cb6a3fce authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_payzen: Fixup typo and increase verbose on failures to connect to Payzen

parent 18c60ac7
Pipeline #12997 failed with stage
in 0 seconds
...@@ -18,7 +18,7 @@ isTransitionPossible = context.getPortalObject().portal_workflow.isTransitionPos ...@@ -18,7 +18,7 @@ isTransitionPossible = context.getPortalObject().portal_workflow.isTransitionPos
status = data_kw['status'] status = data_kw['status']
answer = data_kw['answer'] answer = data_kw['answer']
if status != "SUCCESS": if status != "SUCCESS":
error_code = answer["error_code"] error_code = answer["errorCode"]
if error_code == "PSP_010": if error_code == "PSP_010":
# Transaction Not Found # Transaction Not Found
# Mark on payment transaction history log that transaction was not processed yet # Mark on payment transaction history log that transaction was not processed yet
...@@ -36,7 +36,9 @@ if status != "SUCCESS": ...@@ -36,7 +36,9 @@ if status != "SUCCESS":
return return
else: else:
# Unknown errorCode # Unknown errorCode
payzen_event.confirm(comment='Unknown errorCode %r' % error_code) # https://payzen.io/pt-BR/rest/V4.0/api/errors-reference.html
error_message = answer.get('errorMessage', '')
payzen_event.confirm(comment='Unknown errorCode %r, message: %s' % (error_code, error_message))
return return
transaction_list = answer["transactions"] transaction_list = answer["transactions"]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment