Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
21
Merge Requests
21
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
d6ba33c8
Commit
d6ba33c8
authored
Dec 11, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wrap the script with the shadow user.
parent
46d8dd2d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
20 deletions
+30
-20
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/PaymentTransaction_redirectToManualPayzenPayment.xml
...ting/PaymentTransaction_redirectToManualPayzenPayment.xml
+29
-19
master/bt5/slapos_web/bt/revision
master/bt5/slapos_web/bt/revision
+1
-1
No files found.
master/bt5/slapos_web/SkinTemplateItem/portal_skins/vifib_hosting/PaymentTransaction_redirectToManualPayzenPayment.xml
View file @
d6ba33c8
...
...
@@ -53,29 +53,39 @@
<value>
<string>
# TODO: Return configured web page in case of system issues.\n
from ZTUtils import make_query\n
portal = context.getPortalObject()\n
person = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
\n
transaction_date, transaction_id = context.PaymentTransaction_getPayzenId()\n
if transaction_id is not None:\n
message = context.Base_translateString("Payment already registered.")\n
return context.getWebSiteValue().Base_redirect(keep_items={\'portal_status_message\': message})\n
def wrapWithShadow(payment_transaction, person_relative_url):\n
transaction_date, transaction_id = payment_transaction.PaymentTransaction_getPayzenId()\n
if transaction_id is not None:\n
message = payment_transaction.Base_translateString("Payment already registered.")\n
return web_site.Base_redirect(keep_items={\'portal_status_message\': message})\n
\n
callback_websection = context.getWebSiteValue().payzen_callback\n
query = make_query(dict(transaction=context.getRelativeUrl()))\n
system_event = payment_transaction.PaymentTransaction_createPayzenEvent(\n
title=\'User navigation script for %s\' % payment_transaction.getTitle(),\n
destination_section=person_relative_url,\n
)\n
\n
system_event = context.PaymentTransaction_createPayzenEvent(
\n
title=\'User navigation script for %s\' % context.getTitle()
\n
)\n
system_event.generateManualPaymentPage(\n
web_site = context.getWebSiteValue()
\n
callback_websection = web_site.payzen_callback
\n
query = make_query(dict(transaction=payment_transaction.getRelativeUrl())
)\n
system_event.generateManualPaymentPage(\n
vads_url_cancel=\'%s?%s\' % (callback_websection.cancel.absolute_url(), query),\n
vads_url_error=\'%s?%s\' % (callback_websection.error.absolute_url(), query),\n
vads_url_referral=\'%s?%s\' % (callback_websection.referral.absolute_url(), query),\n
vads_url_refused=\'%s?%s\' % (callback_websection.refused.absolute_url(), query),\n
vads_url_success=\'%s?%s\' % (callback_websection.success.absolute_url(), query),\n
vads_url_return=\'%s?%s\' % (getattr(callback_websection, \'return\').absolute_url(), query),\n
)\n
)\n
\n
return system_event.contentValues(\n
return system_event.contentValues(\n
portal_type="Payzen Event Message")[0].getTextContent()\n
\n
\n
return person.Person_restrictMethodAsShadowUser(\n
shadow_document=person,\n
callable_object=wrapWithShadow,\n
argument_list=[context, person.getRelativeUrl()])\n
</string>
</value>
</item>
<item>
...
...
master/bt5/slapos_web/bt/revision
View file @
d6ba33c8
19
\ No newline at end of file
20
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment