Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Romain Courteaud
slapos.core
Commits
d3fadd52
Commit
d3fadd52
authored
Dec 12, 2019
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud; Update Mixin to support Wechat in same way as Payzen
parent
040f769e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseMixin.py
...teItem/portal_components/test.erp5.SlapOSTestCaseMixin.py
+13
-3
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseMixin.xml
...eItem/portal_components/test.erp5.SlapOSTestCaseMixin.xml
+1
-0
No files found.
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseMixin.py
View file @
d3fadd52
...
@@ -505,8 +505,12 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
...
@@ -505,8 +505,12 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
portal_type
=
'Payzen Event'
,
portal_type
=
'Payzen Event'
,
reference
=
'PAY-%s'
%
self
.
generateNewId
())
reference
=
'PAY-%s'
%
self
.
generateNewId
())
def
createWechatEvent
(
self
):
return
self
.
portal
.
system_event_module
.
newContent
(
portal_type
=
'Wechat Event'
,
reference
=
'PAY-%s'
%
self
.
generateNewId
())
def
createPayzenSaleInvoiceTransaction
(
self
,
destination_section
=
None
,
price
=
2
):
def
createPayzenSaleInvoiceTransaction
(
self
,
destination_section
=
None
,
price
=
2
,
payment_mode
=
"payzen"
):
new_title
=
self
.
generateNewId
()
new_title
=
self
.
generateNewId
()
new_reference
=
self
.
generateNewId
()
new_reference
=
self
.
generateNewId
()
new_source_reference
=
self
.
generateNewId
()
new_source_reference
=
self
.
generateNewId
()
...
@@ -519,7 +523,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
...
@@ -519,7 +523,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
source_reference
=
new_source_reference
,
source_reference
=
new_source_reference
,
destination_reference
=
new_destination_reference
,
destination_reference
=
new_destination_reference
,
destination_section
=
destination_section
,
destination_section
=
destination_section
,
payment_mode
=
"payzen"
,
payment_mode
=
payment_mode
,
specialise
=
"sale_trade_condition_module/slapos_aggregated_trade_condition"
,
specialise
=
"sale_trade_condition_module/slapos_aggregated_trade_condition"
,
created_by_builder
=
1
# to prevent init script to create lines
created_by_builder
=
1
# to prevent init script to create lines
)
)
...
@@ -538,7 +542,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
...
@@ -538,7 +542,7 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
payment
=
self
.
portal
.
accounting_module
.
newContent
(
payment
=
self
.
portal
.
accounting_module
.
newContent
(
portal_type
=
"Payment Transaction"
,
portal_type
=
"Payment Transaction"
,
payment_mode
=
"payzen"
,
payment_mode
=
payment_mode
,
causality_value
=
invoice
,
causality_value
=
invoice
,
destination_section
=
destination_section
,
destination_section
=
destination_section
,
created_by_builder
=
1
# to prevent init script to create lines
created_by_builder
=
1
# to prevent init script to create lines
...
@@ -546,6 +550,12 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
...
@@ -546,6 +550,12 @@ class SlapOSTestCaseMixin(testSlapOSMixin):
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
payment
,
'started'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
payment
,
'started'
)
return
invoice
return
invoice
def
createWechatSaleInvoiceTransaction
(
self
,
destination_section
=
None
,
price
=
2
):
return
self
.
createPayzenSaleInvoiceTransaction
(
destination_section
=
destination_section
,
price
=
price
,
payment_mode
=
'wechat'
)
def
createRegularisationRequest
(
self
):
def
createRegularisationRequest
(
self
):
new_id
=
self
.
generateNewId
()
new_id
=
self
.
generateNewId
()
return
self
.
portal
.
regularisation_request_module
.
newContent
(
return
self
.
portal
.
regularisation_request_module
.
newContent
(
...
...
master/bt5/slapos_cloud/TestTemplateItem/portal_components/test.erp5.SlapOSTestCaseMixin.xml
View file @
d3fadd52
...
@@ -117,6 +117,7 @@
...
@@ -117,6 +117,7 @@
</item>
</item>
</dictionary>
</dictionary>
</list>
</list>
<none/>
</tuple>
</tuple>
</pickle>
</pickle>
</record>
</record>
...
...
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