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

Invert logic.

There is nothing to do if transaction is not yet registered in integration tool.
parent bf91dfd1
......@@ -67,6 +67,7 @@ if context.PaymentTransaction_getPreviousPayzenId() is not None and context.getS
context.updateCausalityState()\n
portal.system_event_module.newContent(title=\'Transaction %s Payzen registration\' % context.getTitle(), portal_type=\'Payzen Event\', source_value=service, destination_value=context).registerPayzen()\n
else:\n
if portal.restrictedTraverse(portal.portal_preferences.getPreferredPayzenIntegrationSite()).getMappingFromCategory(\'causality/%s\' % context.getRelativeUrl()) != \'Causality/%s\' % context.getRelativeUrl():\n
portal.system_event_module.newContent(title=\'Transaction %s Payzen status update\' % context.getTitle(), portal_type=\'Payzen Event\', source_value=service, destination_value=context).updateStatus()\n
</string> </value>
</item>
......
......@@ -58,8 +58,7 @@ integration_tool = portal.restrictedTraverse(portal.portal_preferences.getPrefer
\n
transaction_id = integration_tool.getMappingFromCategory(\'causality/%s\' % payment_transaction.getRelativeUrl())\n
if transaction_id == \'Causality/%s\' % payment_transaction.getRelativeUrl():\n
payzen_event.confirm(comment=\'Transaction not registered in payzen integration tool\')\n
return\n
raise ValueError(\'Transaction not registered in payzen integration tool\')\n
transaction_id = transaction_id.split(\'/\')[1]\n
transmissionDate, transactionId = transaction_id.split(\'_\')\n
\n
......
65
\ No newline at end of file
66
\ 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