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 ...@@ -81,7 +81,7 @@ else:\n
if context.getStartDate() is None:\n if context.getStartDate() is None:\n
context.setStartDate(now)\n context.setStartDate(now)\n
if context.getSimulationState() != \'confirmed\':\n if context.getSimulationState() != \'confirmed\':\n
context.activate().PaymentTransaction_confirm()\n context.PaymentTransaction_confirm()\n
\n \n
payzen_dict = {}\n payzen_dict = {}\n
payzen_dict.update(\n payzen_dict.update(\n
......
...@@ -97,7 +97,7 @@ if transaction_status in mark_transaction_id_list:\n ...@@ -97,7 +97,7 @@ if transaction_status in mark_transaction_id_list:\n
payzen_event.confirm()\n payzen_event.confirm()\n
payzen_event.acknowledge(comment=\'Automatic acknowledge as result of correct communication\')\n payzen_event.acknowledge(comment=\'Automatic acknowledge as result of correct communication\')\n
if transaction.getSimulationState() == \'planned\':\n if transaction.getSimulationState() == \'planned\':\n
transaction.activate().PaymentTransaction_confirm()\n transaction.PaymentTransaction_confirm()\n
\n \n
elif transaction_status in continue_transaction_id_list:\n elif transaction_status in continue_transaction_id_list:\n
# Check authAmount and authDevise and if match, start transaction\n # Check authAmount and authDevise and if match, start transaction\n
...@@ -111,7 +111,7 @@ elif transaction_status in continue_transaction_id_list:\n ...@@ -111,7 +111,7 @@ elif transaction_status in continue_transaction_id_list:\n
if transaction_devise != auth_devise:\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 payzen_event.confirm(comment=\'Received devise (%r) does not match stored on transaction (%r)\'% (auth_devise, transaction_devise))\n
return\n return\n
transaction.activate().PaymentTransaction_start()\n transaction.PaymentTransaction_start()\n
payzen_event.confirm()\n payzen_event.confirm()\n
payzen_event.acknowledge(comment=\'Automatic acknowledge as result of correct communication\')\n payzen_event.acknowledge(comment=\'Automatic acknowledge as result of correct communication\')\n
else:\n else:\n
......
55 56
\ No newline at end of file \ 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