Commit f50cd4b9 authored by Łukasz Nowak's avatar Łukasz Nowak

Do not abuse activities.

It is ERP5 issue if correct transaction cannot be confirmed or started and
shall be fixed.

Note: It was done in activities in order to escape from transaction and have
committed system events. But as users might need to redo payments, system shall
behave simpler.
parent 907335ab
......@@ -81,7 +81,7 @@ else:\n
if context.getStartDate() is None:\n
context.setStartDate(now)\n
if context.getSimulationState() != \'confirmed\':\n
context.activate().PaymentTransaction_confirm()\n
context.PaymentTransaction_confirm()\n
\n
payzen_dict = {}\n
payzen_dict.update(\n
......
......@@ -97,7 +97,7 @@ if transaction_status in mark_transaction_id_list:\n
payzen_event.confirm()\n
payzen_event.acknowledge(comment=\'Automatic acknowledge as result of correct communication\')\n
if transaction.getSimulationState() == \'planned\':\n
transaction.activate().PaymentTransaction_confirm()\n
transaction.PaymentTransaction_confirm()\n
\n
elif transaction_status in continue_transaction_id_list:\n
# Check authAmount and authDevise and if match, start transaction\n
......@@ -111,7 +111,7 @@ elif transaction_status in continue_transaction_id_list:\n
if transaction_devise != auth_devise:\n
payzen_event.confirm(comment=\'Received devise (%r) does not match stored on transaction (%r)\'% (auth_devise, transaction_devise))\n
return\n
transaction.activate().PaymentTransaction_start()\n
transaction.PaymentTransaction_start()\n
payzen_event.confirm()\n
payzen_event.acknowledge(comment=\'Automatic acknowledge as result of correct communication\')\n
else:\n
......
55
\ No newline at end of file
56
\ No newline at end of file
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