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

Do not play with Payment Transaction dates.

parent 176ab6dd
...@@ -62,8 +62,7 @@ system_event_kw = {\n ...@@ -62,8 +62,7 @@ system_event_kw = {\n
}\n }\n
system_event = portal.system_event_module.newContent(title=\'User navigation script\', **system_event_kw)\n system_event = portal.system_event_module.newContent(title=\'User navigation script\', **system_event_kw)\n
\n \n
now_utc = DateTime().toZone(\'UTC\').asdatetime()\n today = DateTime().toZone(\'UTC\').asdatetime().strftime(\'%Y%m%d\')\n
today = now_utc.strftime(\'%Y%m%d\')\n
transaction_id = str(portal.portal_ids.generateNewId(\n transaction_id = str(portal.portal_ids.generateNewId(\n
id_group=\'%s_%s\' % (service.getRelativeUrl(), today),\n id_group=\'%s_%s\' % (service.getRelativeUrl(), today),\n
id_generator=\'uid\')).zfill(6)\n id_generator=\'uid\')).zfill(6)\n
...@@ -81,13 +80,13 @@ else:\n ...@@ -81,13 +80,13 @@ else:\n
system_event.confirm(comment=\'Key %s already found!\' % mapping_id)\n system_event.confirm(comment=\'Key %s already found!\' % mapping_id)\n
return \'There was system issue\'\n return \'There was system issue\'\n
\n \n
context.activate().PaymentTransaction_setStartDateConfirm(date=now_utc)\n context.activate().PaymentTransaction_confirm()\n
\n \n
payzen_dict = {}\n payzen_dict = {}\n
payzen_dict.update(\n payzen_dict.update(\n
vads_currency=integration_site.getMappingFromCategory(\'resource/currency_module/%s\' % context.getResourceReference()).split(\'/\')[-1],\n vads_currency=integration_site.getMappingFromCategory(\'resource/currency_module/%s\' % context.getResourceReference()).split(\'/\')[-1],\n
vads_amount=str(int(round((context.PaymentTransaction_getTotalPayablePrice() * 100), 0))),\n vads_amount=str(int(round((context.PaymentTransaction_getTotalPayablePrice() * 100), 0))),\n
vads_trans_date=now_utc.strftime(\'%Y%m%d%H%M%S\'),\n vads_trans_date=context.getStartDate().toZone(\'UTC\').asdatetime().strftime(\'%Y%m%d%H%M%S\'),\n
vads_trans_id=transaction_id,\n vads_trans_id=transaction_id,\n
vads_language=\'en\',\n vads_language=\'en\',\n
)\n )\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>context.setStartDate(date)\n
context.getPortalObject().portal_workflow.doActionFor(context, \'confirm_action\', comment=\'Transaction being registered in Payzen\')\n
context.getPortalObject().portal_workflow.doActionFor(context, \'edit_action\', comment=\'Date set as transaction being registered in Payzen\')\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>date</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PaymentTransaction_setStartDateConfirm</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
43 44
\ 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