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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Romain Courteaud
slapos.core
Commits
4193a0b7
Commit
4193a0b7
authored
Feb 13, 2024
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_accounting: drop unused scripts
parent
77c21ec4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
185 deletions
+0
-185
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/PaymentTransaction_redirectToManualContactUsPayment.py
...ng/PaymentTransaction_redirectToManualContactUsPayment.py
+0
-22
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/PaymentTransaction_redirectToManualContactUsPayment.xml
...g/PaymentTransaction_redirectToManualContactUsPayment.xml
+0
-70
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SaleInvoiceTransaction_redirectToManualSlapOSPayment.py
...g/SaleInvoiceTransaction_redirectToManualSlapOSPayment.py
+0
-31
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SaleInvoiceTransaction_redirectToManualSlapOSPayment.xml
.../SaleInvoiceTransaction_redirectToManualSlapOSPayment.xml
+0
-62
No files found.
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/PaymentTransaction_redirectToManualContactUsPayment.py
deleted
100644 → 0
View file @
77c21ec4
""" Return a dict with vads_urls required for payzen."""
if
web_site
is
None
:
web_site
=
context
.
getWebSiteValue
()
if
context
.
PaymentTransaction_getTotalPayablePrice
()
==
0
:
# This script cannot be used if Payment has a value to pay
raise
ValueError
(
"Payment Transaction has a non zero total"
)
base_url
=
web_site
.
absolute_url
()
payment_transaction_url
=
context
.
getRelativeUrl
()
base
=
web_site
.
getLayoutProperty
(
"configuration_payment_url_template"
,
"%(url)s/#/%(payment_transaction_url)s?page=slap_payment_result&result=%(result)s"
)
base_substitution_dict
=
{
"url"
:
base_url
,
"payment_transaction_url"
:
payment_transaction_url
,
"result"
:
"contact_us"
}
redirect_url
=
base
%
base_substitution_dict
return
context
.
REQUEST
.
RESPONSE
.
redirect
(
redirect_url
)
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/PaymentTransaction_redirectToManualContactUsPayment.xml
deleted
100644 → 0
View file @
77c21ec4
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</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>
_params
</string>
</key>
<value>
<string>
web_site=None
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
PaymentTransaction_redirectToManualContactUsPayment
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SaleInvoiceTransaction_redirectToManualSlapOSPayment.py
deleted
100644 → 0
View file @
77c21ec4
payment_mode
=
context
.
getPaymentMode
()
entity
=
context
.
getDestinationSectionValue
()
def
wrapWithShadow
(
entity
,
invoice
):
return
entity
.
Entity_createPaymentTransaction
([
invoice
])
payment
=
entity
.
Person_restrictMethodAsShadowUser
(
shadow_document
=
entity
,
callable_object
=
wrapWithShadow
,
argument_list
=
[
entity
,
context
])
if
web_site
is
None
:
web_site
=
context
.
getWebSiteValue
()
total_price
=
entity
.
Person_restrictMethodAsShadowUser
(
shadow_document
=
entity
,
callable_object
=
payment
.
PaymentTransaction_getTotalPayablePrice
,
argument_list
=
[])
if
total_price
>=
0
:
return
payment
.
PaymentTransaction_redirectToManualFreePayment
(
web_site
=
web_site
)
if
payment_mode
==
"wechat"
:
if
payment
.
Base_getWechatServiceRelativeUrl
():
return
payment
.
PaymentTransaction_redirectToManualWechatPayment
(
web_site
=
web_site
)
elif
payment_mode
==
"payzen"
:
if
payment
.
Base_getPayzenServiceRelativeUrl
():
return
payment
.
PaymentTransaction_redirectToManualPayzenPayment
(
web_site
=
web_site
)
return
payment
.
PaymentTransaction_redirectToManualContactUsPayment
(
web_site
=
web_site
)
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/SaleInvoiceTransaction_redirectToManualSlapOSPayment.xml
deleted
100644 → 0
View file @
77c21ec4
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</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>
_params
</string>
</key>
<value>
<string>
web_site=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SaleInvoiceTransaction_redirectToManualSlapOSPayment
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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