Commit 14cd7e4f authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Thomas Gambier

slapos_payzen: Consider "Waiting for submission" as payed

This is a change from Thomas Gambier, I'm just commiting
parent ddadb06d
...@@ -50,8 +50,8 @@ elif error_code == '0': ...@@ -50,8 +50,8 @@ elif error_code == '0':
'12': 'Being authorized', '12': 'Being authorized',
'13': 'Failed', '13': 'Failed',
} }
mark_transaction_id_list = ['0', '1', '3', '4', '5', '10', '11', '12'] mark_transaction_id_list = ['0', '1', '3', '5', '10', '11', '12']
continue_transaction_id_list = ['6'] continue_transaction_id_list = ['4', '6']
cancel_transaction_id_list = ['8'] cancel_transaction_id_list = ['8']
transaction_status = data_kw['transactionStatus'] transaction_status = data_kw['transactionStatus']
...@@ -75,7 +75,7 @@ elif error_code == '0': ...@@ -75,7 +75,7 @@ elif error_code == '0':
# Check authAmount and authDevise and if match, stop transaction # Check authAmount and authDevise and if match, stop transaction
auth_amount = int(data_kw['authAmount']) auth_amount = int(data_kw['authAmount'])
auth_devise = data_kw['authDevise'] auth_devise = data_kw['authDevise']
transaction_amount = int(round((transaction.PaymentTransaction_getTotalPayablePrice() * -100), 2)) transaction_amount = int((round(transaction.PaymentTransaction_getTotalPayablePrice(), 2) * -100))
if transaction_amount != auth_amount: if transaction_amount != auth_amount:
payzen_event.confirm(comment='Received amount (%r) does not match stored on transaction (%r)'% (auth_amount, transaction_amount)) payzen_event.confirm(comment='Received amount (%r) does not match stored on transaction (%r)'% (auth_amount, transaction_amount))
......
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