Commit 09f12d8e authored by Łukasz Nowak's avatar Łukasz Nowak

Support long outstanding transactions.

parent ca4b4ad7
......@@ -80,7 +80,13 @@ system_event = portal.system_event_module.newContent(title=\'User navigation scr
\n
now = DateTime()\n
today = now.toZone(\'UTC\').asdatetime().strftime(\'%Y%m%d\')\n
if integration_site.getMappingFromCategory(\'causality/%s\' % context.getRelativeUrl()) == \'Causality/%s\' % context.getRelativeUrl():\n
previous_today = today\n
if integration_site.getMappingFromCategory(\'causality/%s\' % context.getRelativeUrl()) != \'Causality/%s\' % context.getRelativeUrl():\n
mapping_id = integration_site.getMappingFromCategory(\'causality/%s\' % context.getRelativeUrl())\n
previous_today, transaction_id = mapping_id.split(\'_\')\n
\n
\n
if today != previous_today or integration_site.getMappingFromCategory(\'causality/%s\' % context.getRelativeUrl()) == \'Causality/%s\' % context.getRelativeUrl():\n
transaction_id = str(portal.portal_ids.generateNewId(\n
id_group=\'%s_%s\' % (service.getRelativeUrl(), today),\n
id_generator=\'uid\')).zfill(6)\n
......@@ -94,11 +100,8 @@ if integration_site.getMappingFromCategory(\'causality/%s\' % context.getRelativ
else:\n
system_event.confirm(comment=\'Key %s already found!\' % mapping_id)\n
return \'There was system issue\'\n
else:\n
mapping_id = integration_site.getMappingFromCategory(\'causality/%s\' % context.getRelativeUrl())\n
previous_today, transaction_id = mapping_id.split(\'_\')\n
if context.getStartDate() is None:\n
context.setStartDate(now)\n
\n
context.setStartDate(now)\n
if context.getSimulationState() != \'confirmed\':\n
context.PaymentTransaction_confirm()\n
\n
......
365
\ No newline at end of file
366
\ 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