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
17
Merge Requests
17
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
9265d0f2
Commit
9265d0f2
authored
Sep 26, 2019
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_subscription_request: Add Wechat payment support
parent
1bc9a264
Changes
35
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
1710 additions
and
23 deletions
+1710
-23
master/bt5/slapos_erp5/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSCheckConsistency.xml
...rtal_components/extension.erp5.SlapOSCheckConsistency.xml
+24
-3
master/bt5/slapos_subscription_request/ExtensionTemplateItem/portal_components/extension.erp5.WechatUtils.py
...plateItem/portal_components/extension.erp5.WechatUtils.py
+258
-0
master/bt5/slapos_subscription_request/ExtensionTemplateItem/portal_components/extension.erp5.WechatUtils.xml
...lateItem/portal_components/extension.erp5.WechatUtils.xml
+124
-0
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/slapos_wechat_pre_payment_template.xml
.../accounting_module/slapos_wechat_pre_payment_template.xml
+211
-0
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/slapos_wechat_pre_payment_template/1.xml
...ccounting_module/slapos_wechat_pre_payment_template/1.xml
+51
-0
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/slapos_wechat_pre_payment_template/2.xml
...ccounting_module/slapos_wechat_pre_payment_template/2.xml
+51
-0
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/template_wechat_pre_payment_subscription_sale_invoice_transaction.xml
...hat_pre_payment_subscription_sale_invoice_transaction.xml
+210
-0
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/template_wechat_pre_payment_subscription_sale_invoice_transaction/1.xml
...t_pre_payment_subscription_sale_invoice_transaction/1.xml
+121
-0
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/Base_generateWechatQRCodeFromCodeURL.py
...scription_request/Base_generateWechatQRCodeFromCodeURL.py
+2
-0
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/Base_generateWechatQRCodeFromCodeURL.xml
...cription_request/Base_generateWechatQRCodeFromCodeURL.xml
+62
-0
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/Base_getWechatCodeURL.xml
...ins/slapos_subscription_request/Base_getWechatCodeURL.xml
+28
-0
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/Base_queryWechatOrderStatus.xml
...apos_subscription_request/Base_queryWechatOrderStatus.xml
+28
-0
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/Base_queryWechatOrderStatusByTradeNo.py
...scription_request/Base_queryWechatOrderStatusByTradeNo.py
+4
-0
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/Base_queryWechatOrderStatusByTradeNo.xml
...cription_request/Base_queryWechatOrderStatusByTradeNo.xml
+62
-0
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/Base_receiveWechatPaymentNotify.xml
..._subscription_request/Base_receiveWechatPaymentNotify.xml
+28
-0
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/Base_redirectWechatPaymentSuccessPage.py
...cription_request/Base_redirectWechatPaymentSuccessPage.py
+13
-0
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/Base_redirectWechatPaymentSuccessPage.xml
...ription_request/Base_redirectWechatPaymentSuccessPage.xml
+58
-0
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/ERP5Site_getWechatPaymentConfiguration.py
...ription_request/ERP5Site_getWechatPaymentConfiguration.py
+1
-0
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/ERP5Site_getWechatPaymentConfiguration.xml
...iption_request/ERP5Site_getWechatPaymentConfiguration.xml
+62
-0
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/ERP5Site_receiveWechatPaymentCallback.py
...cription_request/ERP5Site_receiveWechatPaymentCallback.py
+16
-0
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/ERP5Site_receiveWechatPaymentCallback.xml
...ription_request/ERP5Site_receiveWechatPaymentCallback.xml
+62
-0
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscription.py
..._request/SubscriptionRequestModule_requestSubscription.py
+1
-1
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscription.xml
...request/SubscriptionRequestModule_requestSubscription.xml
+1
-1
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscriptionProxy.py
...est/SubscriptionRequestModule_requestSubscriptionProxy.py
+23
-6
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscriptionProxy.xml
...st/SubscriptionRequestModule_requestSubscriptionProxy.xml
+1
-1
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_createRelatedSaleInvoiceTransaction.py
...ubscriptionRequest_createRelatedSaleInvoiceTransaction.py
+4
-1
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_createRelatedSaleInvoiceTransaction.xml
...bscriptionRequest_createRelatedSaleInvoiceTransaction.xml
+1
-1
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_requestPaymentTransaction.py
..._request/SubscriptionRequest_requestPaymentTransaction.py
+9
-5
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_requestPaymentTransaction.xml
...request/SubscriptionRequest_requestPaymentTransaction.xml
+1
-1
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testERP5WechatSecurePayment.py
...ortal_components/test.erp5.testERP5WechatSecurePayment.py
+60
-0
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testERP5WechatSecurePayment.xml
...rtal_components/test.erp5.testERP5WechatSecurePayment.xml
+124
-0
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionChineseScenario.py
...onents/test.erp5.testSlapOSSubscriptionChineseScenario.py
+1
-1
master/bt5/slapos_subscription_request/bt/template_extension_id_list
...slapos_subscription_request/bt/template_extension_id_list
+2
-1
master/bt5/slapos_subscription_request/bt/template_path_list
master/bt5/slapos_subscription_request/bt/template_path_list
+4
-0
master/bt5/slapos_subscription_request/bt/template_test_id_list
.../bt5/slapos_subscription_request/bt/template_test_id_list
+2
-1
No files found.
master/bt5/slapos_erp5/ExtensionTemplateItem/portal_components/extension.erp5.SlapOSCheckConsistency.xml
View file @
9265d0f2
...
@@ -6,6 +6,12 @@
...
@@ -6,6 +6,12 @@
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
SlapOSCheckConsistency
</string>
</value>
<value>
<string>
SlapOSCheckConsistency
</string>
</value>
...
@@ -49,13 +55,28 @@
...
@@ -49,13 +55,28 @@
<item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<key>
<string>
workflow_history
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
</pickle>
...
@@ -68,7 +89,7 @@
...
@@ -68,7 +89,7 @@
<item>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
</value>
</value>
</item>
</item>
</dictionary>
</dictionary>
...
@@ -77,7 +98,7 @@
...
@@ -77,7 +98,7 @@
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<pickle>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
</pickle>
...
...
master/bt5/slapos_subscription_request/ExtensionTemplateItem/portal_components/extension.erp5.WechatUtils.py
0 → 100644
View file @
9265d0f2
This diff is collapsed.
Click to expand it.
master/bt5/slapos_subscription_request/ExtensionTemplateItem/portal_components/extension.erp5.WechatUtils.xml
0 → 100644
View file @
9265d0f2
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Extension Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
WechatUtils
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
extension.erp5.WechatUtils
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Extension Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/slapos_wechat_pre_payment_template.xml
0 → 100644
View file @
9265d0f2
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Payment Transaction"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Delete_objects_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_count
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_mt_index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_tree
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
source_payment/organisation_module/slapos/bank_account
</string>
<string>
source_section/organisation_module/slapos
</string>
<string>
price_currency/currency_module/EUR
</string>
<string>
specialise/sale_trade_condition_module/slapos_aggregated_trade_condition
</string>
<string>
resource/currency_module/CNY
</string>
<string>
payment_mode/wechat
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
default_destination_reference
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
slapos_wechat_pre_payment_template
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Payment Transaction
</string>
</value>
</item>
<item>
<key>
<string>
start_date
</string>
</key>
<value>
<object>
<klass>
<global
id=
"1.1"
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1533254400.0
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
stop_date
</string>
</key>
<value>
<object>
<klass>
<reference
id=
"1.1"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1533313457.88
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Reservation
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Length"
module=
"BTrees.Length"
/>
</pickle>
<pickle>
<int>
0
</int>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/slapos_wechat_pre_payment_template/1.xml
0 → 100644
View file @
9265d0f2
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Accounting Transaction Line"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
destination/account_module/payable
</string>
<string>
source/account_module/receivable
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
grouping_date
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
grouping_reference
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
1
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Accounting Transaction Line
</string>
</value>
</item>
<item>
<key>
<string>
price
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
quantity
</string>
</key>
<value>
<float>
0.0
</float>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/slapos_wechat_pre_payment_template/2.xml
0 → 100644
View file @
9265d0f2
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Accounting Transaction Line"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
destination/account_module/bank
</string>
<string>
source/account_module/bank
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
grouping_date
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
grouping_reference
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
2
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Accounting Transaction Line
</string>
</value>
</item>
<item>
<key>
<string>
price
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
quantity
</string>
</key>
<value>
<float>
0.0
</float>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/template_wechat_pre_payment_subscription_sale_invoice_transaction.xml
0 → 100644
View file @
9265d0f2
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Sale Invoice Transaction"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Delete_objects_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_count
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_mt_index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_tree
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
source_section/organisation_module/slapos
</string>
<string>
payment_mode/payzen
</string>
<string>
specialise/sale_trade_condition_module/slapos_aggregated_trade_condition
</string>
<string>
price_currency/currency_module/CNY
</string>
<string>
resource/currency_module/CNY
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
default_destination_reference
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
default_source_reference
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
template_wechat_pre_payment_subscription_sale_invoice_transaction
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Sale Invoice Transaction
</string>
</value>
</item>
<item>
<key>
<string>
start_date
</string>
</key>
<value>
<object>
<klass>
<global
id=
"1.1"
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1325376000.0
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
stop_date
</string>
</key>
<value>
<object>
<klass>
<reference
id=
"1.1"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1326582000.0
</float>
<string>
GMT+1
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
template_wechat_pre_payment_subscription_sale_invoice_transaction
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Length"
module=
"BTrees.Length"
/>
</pickle>
<pickle>
<int>
0
</int>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_subscription_request/PathTemplateItem/accounting_module/template_wechat_pre_payment_subscription_sale_invoice_transaction/1.xml
0 → 100644
View file @
9265d0f2
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Invoice Line"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
use/trade/sale
</string>
<string>
resource/service_module/slapos_reservation_fee
</string>
<string>
quantity_unit/unit/piece
</string>
<string>
base_contribution/base_amount/invoicing
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
1
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
1
</string>
</value>
</item>
<item>
<key>
<string>
index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
int_index
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Invoice Line
</string>
</value>
</item>
<item>
<key>
<string>
price
</string>
</key>
<value>
<float>
188.0
</float>
</value>
</item>
<item>
<key>
<string>
quantity
</string>
</key>
<value>
<float>
1.0
</float>
</value>
</item>
<item>
<key>
<string>
stop_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1326585600.0
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
movement
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/Base_generateWechatQRCodeFromCodeURL.py
0 → 100644
View file @
9265d0f2
# inspired by Pack_generateCode128BarcodeImage in sanef-evl project
return
context
.
Base_generateBarcodeImage
(
'qrcode'
,
code_url
)
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/Base_generateWechatQRCodeFromCodeURL.xml
0 → 100644
View file @
9265d0f2
<?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>
_params
</string>
</key>
<value>
<string>
code_url
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_generateWechatQRCodeFromCodeURL
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/Base_getWechatCodeURL.xml
0 → 100644
View file @
9265d0f2
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ExternalMethod"
module=
"Products.ExternalMethod.ExternalMethod"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_function
</string>
</key>
<value>
<string>
getWechatQRCodeURL
</string>
</value>
</item>
<item>
<key>
<string>
_module
</string>
</key>
<value>
<string>
WechatUtils
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_getWechatCodeURL
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/Base_queryWechatOrderStatus.xml
0 → 100644
View file @
9265d0f2
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ExternalMethod"
module=
"Products.ExternalMethod.ExternalMethod"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_function
</string>
</key>
<value>
<string>
queryWechatOrderStatus
</string>
</value>
</item>
<item>
<key>
<string>
_module
</string>
</key>
<value>
<string>
WechatUtils
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_queryWechatOrderStatus
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/Base_queryWechatOrderStatusByTradeNo.py
0 → 100644
View file @
9265d0f2
if
not
trade_no
:
raise
Exception
(
"Unknown trade number"
)
return
context
.
Base_queryWechatOrderStatus
({
'out_trade_no'
:
trade_no
})
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/Base_queryWechatOrderStatusByTradeNo.xml
0 → 100644
View file @
9265d0f2
<?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>
_params
</string>
</key>
<value>
<string>
trade_no=None
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_queryWechatOrderStatusByTradeNo
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/Base_receiveWechatPaymentNotify.xml
0 → 100644
View file @
9265d0f2
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ExternalMethod"
module=
"Products.ExternalMethod.ExternalMethod"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_function
</string>
</key>
<value>
<string>
receiveWechatPaymentNotify
</string>
</value>
</item>
<item>
<key>
<string>
_module
</string>
</key>
<value>
<string>
WechatUtils
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_receiveWechatPaymentNotify
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/Base_redirectWechatPaymentSuccessPage.py
0 → 100644
View file @
9265d0f2
# Example code:
# Import a standard function, and get the HTML request and response objects.
from
Products.PythonScripts.standard
import
html_quote
request
=
container
.
REQUEST
response
=
request
.
response
# Return a string identifying this script.
print
"This is the"
,
script
.
meta_type
,
'"%s"'
%
script
.
getId
(),
if
script
.
title
:
print
"(%s)"
%
html_quote
(
script
.
title
),
print
"in"
,
container
.
absolute_url
()
return
printed
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/Base_redirectWechatPaymentSuccessPage.xml
0 → 100644
View file @
9265d0f2
<?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>
id
</string>
</key>
<value>
<string>
Base_redirectWechatPaymentSuccessPage
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/ERP5Site_getWechatPaymentConfiguration.py
0 → 100644
View file @
9265d0f2
return
{}
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/ERP5Site_getWechatPaymentConfiguration.xml
0 → 100644
View file @
9265d0f2
<?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>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_getWechatPaymentConfiguration
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/ERP5Site_receiveWechatPaymentCallback.py
0 → 100644
View file @
9265d0f2
# Example code:
# Import a standard function, and get the HTML request and response objects.
from
Products.PythonScripts.standard
import
html_quote
request
=
container
.
REQUEST
response
=
request
.
response
raise
Exception
(
request
)
# Return a string identifying this script.
print
"This is the"
,
script
.
meta_type
,
'"%s"'
%
script
.
getId
(),
if
script
.
title
:
print
"(%s)"
%
html_quote
(
script
.
title
),
print
"in"
,
container
.
absolute_url
()
print
response
return
printed
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/ERP5Site_receiveWechatPaymentCallback.xml
0 → 100644
View file @
9265d0f2
<?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>
_params
</string>
</key>
<value>
<string>
**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_receiveWechatPaymentCallback
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscription.py
View file @
9265d0f2
...
@@ -19,6 +19,6 @@ user_input_dict = {
...
@@ -19,6 +19,6 @@ user_input_dict = {
"amount"
:
amount
}
"amount"
:
amount
}
return
context
.
SubscriptionRequestModule_requestSubscriptionProxy
(
return
context
.
SubscriptionRequestModule_requestSubscriptionProxy
(
default_email_text
,
subscription_reference
,
default_email_text
,
subscription_reference
,
payment_mode
,
confirmation_required
=
bool
(
confirmation_required
),
confirmation_required
=
bool
(
confirmation_required
),
user_input_dict
=
user_input_dict
,
batch_mode
=
0
)
user_input_dict
=
user_input_dict
,
batch_mode
=
0
)
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscription.xml
View file @
9265d0f2
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
name=None, default_email_text=None, subscription_reference=None, amount=0, confirmation_required=True, REQUEST=None, **kw
</string>
</value>
<value>
<string>
name=None, default_email_text=None,
payment_mode=None,
subscription_reference=None, amount=0, confirmation_required=True, REQUEST=None, **kw
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscriptionProxy.py
View file @
9265d0f2
...
@@ -7,15 +7,16 @@ if REQUEST is not None:
...
@@ -7,15 +7,16 @@ if REQUEST is not None:
person
,
person_is_new
=
context
.
SubscriptionRequest_createUser
(
email
,
user_input_dict
[
'name'
])
person
,
person_is_new
=
context
.
SubscriptionRequest_createUser
(
email
,
user_input_dict
[
'name'
])
web_site
=
context
.
getWebSiteValue
()
web_site
=
context
.
getWebSiteValue
()
# Check if user is already exist, otherwise redirect to ask confirmation
if
confirmation_required
and
not
person_is_new
:
# if payment mode not selected, ask user to confirm and select one.
if
not
payment_mode
:
base_url
=
web_site
.
absolute_url
()
base_url
=
web_site
.
absolute_url
()
return
context
.
REQUEST
.
RESPONSE
.
redirect
(
return
context
.
REQUEST
.
RESPONSE
.
redirect
(
"%s/#order_confirmation?name=%s&email=%s&amount=%s&subscription_reference=%s"
%
(
"%s/#order_confirmation?name=%s&email=%s&amount=%s&subscription_reference=%s"
%
(
base_url
,
base_url
,
person
.
getTitle
(),
person
.
getTitle
(),
person
.
getDefaultEmailText
()
,
email
,
user_input_dict
[
"amount"
],
user_input_dict
[
"amount"
],
subscription_reference
))
subscription_reference
))
...
@@ -27,21 +28,37 @@ subscription_request = context.subscription_request_module.newContent(
...
@@ -27,21 +28,37 @@ subscription_request = context.subscription_request_module.newContent(
subscription_request
.
setDefaultEmailText
(
email
)
subscription_request
.
setDefaultEmailText
(
email
)
def
wrapWithShadow
(
subscription_request
,
amount
,
subscription_reference
):
def
wrapWithShadow
(
subscription_request
,
amount
,
subscription_reference
,
payment_mode
):
subscription_request
.
activate
(
tag
=
"subscription_condition_%s"
%
subscription_request
.
getId
()
subscription_request
.
activate
(
tag
=
"subscription_condition_%s"
%
subscription_request
.
getId
()
).
SubscriptionRequest_applyCondition
(
subscription_reference
)
).
SubscriptionRequest_applyCondition
(
subscription_reference
)
return
subscription_request
.
SubscriptionRequest_requestPaymentTransaction
(
amount
=
amount
,
return
subscription_request
.
SubscriptionRequest_requestPaymentTransaction
(
amount
=
amount
,
tag
=
"subscription_%s"
%
subscription_request
.
getId
())
tag
=
"subscription_%s"
%
subscription_request
.
getId
()
,
payment_mode
=
payment_mode
)
payment
=
person
.
Person_restrictMethodAsShadowUser
(
payment
=
person
.
Person_restrictMethodAsShadowUser
(
shadow_document
=
person
,
shadow_document
=
person
,
callable_object
=
wrapWithShadow
,
callable_object
=
wrapWithShadow
,
argument_list
=
[
subscription_request
,
user_input_dict
[
"amount"
],
subscription_reference
])
argument_list
=
[
subscription_request
,
user_input_dict
[
"amount"
],
subscription_reference
,
payment_mode
])
if
batch_mode
:
if
batch_mode
:
return
{
'subscription'
:
subscription_request
.
getRelativeUrl
(),
'payment'
:
payment
.
getRelativeUrl
()
}
return
{
'subscription'
:
subscription_request
.
getRelativeUrl
(),
'payment'
:
payment
.
getRelativeUrl
()
}
def
wrapGetPriceWithShadow
(
payment
):
return
payment
.
PaymentTransaction_getTotalPayablePrice
()
price
=
person
.
Person_restrictMethodAsShadowUser
(
shadow_document
=
person
,
callable_object
=
wrapGetPriceWithShadow
,
argument_list
=
[
payment
,])
if
payment_mode
==
"wechat"
:
portal
=
context
.
getPortalObject
()
code_url
=
portal
.
Base_getWechatCodeURL
(
subscription_request
.
getId
(),
price
,
user_input_dict
[
"amount"
])
web_site
=
context
.
getWebSiteValue
()
base_url
=
web_site
.
absolute_url
()
return
context
.
REQUEST
.
RESPONSE
.
redirect
(
"%s/#wechat_payment?amount=%s&trade_no=%s&code_url=%s"
%
(
base_url
,
user_input_dict
[
"amount"
],
subscription_request
.
getId
(),
code_url
))
def
wrapRedirectWithShadow
(
payment_transaction
,
web_site
):
def
wrapRedirectWithShadow
(
payment_transaction
,
web_site
):
return
payment_transaction
.
PaymentTransaction_redirectToManualPayzenPayment
(
web_site
)
return
payment_transaction
.
PaymentTransaction_redirectToManualPayzenPayment
(
web_site
)
...
...
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequestModule_requestSubscriptionProxy.xml
View file @
9265d0f2
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
email, subscription_reference, confirmation_required=False, user_input_dict={}, batch_mode=True, REQUEST=None
</string>
</value>
<value>
<string>
email, subscription_reference,
payment_mode=None,
confirmation_required=False, user_input_dict={}, batch_mode=True, REQUEST=None
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<key>
<string>
_proxy_roles
</string>
</key>
...
...
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_createRelatedSaleInvoiceTransaction.py
View file @
9265d0f2
...
@@ -7,7 +7,10 @@ portal = context.getPortalObject()
...
@@ -7,7 +7,10 @@ portal = context.getPortalObject()
current_invoice
=
context
.
getCausalityValue
()
current_invoice
=
context
.
getCausalityValue
()
if
current_invoice
is
None
:
if
current_invoice
is
None
:
invoice_template_path
=
"accounting_module/template_pre_payment_subscription_sale_invoice_transaction"
if
payment_mode
==
"wechat"
:
invoice_template_path
=
"accounting_module/template_wechat_pre_payment_subscription_sale_invoice_transaction"
else
:
invoice_template_path
=
"accounting_module/template_pre_payment_subscription_sale_invoice_transaction"
invoice_template
=
portal
.
restrictedTraverse
(
invoice_template_path
)
invoice_template
=
portal
.
restrictedTraverse
(
invoice_template_path
)
current_invoice
=
invoice_template
.
Base_createCloneDocument
(
batch_mode
=
1
)
current_invoice
=
invoice_template
.
Base_createCloneDocument
(
batch_mode
=
1
)
...
...
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_createRelatedSaleInvoiceTransaction.xml
View file @
9265d0f2
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
amount, tag, payment, REQUEST=None
</string>
</value>
<value>
<string>
amount, tag, payment,
payment_mode=None,
REQUEST=None
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<key>
<string>
_proxy_roles
</string>
</key>
...
...
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_requestPaymentTransaction.py
View file @
9265d0f2
...
@@ -8,8 +8,13 @@ current_invoice = context.getCausalityValue()
...
@@ -8,8 +8,13 @@ current_invoice = context.getCausalityValue()
current_payment
=
None
current_payment
=
None
if
current_invoice
is
None
:
if
current_invoice
is
None
:
# Hardcoded value for reservation
payment_template
=
portal
.
restrictedTraverse
(
"accounting_module/slapos_pre_payment_template"
)
if
payment_mode
==
"wechat"
:
payment_template
=
portal
.
restrictedTraverse
(
"accounting_module/slapos_wechat_pre_payment_template"
)
quantity
=
int
(
amount
)
*
188
else
:
payment_template
=
portal
.
restrictedTraverse
(
"accounting_module/slapos_pre_payment_template"
)
quantity
=
int
(
amount
)
*
25
current_payment
=
payment_template
.
Base_createCloneDocument
(
batch_mode
=
1
)
current_payment
=
payment_template
.
Base_createCloneDocument
(
batch_mode
=
1
)
current_payment
.
edit
(
current_payment
.
edit
(
...
@@ -22,8 +27,7 @@ if current_invoice is None:
...
@@ -22,8 +27,7 @@ if current_invoice is None:
stop_date
=
DateTime
()
stop_date
=
DateTime
()
)
)
# Hardcoded value for reservation
quantity
=
int
(
amount
)
*
25
for
line
in
current_payment
.
contentValues
():
for
line
in
current_payment
.
contentValues
():
if
line
.
getSource
()
==
"account_module/bank"
:
if
line
.
getSource
()
==
"account_module/bank"
:
line
.
setQuantity
(
-
1
*
quantity
)
line
.
setQuantity
(
-
1
*
quantity
)
...
@@ -39,6 +43,6 @@ if current_invoice is None:
...
@@ -39,6 +43,6 @@ if current_invoice is None:
context
.
reindexObject
(
activate_kw
=
{
'tag'
:
tag
})
context
.
reindexObject
(
activate_kw
=
{
'tag'
:
tag
})
context
.
activate
(
tag
=
tag
).
SubscriptionRequest_createRelatedSaleInvoiceTransaction
(
context
.
activate
(
tag
=
tag
).
SubscriptionRequest_createRelatedSaleInvoiceTransaction
(
amount
,
tag
,
current_payment
.
getRelativeUrl
())
amount
,
tag
,
current_payment
.
getRelativeUrl
()
,
payment_mode
)
return
current_payment
return
current_payment
master/bt5/slapos_subscription_request/SkinTemplateItem/portal_skins/slapos_subscription_request/SubscriptionRequest_requestPaymentTransaction.xml
View file @
9265d0f2
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
amount, tag, REQUEST=None
</string>
</value>
<value>
<string>
amount, tag,
payment_mode=None,
REQUEST=None
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<key>
<string>
_proxy_roles
</string>
</key>
...
...
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testERP5WechatSecurePayment.py
0 → 100644
View file @
9265d0f2
##############################################################################
#
# Copyright (c) 2002-2011 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly advised to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
class
TestERP5WechatSecurePayment
(
ERP5TypeTestCase
):
"""
An ERP5 Wechat Secure Payment test case
"""
def
getTitle
(
self
):
return
"ERP5 Wechat Secure Payment"
def
afterSetUp
(
self
):
pass
def
test_submit_wechat_order
(
self
):
self
.
portal
=
self
.
getPortalObject
()
# '20190925-226AD' is the trade number which submitted to the wechat server manually
# Use this to check our query function
# TODO:
# - Move wechat urls to slapos_vifib/ERP5Site_getWechatPaymentConfiguration.py
# - Add fake urls in slapos_subscription_request/ERP5Site_getWechatPaymentConfiguration.py
# Mock the wechat call
# return_code = self.portal.Base_getWechatCodeURL('23456789-AAAAA', 1, 1)
# self.assertEqual(return_code[:14], 'weixin://wxpay/')
def
test_query_wechat_order
(
self
):
self
.
portal
=
self
.
getPortalObject
()
# '20190925-226AD' is the trade number which submitted to the wechat server manually
# Use this to check our query function
return_code
=
self
.
portal
.
Base_queryWechatOrderStatusByTradeNo
(
trade_no
=
'20190925-226AD'
)
self
.
assertEqual
(
return_code
,
'SUCCESS'
)
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testERP5WechatSecurePayment.xml
0 → 100644
View file @
9265d0f2
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Test Component"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
testERP5WechatSecurePayment
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test.erp5.testERP5WechatSecurePayment
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Test Component
</string>
</value>
</item>
<item>
<key>
<string>
sid
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
text_content_error_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
erp5
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.patches.WorkflowTool"
/>
</pickle>
<pickle>
<tuple>
<none/>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
validate
</string>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
validated
</string>
</value>
</item>
</dictionary>
</list>
<none/>
</tuple>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_subscription_request/TestTemplateItem/portal_components/test.erp5.testSlapOSSubscriptionChineseScenario.py
View file @
9265d0f2
...
@@ -23,7 +23,7 @@ class TestSlapOSSubscriptionChineseScenario(TestSlapOSSubscriptionScenarioMixin)
...
@@ -23,7 +23,7 @@ class TestSlapOSSubscriptionChineseScenario(TestSlapOSSubscriptionScenarioMixin)
url_string
=
self
.
generateNewSoftwareReleaseUrl
(),
url_string
=
self
.
generateNewSoftwareReleaseUrl
(),
root_slave
=
slave
,
root_slave
=
slave
,
price
=
1888.00
,
price
=
1888.00
,
resource
=
"currency_module/
RMB
"
,
resource
=
"currency_module/
CNY
"
,
default_source_reference
=
"default"
,
default_source_reference
=
"default"
,
reference
=
"rapidvm%s"
%
self
.
new_id
,
reference
=
"rapidvm%s"
%
self
.
new_id
,
# Aggregate and Follow up to web pages for product description and
# Aggregate and Follow up to web pages for product description and
...
...
master/bt5/slapos_subscription_request/bt/template_extension_id_list
View file @
9265d0f2
extension.erp5.SlapOSSubscriptionRequest
extension.erp5.SlapOSSubscriptionRequest
\ No newline at end of file
extension.erp5.WechatUtils
\ No newline at end of file
master/bt5/slapos_subscription_request/bt/template_path_list
View file @
9265d0f2
accounting_module/slapos_pre_payment_template
accounting_module/slapos_pre_payment_template
accounting_module/slapos_pre_payment_template/**
accounting_module/slapos_pre_payment_template/**
accounting_module/slapos_wechat_pre_payment_template
accounting_module/slapos_wechat_pre_payment_template/**
accounting_module/template_pre_payment_subscription_sale_invoice_transaction
accounting_module/template_pre_payment_subscription_sale_invoice_transaction
accounting_module/template_pre_payment_subscription_sale_invoice_transaction/**
accounting_module/template_pre_payment_subscription_sale_invoice_transaction/**
accounting_module/template_wechat_pre_payment_subscription_sale_invoice_transaction
accounting_module/template_wechat_pre_payment_subscription_sale_invoice_transaction/**
notification_message_module/slapos-free-trial-token
notification_message_module/slapos-free-trial-token
portal_alarms/slapos_subscription_request_process_**
portal_alarms/slapos_subscription_request_process_**
portal_alarms/slapos_trial_process_**
portal_alarms/slapos_trial_process_**
\ No newline at end of file
master/bt5/slapos_subscription_request/bt/template_test_id_list
View file @
9265d0f2
...
@@ -4,4 +4,5 @@ test.erp5.testSlapOSTrialScenario
...
@@ -4,4 +4,5 @@ test.erp5.testSlapOSTrialScenario
test.erp5.testSlapOSSubscriptionAlarm
test.erp5.testSlapOSSubscriptionAlarm
test.erp5.testSlapOSSubscriptionSkins
test.erp5.testSlapOSSubscriptionSkins
test.erp5.testSlapOSSubscriptionScenario
test.erp5.testSlapOSSubscriptionScenario
test.erp5.testSlapOSSubscriptionChineseScenario
test.erp5.testSlapOSSubscriptionChineseScenario
\ No newline at end of file
test.erp5.testERP5WechatSecurePayment
\ 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