Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
slapos.core
Commits
3ba6dd46
Commit
3ba6dd46
authored
Dec 19, 2019
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_wechat: Fixup security for anonymous access while verifing payment
parent
179bcdaa
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
50 additions
and
2 deletions
+50
-2
master/bt5/slapos_wechat/SkinTemplateItem/portal_skins/slapos_wechat/Base_queryWechatOrderStatusByTradeNo.py
...ins/slapos_wechat/Base_queryWechatOrderStatusByTradeNo.py
+1
-1
master/bt5/slapos_wechat/SkinTemplateItem/portal_skins/slapos_wechat/Base_queryWechatOrderStatusByTradeNo.xml
...ns/slapos_wechat/Base_queryWechatOrderStatusByTradeNo.xml
+8
-0
master/bt5/slapos_wechat/SkinTemplateItem/portal_skins/slapos_wechat/PaymentTransaction_createWechatEvent.xml
...ns/slapos_wechat/PaymentTransaction_createWechatEvent.xml
+8
-0
master/bt5/slapos_wechat/SkinTemplateItem/portal_skins/slapos_wechat/PaymentTransaction_getWechatId.xml
...al_skins/slapos_wechat/PaymentTransaction_getWechatId.xml
+8
-0
master/bt5/slapos_wechat/SkinTemplateItem/portal_skins/slapos_wechat/PaymentTransaction_updateWechatPaymentStatus.xml
...s_wechat/PaymentTransaction_updateWechatPaymentStatus.xml
+8
-0
master/bt5/slapos_wechat/SkinTemplateItem/portal_skins/slapos_wechat/WechatEvent_processUpdate.xml
.../portal_skins/slapos_wechat/WechatEvent_processUpdate.xml
+8
-0
master/bt5/slapos_wechat/WorkflowTemplateItem/portal_workflow/wechat_interface_workflow/scripts/WechatEvent_generateNavigationPage.py
...ce_workflow/scripts/WechatEvent_generateNavigationPage.py
+1
-1
master/bt5/slapos_wechat/WorkflowTemplateItem/portal_workflow/wechat_interface_workflow/scripts/WechatEvent_updateStatus.xml
...t_interface_workflow/scripts/WechatEvent_updateStatus.xml
+8
-0
No files found.
master/bt5/slapos_wechat/SkinTemplateItem/portal_skins/slapos_wechat/Base_queryWechatOrderStatusByTradeNo.py
View file @
3ba6dd46
...
...
@@ -2,7 +2,7 @@ if not trade_no:
raise
Exception
(
"You need to provide a trade number"
)
portal
=
context
.
getPortalObject
()
payment
=
portal
.
restrictedTraverse
(
"accounting_module/%s"
%
trade_no
)
payment
=
portal
.
accounting_module
[
trade_no
]
if
not
payment
:
raise
Exception
(
"The payment with reference %s was not found"
%
trade_no
)
...
...
master/bt5/slapos_wechat/SkinTemplateItem/portal_skins/slapos_wechat/Base_queryWechatOrderStatusByTradeNo.xml
View file @
3ba6dd46
...
...
@@ -52,6 +52,14 @@
<key>
<string>
_params
</string>
</key>
<value>
<string>
trade_no=None
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_queryWechatOrderStatusByTradeNo
</string>
</value>
...
...
master/bt5/slapos_wechat/SkinTemplateItem/portal_skins/slapos_wechat/PaymentTransaction_createWechatEvent.xml
View file @
3ba6dd46
...
...
@@ -52,6 +52,14 @@
<key>
<string>
_params
</string>
</key>
<value>
<string>
REQUEST=None, **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>
PaymentTransaction_createWechatEvent
</string>
</value>
...
...
master/bt5/slapos_wechat/SkinTemplateItem/portal_skins/slapos_wechat/PaymentTransaction_getWechatId.xml
View file @
3ba6dd46
...
...
@@ -52,6 +52,14 @@
<key>
<string>
_params
</string>
</key>
<value>
<string>
REQUEST=None
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
PaymentTransaction_getWechatId
</string>
</value>
...
...
master/bt5/slapos_wechat/SkinTemplateItem/portal_skins/slapos_wechat/PaymentTransaction_updateWechatPaymentStatus.xml
View file @
3ba6dd46
...
...
@@ -52,6 +52,14 @@
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
PaymentTransaction_updateWechatPaymentStatus
</string>
</value>
...
...
master/bt5/slapos_wechat/SkinTemplateItem/portal_skins/slapos_wechat/WechatEvent_processUpdate.xml
View file @
3ba6dd46
...
...
@@ -52,6 +52,14 @@
<key>
<string>
_params
</string>
</key>
<value>
<string>
data_kw, REQUEST=None
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
WechatEvent_processUpdate
</string>
</value>
...
...
master/bt5/slapos_wechat/WorkflowTemplateItem/portal_workflow/wechat_interface_workflow/scripts/WechatEvent_generateNavigationPage.py
View file @
3ba6dd46
...
...
@@ -11,7 +11,7 @@ if transaction_id is None:
wechat_dict
=
{
'out_trade_no'
:
payment_transaction
.
getId
().
encode
(
'utf-8'
),
'total_fee'
:
str
(
int
(
round
((
payment_transaction
.
PaymentTransaction_getTotalPayablePrice
()
*
100
),
0
)
)),
'total_fee'
:
int
(
round
((
payment_transaction
.
PaymentTransaction_getTotalPayablePrice
()
*
-
100
),
0
)),
'fee_type'
:
payment_transaction
.
getResourceValue
().
Currency_getIntegrationMapping
(),
'body'
:
"Rapid Space Virtual Machine"
.
encode
(
'utf-8'
)
}
...
...
master/bt5/slapos_wechat/WorkflowTemplateItem/portal_workflow/wechat_interface_workflow/scripts/WechatEvent_updateStatus.xml
View file @
3ba6dd46
...
...
@@ -52,6 +52,14 @@
<key>
<string>
_params
</string>
</key>
<value>
<string>
state_change
</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>
WechatEvent_updateStatus
</string>
</value>
...
...
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