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
Ivan Tyagov
slapos.core
Commits
68b0db4c
Commit
68b0db4c
authored
Dec 07, 2012
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Payment without simulation has a draft causality state
parent
37198d9a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
17 deletions
+9
-17
master/bt5/slapos_payzen/SkinTemplateItem/portal_skins/slapos_payzen/Alarm_updatePayzenConfirmedPaymentTransaction.xml
..._payzen/Alarm_updatePayzenConfirmedPaymentTransaction.xml
+1
-1
master/bt5/slapos_payzen/SkinTemplateItem/portal_skins/slapos_payzen/Alarm_updatePayzenStartedPaymentTransaction.xml
...os_payzen/Alarm_updatePayzenStartedPaymentTransaction.xml
+1
-1
master/bt5/slapos_payzen/TestTemplateItem/testSlapOSPayzenAlarm.py
...5/slapos_payzen/TestTemplateItem/testSlapOSPayzenAlarm.py
+6
-14
master/bt5/slapos_payzen/bt/revision
master/bt5/slapos_payzen/bt/revision
+1
-1
No files found.
master/bt5/slapos_payzen/SkinTemplateItem/portal_skins/slapos_payzen/Alarm_updatePayzenConfirmedPaymentTransaction.xml
View file @
68b0db4c
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
portal.portal_catalog.searchAndActivate(\n
portal.portal_catalog.searchAndActivate(\n
portal_type="Payment Transaction", \n
portal_type="Payment Transaction", \n
simulation_state=["confirmed"],\n
simulation_state=["confirmed"],\n
causality_state=["
solved
"],\n
causality_state=["
draft
"],\n
payment_mode_uid=portal.portal_categories.payment_mode.payzen.getUid(),\n
payment_mode_uid=portal.portal_categories.payment_mode.payzen.getUid(),\n
method_id=\'PaymentTransaction_startPayzenPayment\',\n
method_id=\'PaymentTransaction_startPayzenPayment\',\n
packet_size=1, # just one to minimise errors\n
packet_size=1, # just one to minimise errors\n
...
...
master/bt5/slapos_payzen/SkinTemplateItem/portal_skins/slapos_payzen/Alarm_updatePayzenStartedPaymentTransaction.xml
View file @
68b0db4c
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
portal.portal_catalog.searchAndActivate(\n
portal.portal_catalog.searchAndActivate(\n
portal_type="Payment Transaction", \n
portal_type="Payment Transaction", \n
simulation_state=["started"],\n
simulation_state=["started"],\n
causality_state=["
solved
"],\n
causality_state=["
draft
"],\n
payment_mode_uid=portal.portal_categories.payment_mode.payzen.getUid(),\n
payment_mode_uid=portal.portal_categories.payment_mode.payzen.getUid(),\n
method_id=\'PaymentTransaction_updateStatus\',\n
method_id=\'PaymentTransaction_updateStatus\',\n
packet_size=1, # just one to minimise errors\n
packet_size=1, # just one to minimise errors\n
...
...
master/bt5/slapos_payzen/TestTemplateItem/testSlapOSPayzenAlarm.py
View file @
68b0db4c
...
@@ -30,7 +30,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
...
@@ -30,7 +30,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
self
.
portal
.
portal_skins
.
custom
.
manage_delObjects
(
script_name
)
self
.
portal
.
portal_skins
.
custom
.
manage_delObjects
(
script_name
)
transaction
.
commit
()
transaction
.
commit
()
def
test_alarm_confirmed_
solved
_payzen
(
self
):
def
test_alarm_confirmed_
draft
_payzen
(
self
):
new_id
=
self
.
generateNewId
()
new_id
=
self
.
generateNewId
()
transaction
=
self
.
portal
.
accounting_module
.
newContent
(
transaction
=
self
.
portal
.
accounting_module
.
newContent
(
portal_type
=
'Payment Transaction'
,
portal_type
=
'Payment Transaction'
,
...
@@ -39,7 +39,6 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
...
@@ -39,7 +39,6 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
payment_mode
=
"payzen"
,
payment_mode
=
"payzen"
,
)
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'confirmed'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'confirmed'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'solved'
)
self
.
tic
()
self
.
tic
()
self
.
_simulatePaymentTransaction_startPayzenPayment
()
self
.
_simulatePaymentTransaction_startPayzenPayment
()
...
@@ -61,7 +60,6 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
...
@@ -61,7 +60,6 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
reference
=
"TESTTRANS-%s"
%
new_id
,
reference
=
"TESTTRANS-%s"
%
new_id
,
payment_mode
=
"payzen"
,
payment_mode
=
"payzen"
,
)
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'solved'
)
self
.
tic
()
self
.
tic
()
self
.
_simulatePaymentTransaction_startPayzenPayment
()
self
.
_simulatePaymentTransaction_startPayzenPayment
()
...
@@ -75,7 +73,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
...
@@ -75,7 +73,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
'Visited by PaymentTransaction_startPayzenPayment'
,
'Visited by PaymentTransaction_startPayzenPayment'
,
transaction
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
transaction
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
def
test_alarm_not_
solved
(
self
):
def
test_alarm_not_
draft
(
self
):
new_id
=
self
.
generateNewId
()
new_id
=
self
.
generateNewId
()
transaction
=
self
.
portal
.
accounting_module
.
newContent
(
transaction
=
self
.
portal
.
accounting_module
.
newContent
(
portal_type
=
'Payment Transaction'
,
portal_type
=
'Payment Transaction'
,
...
@@ -84,6 +82,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
...
@@ -84,6 +82,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
payment_mode
=
"payzen"
,
payment_mode
=
"payzen"
,
)
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'confirmed'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'confirmed'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'solved'
)
self
.
tic
()
self
.
tic
()
self
.
_simulatePaymentTransaction_startPayzenPayment
()
self
.
_simulatePaymentTransaction_startPayzenPayment
()
...
@@ -105,7 +104,6 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
...
@@ -105,7 +104,6 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
reference
=
"TESTTRANS-%s"
%
new_id
,
reference
=
"TESTTRANS-%s"
%
new_id
,
)
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'confirmed'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'confirmed'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'solved'
)
self
.
tic
()
self
.
tic
()
self
.
_simulatePaymentTransaction_startPayzenPayment
()
self
.
_simulatePaymentTransaction_startPayzenPayment
()
...
@@ -174,7 +172,6 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
...
@@ -174,7 +172,6 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
payment_mode
=
"payzen"
,
payment_mode
=
"payzen"
,
)
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'confirmed'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'confirmed'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'solved'
)
self
.
_simulatePaymentTransaction_sendManualPayzenPaymentUrl
()
self
.
_simulatePaymentTransaction_sendManualPayzenPaymentUrl
()
try
:
try
:
...
@@ -247,7 +244,6 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
...
@@ -247,7 +244,6 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
payment_mode
=
"payzen"
,
payment_mode
=
"payzen"
,
)
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'started'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'started'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'solved'
)
self
.
_simulatePaymentTransaction_addPayzenTicket
()
self
.
_simulatePaymentTransaction_addPayzenTicket
()
try
:
try
:
...
@@ -311,7 +307,6 @@ return Foo()
...
@@ -311,7 +307,6 @@ return Foo()
start_date
=
DateTime
(),
start_date
=
DateTime
(),
)
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'started'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'started'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'solved'
)
# Manually generate mapping
# Manually generate mapping
transaction
.
PaymentTransaction_generatePayzenId
()
transaction
.
PaymentTransaction_generatePayzenId
()
...
@@ -341,7 +336,6 @@ return Foo()
...
@@ -341,7 +336,6 @@ return Foo()
start_date
=
DateTime
(),
start_date
=
DateTime
(),
)
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'started'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'started'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'solved'
)
# Manually generate mapping
# Manually generate mapping
transaction
.
PaymentTransaction_generatePayzenId
()
transaction
.
PaymentTransaction_generatePayzenId
()
...
@@ -379,7 +373,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
...
@@ -379,7 +373,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
self
.
portal
.
portal_skins
.
custom
.
manage_delObjects
(
script_name
)
self
.
portal
.
portal_skins
.
custom
.
manage_delObjects
(
script_name
)
transaction
.
commit
()
transaction
.
commit
()
def
test_alarm_started_
solved
_payzen
(
self
):
def
test_alarm_started_
draft
_payzen
(
self
):
new_id
=
self
.
generateNewId
()
new_id
=
self
.
generateNewId
()
transaction
=
self
.
portal
.
accounting_module
.
newContent
(
transaction
=
self
.
portal
.
accounting_module
.
newContent
(
portal_type
=
'Payment Transaction'
,
portal_type
=
'Payment Transaction'
,
...
@@ -388,7 +382,6 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
...
@@ -388,7 +382,6 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
payment_mode
=
"payzen"
,
payment_mode
=
"payzen"
,
)
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'started'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'started'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'solved'
)
self
.
tic
()
self
.
tic
()
self
.
_simulatePaymentTransaction_updateStatus
()
self
.
_simulatePaymentTransaction_updateStatus
()
...
@@ -410,7 +403,6 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
...
@@ -410,7 +403,6 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
reference
=
"TESTTRANS-%s"
%
new_id
,
reference
=
"TESTTRANS-%s"
%
new_id
,
payment_mode
=
"payzen"
,
payment_mode
=
"payzen"
,
)
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'solved'
)
self
.
tic
()
self
.
tic
()
self
.
_simulatePaymentTransaction_updateStatus
()
self
.
_simulatePaymentTransaction_updateStatus
()
...
@@ -424,7 +416,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
...
@@ -424,7 +416,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
'Visited by PaymentTransaction_updateStatus'
,
'Visited by PaymentTransaction_updateStatus'
,
transaction
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
transaction
.
workflow_history
[
'edit_workflow'
][
-
1
][
'comment'
])
def
test_alarm_not_
solved
(
self
):
def
test_alarm_not_
draft
(
self
):
new_id
=
self
.
generateNewId
()
new_id
=
self
.
generateNewId
()
transaction
=
self
.
portal
.
accounting_module
.
newContent
(
transaction
=
self
.
portal
.
accounting_module
.
newContent
(
portal_type
=
'Payment Transaction'
,
portal_type
=
'Payment Transaction'
,
...
@@ -433,6 +425,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
...
@@ -433,6 +425,7 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
payment_mode
=
"payzen"
,
payment_mode
=
"payzen"
,
)
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'started'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'started'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'solved'
)
self
.
tic
()
self
.
tic
()
self
.
_simulatePaymentTransaction_updateStatus
()
self
.
_simulatePaymentTransaction_updateStatus
()
...
@@ -454,7 +447,6 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
...
@@ -454,7 +447,6 @@ portal_workflow.doActionFor(context, action='edit_action', comment='Visited by P
reference
=
"TESTTRANS-%s"
%
new_id
,
reference
=
"TESTTRANS-%s"
%
new_id
,
)
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'started'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'started'
)
self
.
portal
.
portal_workflow
.
_jumpToStateFor
(
transaction
,
'solved'
)
self
.
tic
()
self
.
tic
()
self
.
_simulatePaymentTransaction_updateStatus
()
self
.
_simulatePaymentTransaction_updateStatus
()
...
...
master/bt5/slapos_payzen/bt/revision
View file @
68b0db4c
89
90
\ No newline at end of file
\ 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