Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
8b2a1731
Commit
8b2a1731
authored
May 15, 2020
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Plain Diff
Wechat payment
See merge request !1123
parents
4ec60c39
5feaeac4
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
2010 additions
and
34 deletions
+2010
-34
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/WebSection_checkWechatPaymentStatus.py
...advanced_ecommerce/WebSection_checkWechatPaymentStatus.py
+1
-0
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/WebSection_checkWechatPaymentStatus.xml
...dvanced_ecommerce/WebSection_checkWechatPaymentStatus.xml
+70
-0
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/WebSection_finalizeShopping.py
...ns/erp5_advanced_ecommerce/WebSection_finalizeShopping.py
+2
-1
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/WebSection_finalizeShopping.xml
...s/erp5_advanced_ecommerce/WebSection_finalizeShopping.xml
+1
-1
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/WebSection_viewWechatPayment.xml
.../erp5_advanced_ecommerce/WebSection_viewWechatPayment.xml
+109
-0
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/WebSection_viewWechatPayment/your_wechat_payment.xml
...erce/WebSection_viewWechatPayment/your_wechat_payment.xml
+322
-0
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/WebSection_viewWechatPaymentWidget.xml
...advanced_ecommerce/WebSection_viewWechatPaymentWidget.xml
+58
-0
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/WebSection_viewWechatPaymentWidget.zpt
...advanced_ecommerce/WebSection_viewWechatPaymentWidget.zpt
+73
-0
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/advanced_ecommerce_image/wechat_description.png.png
...merce/advanced_ecommerce_image/wechat_description.png.png
+0
-0
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/advanced_ecommerce_image/wechat_description.png.xml
...merce/advanced_ecommerce_image/wechat_description.png.xml
+36
-0
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/advanced_ecommerce_image/wechat_image.png.png
...d_ecommerce/advanced_ecommerce_image/wechat_image.png.png
+0
-0
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/advanced_ecommerce_image/wechat_image.png.xml
...d_ecommerce/advanced_ecommerce_image/wechat_image.png.xml
+36
-0
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/advanced_ecommerce_layout/cart_box.xml
...advanced_ecommerce/advanced_ecommerce_layout/cart_box.xml
+26
-1
bt5/erp5_advanced_ecommerce_test/PathTemplateItem/portal_categories/payment_mode/wechat.xml
...athTemplateItem/portal_categories/payment_mode/wechat.xml
+85
-0
bt5/erp5_advanced_ecommerce_test/PathTemplateItem/portal_tests/advanced_ecommerce_zuite/test023WechatPayment.xml
...l_tests/advanced_ecommerce_zuite/test023WechatPayment.xml
+58
-0
bt5/erp5_advanced_ecommerce_test/PathTemplateItem/portal_tests/advanced_ecommerce_zuite/test023WechatPayment.zpt
...l_tests/advanced_ecommerce_zuite/test023WechatPayment.zpt
+187
-0
bt5/erp5_advanced_ecommerce_test/PathTemplateItem/sale_trade_condition_module/test_loyalty_reward_paypal.xml
...ale_trade_condition_module/test_loyalty_reward_paypal.xml
+3
-5
bt5/erp5_advanced_ecommerce_test/PathTemplateItem/sale_trade_condition_module/test_sale_trade_condition.xml
...sale_trade_condition_module/test_sale_trade_condition.xml
+11
-5
bt5/erp5_advanced_ecommerce_test/PathTemplateItem/sale_trade_condition_module/test_wechat_sale_trade_condition.xml
...ade_condition_module/test_wechat_sale_trade_condition.xml
+337
-0
bt5/erp5_advanced_ecommerce_test/PathTemplateItem/sale_trade_condition_module/test_wechat_sale_trade_condition/default_payment_condition.xml
...wechat_sale_trade_condition/default_payment_condition.xml
+155
-0
bt5/erp5_advanced_ecommerce_test/PathTemplateItem/web_site_module/ecommerce_example.xml
...st/PathTemplateItem/web_site_module/ecommerce_example.xml
+12
-15
bt5/erp5_advanced_ecommerce_test/PathTemplateItem/web_site_module/ecommerce_example/wechat_payment.xml
...Item/web_site_module/ecommerce_example/wechat_payment.xml
+409
-0
bt5/erp5_advanced_ecommerce_test/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce_test/WebSection_viewConfirmPayment.py
..._advanced_ecommerce_test/WebSection_viewConfirmPayment.py
+11
-3
bt5/erp5_advanced_ecommerce_test/bt/template_keep_last_workflow_history_only_path_list
...est/bt/template_keep_last_workflow_history_only_path_list
+3
-1
bt5/erp5_advanced_ecommerce_test/bt/template_path_list
bt5/erp5_advanced_ecommerce_test/bt/template_path_list
+3
-0
bt5/erp5_wechat_secure_payment/DocumentTemplateItem/portal_components/document.erp5.WechatService.py
...lateItem/portal_components/document.erp5.WechatService.py
+2
-2
No files found.
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/WebSection_checkWechatPaymentStatus.py
0 → 100644
View file @
8b2a1731
raise
NotImplementedError
(
'You should override this script'
)
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/WebSection_checkWechatPaymentStatus.xml
0 → 100644
View file @
8b2a1731
<?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,**kw
</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>
WebSection_checkWechatPaymentStatus
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/WebSection_finalizeShopping.py
View file @
8b2a1731
...
...
@@ -38,4 +38,5 @@ for amount in sale_order.getAggregatedAmountList():
# clean up shopping cart
context
.
WebSection_resetShoppingCart
()
# Display nice message
context
.
Base_redirect
(
'SaleOrder_viewThankYouMessage'
)
if
not
batch_mode
:
context
.
Base_redirect
(
'SaleOrder_viewThankYouMessage'
)
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/WebSection_finalizeShopping.xml
View file @
8b2a1731
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
batch_mode=False
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
...
...
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/WebSection_viewWechatPayment.xml
0 → 100644
View file @
8b2a1731
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ERP5 Form"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
enctype
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<list>
<string>
left
</string>
<string>
right
</string>
<string>
center
</string>
<string>
bottom
</string>
<string>
hidden
</string>
</list>
</value>
</item>
<item>
<key>
<string>
groups
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
bottom
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
center
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
left
</string>
</key>
<value>
<list>
<string>
your_wechat_payment
</string>
</list>
</value>
</item>
<item>
<key>
<string>
right
</string>
</key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
WebSection_viewWechatPayment
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
<value>
<string>
POST
</string>
</value>
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
WebSection_viewWechatPayment
</string>
</value>
</item>
<item>
<key>
<string>
row_length
</string>
</key>
<value>
<int>
4
</int>
</value>
</item>
<item>
<key>
<string>
stored_encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
unicode_mode
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/WebSection_viewWechatPayment/your_wechat_payment.xml
0 → 100644
View file @
8b2a1731
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"EditorField"
module=
"Products.ERP5Form.EditorField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_wechat_payment
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
<item>
<key>
<string>
line_too_long
</string>
</key>
<value>
<string>
A line was too long.
</string>
</value>
</item>
<item>
<key>
<string>
required_not_found
</string>
</key>
<value>
<string>
Input is required but no input given.
</string>
</value>
</item>
<item>
<key>
<string>
too_long
</string>
</key>
<value>
<string>
You entered too many characters.
</string>
</value>
</item>
<item>
<key>
<string>
too_many_lines
</string>
</key>
<value>
<string>
You entered too many lines.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_length
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_linelength
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_lines
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
text_editor
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
unicode
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
whitespace_preserve
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_length
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_linelength
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_lines
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
text_editor
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
unicode
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
whitespace_preserve
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string>
hiddenLabel
</string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
extra
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<int>
5
</int>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
max_length
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_linelength
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
max_lines
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
text_editor
</string>
</key>
<value>
<string>
text_area
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
your_wechat_payment
</string>
</value>
</item>
<item>
<key>
<string>
unicode
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
whitespace_preserve
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<int>
40
</int>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
here/WebSection_viewWechatPaymentWidget
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: not here.SaleOrder_isShoppingCartEmpty()
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/WebSection_viewWechatPaymentWidget.xml
0 → 100644
View file @
8b2a1731
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<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_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
WebSection_viewWechatPaymentWidget
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/WebSection_viewWechatPaymentWidget.zpt
0 → 100644
View file @
8b2a1731
<tal:block tal:define="payment_url python: request.get('payment_url', '');
price python: int(request.get('price', '0')) / 100.0;
trade_no python: request.get('trade_no', '')
" >
<p>请使用微信扫描下方二维码来完成支付</p>
<input id='trade_no' type="hidden" tal:attributes="value python: trade_no">
<h2 style="float:left;">支付 <span tal:content="python: price"></span> 元</h2>
<div style="clear:both"></div>
<div style="position:absolute;left:50%;">
<div class='qr_code' position='relative'>
<div class="qr_code_wrapper" style="line-height: 300px;
display:none;
text-align: center;
position: absolute;
font-size: 14px;
color: #fff;
background: rgba(0,0,0,.6);
width: 300px;
height: 300px;
cursor: pointer;">
<span style='display: block;font-size: 14px;color: #fff;margin-top: 10px;'>请点击继续</span>
</div>
<img class="wechat_qrcode" width="294" style="border: 1px solid grey;"
tal:attributes="src python:'Base_generateBarcodeImage?barcode_type=qrcode&data=%s' % payment_url">
</div>
<img src="advanced_ecommerce_image/wechat_description.png" width="300">
</div>
<script>
$(document).ready(function() {
var timer = 0,
wrapper = $(".qr_code_wrapper"),
trade_no = $('#trade_no').val(),
loop;
function restartCheckingIfNeeded() {
timer += 1;
if (timer > 40) {
wrapper.css("display", "block");
} else {
console.log('restart')
setTimeout(checkPaymentStatus, 3000);
}
}
function checkPaymentStatus(){
$.ajax({
url:'WebSection_checkWechatPaymentStatus',
data:{
trade_no: trade_no
},
success:function(result_dict){
result_dict = JSON.parse(result_dict);
if (result_dict['status'] == 'success') {
window.location.href="SaleOrder_viewThankYouMessage";
} else if (result_dict['status'] == 'cancelled') {
window.location.href="?portal_status_message=订单已取消"
} else {
restartCheckingIfNeeded();
}
},
error: function (error){
console.log(error);
restartCheckingIfNeeded();
}
});
}
checkPaymentStatus()
wrapper.click(function() {
timer = 0;
wrapper.css("display", "none");
setTimeout(checkPaymentStatus, 3000)
});
});
</script>
</tal:block>
\ No newline at end of file
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/advanced_ecommerce_image/wechat_description.png.png
0 → 100644
View file @
8b2a1731
7 KB
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/advanced_ecommerce_image/wechat_description.png.xml
0 → 100644
View file @
8b2a1731
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Image"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
wechat_description.png
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
image/png
</string>
</value>
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<int>
86
</int>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<int>
260
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/advanced_ecommerce_image/wechat_image.png.png
0 → 100644
View file @
8b2a1731
7.08 KB
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/advanced_ecommerce_image/wechat_image.png.xml
0 → 100644
View file @
8b2a1731
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Image"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
wechat_image.png
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
image/png
</string>
</value>
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<int>
86
</int>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<int>
103
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_advanced_ecommerce/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce/advanced_ecommerce_layout/cart_box.xml
View file @
8b2a1731
...
...
@@ -9,7 +9,9 @@
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list/>
<list>
<string>
enabled
</string>
</list>
</value>
</item>
<item>
...
...
@@ -50,6 +52,12 @@
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -69,6 +77,10 @@
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
cart_box
</string>
</value>
...
...
@@ -87,4 +99,17 @@
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: not request.get(\'payment_url\', None) and len(here.SaleOrder_getShoppingCartItemList())
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_advanced_ecommerce_test/PathTemplateItem/portal_categories/payment_mode/wechat.xml
0 → 100644
View file @
8b2a1731
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Category"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_folders_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Copy_or_Move_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Delete_objects_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
codification
</string>
</key>
<value>
<string>
WC
</string>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
WC
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
wechat
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Category
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Wechat
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_advanced_ecommerce_test/PathTemplateItem/portal_tests/advanced_ecommerce_zuite/test023WechatPayment.xml
0 → 100644
View file @
8b2a1731
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<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_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test023WechatPayment
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_advanced_ecommerce_test/PathTemplateItem/portal_tests/advanced_ecommerce_zuite/test023WechatPayment.zpt
0 → 100644
View file @
8b2a1731
<html
xmlns:tal=
"http://xml.zope.org/namespaces/tal"
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>
Test Front Page
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr><td
rowspan=
"1"
colspan=
"3"
>
Test Front Page
</td></tr>
</thead><tbody>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/init"
/>
<tal:block
metal:use-macro=
"here/ZuiteAdvancedECommerce_CommonTemplate/macros/login_as_super_user"
/>
<tr>
<td>
openAndWait
</td>
<td>
${base_url}/PurchasePackingList_deliver
</td>
<td></td>
</tr>
<tr>
<td>
verifyTextPresent
</td>
<td>
Done
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/wait_for_activities"
/>
<tal:block
metal:use-macro=
"here/ZuiteAdvancedECommerce_CommonTemplate/macros/logout"
/>
<tal:block
metal:use-macro=
"here/ZuiteAdvancedECommerce_CommonTemplate/macros/reset_shopcart"
/>
<tr>
<td>
setTimeout
</td>
<td>
300000
</td>
<td></td>
</tr>
<tr>
<td>
openAndWait
</td>
<td>
${base_url}/web_site_module/ecommerce_example
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@class="header_login"]
</td>
<td></td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
//a[contains(@href, "test_normal_product")]
</td>
<td></td>
</tr>
<tr>
<td>
type
</td>
<td>
//select[@name="field_your_buy_quantity"]
</td>
<td>
2
</td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
//input[@value="Add to cart"]
</td>
<td></td>
</tr>
<tr>
<td>
verifyTextPresent
</td>
<td>
Added to cart.
</td>
<td></td>
</tr>
<tr>
<td>
verifyElementPresent
</td>
<td>
//td[@class="cart_middle"]//div[contains(text(), "280")]
</td>
<td></td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
//div[@class="left"]//div[contains(@class, "checkout")]//a[contains(@href, "cart")]
</td>
<td></td>
</tr>
<tr>
<td>
verifyElementPresent
</td>
<td>
//div[contains(@class, "shopping_cart_renderer")]
</td>
<td></td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
//input[@value="wechat"]
</td>
<td></td>
</tr>
<tr>
<td>
verifyTextPresent
</td>
<td>
Shopping Cart Updated
</td>
<td></td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
//input[@value="Update Shipping Method"]
</td>
<td>
</tr>
<tr>
<td>
check
</td>
<td>
//input[@value="service_module/test_deliver_mode"]
</td>
<td></td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
//input[@value="Update Shipping Method"]
</td>
<td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
//input[@value="Confirm Order"]
</td>
<td></td>
</tr>
<tr>
<td>
type
</td>
<td>
//input[@name="__ac_name"]
</td>
<td>
1
</td>
</tr>
<tr>
<td>
type
</td>
<td>
//input[@name="__ac_password"]
</td>
<td>
1
</td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
//input[@value="Login"]
</td>
<td></td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
//input[@value="Proceed to Payment"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//img[@class="wechat_qrcode"]
</td>
<td></td>
</tr>
<tr>
<td>
verifyElementPresent
</td>
<td>
//span[contains(text(), '282.0')]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@class='qr_code_wrapper' and contains(@style,'display: block')]
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//div[@class='qr_code_wrapper' and contains(@style,'display: block')]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementNotPresent
</td>
<td>
//div[@class='qr_code_wrapper' and contains(@style,'display: block')]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@class='qr_code_wrapper' and contains(@style,'display: none')]
</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
bt5/erp5_advanced_ecommerce_test/PathTemplateItem/sale_trade_condition_module/test_loyalty_reward_paypal.xml
View file @
8b2a1731
...
...
@@ -125,9 +125,7 @@
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<none/>
</value>
<value>
<string>
2
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
...
...
@@ -306,7 +304,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
983.
33462.55055.26197
</string>
</value>
<value>
<string>
983.
57486.40881.52155
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -324,7 +322,7 @@
</tuple>
<state>
<tuple>
<float>
158
8089266.61
</float>
<float>
158
9446600.14
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_advanced_ecommerce_test/PathTemplateItem/sale_trade_condition_module/test_sale_trade_condition.xml
View file @
8b2a1731
...
...
@@ -99,6 +99,10 @@
<none/>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
no_loyalty_reward_paypal
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
...
...
@@ -113,11 +117,13 @@
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Sale Trade Condition
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
test_sale_trade_condition
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<none/>
</value>
<value>
<string>
2
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
...
...
@@ -296,7 +302,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
983.
31553.28432.33262
</string>
</value>
<value>
<string>
983.
57486.40881.52155
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -314,7 +320,7 @@
</tuple>
<state>
<tuple>
<float>
158
7975634.77
</float>
<float>
158
9446592.66
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_advanced_ecommerce_test/PathTemplateItem/sale_trade_condition_module/test_wechat_sale_trade_condition.xml
0 → 100644
View file @
8b2a1731
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Sale Trade Condition"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</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>
</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>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_count
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_identity_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_mt_index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_tree
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAY=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
price_currency/currency_module/test_eur
</string>
<string>
specialise/business_process_module/erp5_default_business_process
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
no_loyalty_reward_wechat
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
test_wechat_sale_trade_condition
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Sale Trade Condition
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
test_wechat_sale_trade_condition
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
1
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAc=
</string>
</persistent>
</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=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<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=
"6"
aka=
"AAAAAAAAAAY="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"7"
aka=
"AAAAAAAAAAc="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
commerce_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAg=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
edit_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAk=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"8"
aka=
"AAAAAAAAAAg="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
publish
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1589444740.33
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
published
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"9"
aka=
"AAAAAAAAAAk="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
edit
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
983.57497.44062.42103
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
<value>
<string>
current
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1589446595.34
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_advanced_ecommerce_test/PathTemplateItem/sale_trade_condition_module/test_wechat_sale_trade_condition/default_payment_condition.xml
0 → 100644
View file @
8b2a1731
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Payment Condition"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
payment_mode/wechat
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
default_payment_condition
</string>
</value>
</item>
<item>
<key>
<string>
payment_end_of_month
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Payment Condition
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</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>
<item>
<key>
<string>
edit_workflow
</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=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
edit
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
0.0.0.0
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
<value>
<string>
current
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1589444608.09
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"Message"
module=
"Products.ERP5Type.Message"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string>
Object copied from ${source_item}
</string>
</value>
</item>
<item>
<key>
<string>
domain
</string>
</key>
<value>
<string>
erp5_ui
</string>
</value>
</item>
<item>
<key>
<string>
mapping
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
source_item
</string>
</key>
<value>
<string>
/erp5/sale_trade_condition_module/test_sale_trade_condition
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
message
</string>
</key>
<value>
<string>
Object copied from ${source_item}
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_advanced_ecommerce_test/PathTemplateItem/web_site_module/ecommerce_example.xml
View file @
8b2a1731
...
...
@@ -452,6 +452,7 @@
<value>
<tuple>
<string>
paypal
</string>
<string>
wechat
</string>
</tuple>
</value>
</item>
...
...
@@ -572,9 +573,7 @@
</item>
<item>
<key>
<string>
site_delivery_message_template
</string>
</key>
<value>
<none/>
</value>
<value>
<string>
test_deliver_info
</string>
</value>
</item>
<item>
<key>
<string>
site_loyalty_agreement_template
</string>
</key>
...
...
@@ -582,21 +581,21 @@
<none/>
</value>
</item>
<item>
<key>
<string>
site_loyalty_explanation_template
</string>
</key>
<value>
<string>
test_loyalty_explanation
</string>
</value>
</item>
<item>
<key>
<string>
site_map_section_parent
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
site_message_template
</string>
</key>
<value>
<none/>
</value>
<value>
<string>
test_site_warning
</string>
</value>
</item>
<item>
<key>
<string>
site_payment_message_template
</string>
</key>
<value>
<none/>
</value>
<value>
<string>
test_payment_info
</string>
</value>
</item>
<item>
<key>
<string>
site_product_individual_variation
</string>
</key>
...
...
@@ -610,9 +609,7 @@
</item>
<item>
<key>
<string>
site_return_message_template
</string>
</key>
<value>
<none/>
</value>
<value>
<string>
test_return_info
</string>
</value>
</item>
<item>
<key>
<string>
skin_selection_name
</string>
</key>
...
...
@@ -848,7 +845,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
super_user
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -862,7 +859,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
983.
26197.28731.24251
</string>
</value>
<value>
<string>
983.
57522.65528.2594
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -880,7 +877,7 @@
</tuple>
<state>
<tuple>
<float>
158
7654313.75
</float>
<float>
158
9446316.17
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_advanced_ecommerce_test/PathTemplateItem/web_site_module/ecommerce_example/wechat_payment.xml
0 → 100644
View file @
8b2a1731
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Section"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_folders_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Copy_or_Move_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Delete_objects_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
<string>
Owner
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
__before_publishing_traverse__
</string>
</key>
<value>
<object>
<klass>
<global
name=
"MultiHook"
module=
"ZPublisher.BeforeTraverse"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_defined_in_class
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
_hookname
</string>
</key>
<value>
<string>
__before_publishing_traverse__
</string>
</value>
</item>
<item>
<key>
<string>
_list
</string>
</key>
<value>
<list>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</list>
</value>
</item>
<item>
<key>
<string>
_prior
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
__before_traverse__
</string>
</key>
<value>
<dictionary>
<item>
<key>
<tuple>
<int>
99
</int>
<string>
ERP5 Web Section/wechat_payment
</string>
</tuple>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
_identity_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_local_properties
</string>
</key>
<value>
<tuple>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ecommerce_default_content
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
int
</string>
</value>
</item>
</dictionary>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ecommerce_product_list
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
int
</string>
</value>
</item>
</dictionary>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ecommerce_selected_product
</string>
</value>
</item>
<item>
<key>
<string>
type
</string>
</key>
<value>
<string>
int
</string>
</value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key>
<string>
_range_criterion
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
custom_render_method_id
</string>
</key>
<value>
<string>
WebSection_viewWechatPayment
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
ecommerce_default_content
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
ecommerce_product_list
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
ecommerce_selected_product
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
empty_criterion_valid
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
wechat_payment
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Section
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
skin_selection_name
</string>
</key>
<value>
<string>
E-Commerce
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Wechat_payment
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"WebSectionTraversalHook"
module=
"Products.ERP5.Document.WebSection"
/>
</pickle>
<pickle>
<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>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<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=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
category_publication_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAY=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
edit_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAc=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"6"
aka=
"AAAAAAAAAAY="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1589444977.85
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
embedded
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"7"
aka=
"AAAAAAAAAAc="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
edit
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
983.57502.45871.65006
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
<value>
<string>
current
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1589445046.51
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_advanced_ecommerce_test/SkinTemplateItem/portal_skins/erp5_advanced_ecommerce_test/WebSection_viewConfirmPayment.py
View file @
8b2a1731
payment_mode
=
payment_mode
.
lower
()
person
=
context
.
ERP5Site_getAuthenticatedMemberPersonValue
()
context
.
WebSection_persistShoppingCart
(
shopping_cart
,
person
)
return
context
.
Base_redirect
(
'view'
,
sale_order
=
context
.
WebSection_persistShoppingCart
(
shopping_cart
,
person
)
if
payment_mode
==
'paypal'
:
return
context
.
Base_redirect
(
'view'
,
keep_items
=
{
"portal_status_message"
:
"payment confirmed"
})
if
payment_mode
==
'wechat'
:
return
context
.
Base_redirect
(
'wechat_payment'
,
keep_items
=
{
'trade_no'
:
sale_order
.
getReference
().
encode
(
'utf-8'
),
'price'
:
int
(
round
((
shopping_cart
.
SaleOrder_getFinalPrice
()
*
100
),
0
)),
'payment_url'
:
'weixin'
})
bt5/erp5_advanced_ecommerce_test/bt/template_keep_last_workflow_history_only_path_list
View file @
8b2a1731
...
...
@@ -28,4 +28,6 @@ sale_trade_condition_module/test_loyalty_reward_paypal
sale_trade_condition_module/test_loyalty_reward_paypal/**
service_module/test_loyalty_discount
service_module/test_loyalty_using_point
service_module/test_loyalty_collect_point
\ No newline at end of file
service_module/test_loyalty_collect_point
sale_trade_condition_module/test_wechat_sale_trade_condition
sale_trade_condition_module/test_wechat_sale_trade_condition/**
\ No newline at end of file
bt5/erp5_advanced_ecommerce_test/bt/template_path_list
View file @
8b2a1731
currency_module/test_eur
organisation_module/test_warehouse
portal_categories/colour**
portal_categories/payment_mode/wechat
portal_categories/product_line/shipping/post
portal_categories/size/paris**
portal_tests/advanced_ecommerce_zuite
...
...
@@ -20,6 +21,8 @@ sale_trade_condition_module/test_loyalty_reward_paypal
sale_trade_condition_module/test_loyalty_reward_paypal/**
sale_trade_condition_module/test_sale_trade_condition
sale_trade_condition_module/test_sale_trade_condition/**
sale_trade_condition_module/test_wechat_sale_trade_condition
sale_trade_condition_module/test_wechat_sale_trade_condition/**
service_module/test_deliver_mode
service_module/test_deliver_mode/**
service_module/test_loyalty_collect_point
...
...
bt5/erp5_wechat_secure_payment/DocumentTemplateItem/portal_components/document.erp5.WechatService.py
View file @
8b2a1731
...
...
@@ -248,10 +248,10 @@ class WechatService(XMLObject):
'In Navigate'
,
error
=
False
)
portal
=
self
.
getPortalObject
()
base_url
=
portal
.
absolute_url
(
)
base_url
=
wechat_dict
.
pop
(
'base_url'
,
'%s/#wechat_payment'
%
portal
.
absolute_url
()
)
return
self
.
REQUEST
.
RESPONSE
.
redirect
(
"%s
/#wechat_payment
?trade_no=%s&price=%s&payment_url=%s"
%
(
"%s?trade_no=%s&price=%s&payment_url=%s"
%
(
base_url
,
wechat_dict
[
'out_trade_no'
],
wechat_dict
[
'total_fee'
],
...
...
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