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
Nicolas Wavrant
slapos.core
Commits
6e04329a
Commit
6e04329a
authored
Dec 13, 2019
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_wechat: pay the correct amount with the correct currency
parent
51ba4b90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
master/bt5/slapos_wechat/WorkflowTemplateItem/portal_workflow/wechat_interface_workflow/scripts/WechatEvent_generateNavigationPage.py
...ce_workflow/scripts/WechatEvent_generateNavigationPage.py
+2
-6
No files found.
master/bt5/slapos_wechat/WorkflowTemplateItem/portal_workflow/wechat_interface_workflow/scripts/WechatEvent_generateNavigationPage.py
View file @
6e04329a
...
...
@@ -24,15 +24,11 @@ transaction_date, transaction_id = payment_transaction.PaymentTransaction_genera
if
transaction_id
is
None
:
raise
ValueError
,
"Transaction already registered"
today
=
now
.
toZone
(
'UTC'
).
asdatetime
().
strftime
(
'%Y%m%d'
)
wechat_dict
=
{
'out_trade_no'
:
payment_transaction
.
getRelativeUrl
().
split
(
'/'
)[
1
].
encode
(
'utf-8'
),
'total_fee'
:
1
,
#
str(int(round((payment_transaction.PaymentTransaction_getTotalPayablePrice() * -100), 0))),
'fee_type'
:
"CNY"
,
#
payment_transaction.getResourceValue().Currency_getIntegrationMapping(),
'total_fee'
:
str
(
int
(
round
((
payment_transaction
.
PaymentTransaction_getTotalPayablePrice
()
*
-
100
),
0
))),
'fee_type'
:
payment_transaction
.
getResourceValue
().
Currency_getIntegrationMapping
(),
'body'
:
"Rapid Space Virtual Machine"
.
encode
(
'utf-8'
)
#'vads_trans_date': now.toZone('UTC').asdatetime().strftime('%Y%m%d%H%M%S'),
#'vads_trans_id': transaction_id,
# TODO
}
html_document
=
context
.
WechatEvent_callWechatServiceNavigation
(
state_change
,
wechat_dict
)
...
...
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