Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Adyen Magento2
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
Shared Libs
Adyen Magento2
Commits
51c99e26
Commit
51c99e26
authored
Jan 12, 2018
by
basm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PayPal capture mode
parent
ccbd5337
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
Model/Cron.php
Model/Cron.php
+13
-9
No files found.
Model/Cron.php
View file @
51c99e26
...
@@ -210,7 +210,8 @@ class Cron
...
@@ -210,7 +210,8 @@ class Cron
\Adyen\Payment\Model\Order\PaymentFactory
$adyenOrderPaymentFactory
,
\Adyen\Payment\Model\Order\PaymentFactory
$adyenOrderPaymentFactory
,
\Adyen\Payment\Model\Resource\Order\Payment\CollectionFactory
$adyenOrderPaymentCollectionFactory
,
\Adyen\Payment\Model\Resource\Order\Payment\CollectionFactory
$adyenOrderPaymentCollectionFactory
,
AreaList
$areaList
AreaList
$areaList
)
{
)
{
$this
->
_scopeConfig
=
$scopeConfig
;
$this
->
_scopeConfig
=
$scopeConfig
;
$this
->
_adyenLogger
=
$adyenLogger
;
$this
->
_adyenLogger
=
$adyenLogger
;
$this
->
_notificationFactory
=
$notificationFactory
;
$this
->
_notificationFactory
=
$notificationFactory
;
...
@@ -235,7 +236,7 @@ class Cron
...
@@ -235,7 +236,7 @@ class Cron
{
{
try
{
try
{
$this
->
execute
();
$this
->
execute
();
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
$this
->
_adyenLogger
->
addAdyenNotificationCronjob
(
$e
->
getMessage
()
.
"
\n
"
.
$e
->
getTraceAsString
());
$this
->
_adyenLogger
->
addAdyenNotificationCronjob
(
$e
->
getMessage
()
.
"
\n
"
.
$e
->
getTraceAsString
());
throw
$e
;
throw
$e
;
}
}
...
@@ -1248,18 +1249,19 @@ class Cron
...
@@ -1248,18 +1249,19 @@ class Cron
);
);
return
true
;
return
true
;
}
}
// if PayPal capture modues is different from the default use this one
// if PayPal capture modues is different from the default use this one
if
(
strcmp
(
$this
->
_paymentMethod
,
'paypal'
)
===
0
&&
$captureModePayPal
!=
""
)
{
if
(
strcmp
(
$this
->
_paymentMethod
,
'paypal'
)
===
0
)
{
if
(
strcmp
(
$captureModePayPal
,
'auto'
)
===
0
)
{
if
(
$captureModePayPal
)
{
$this
->
_adyenLogger
->
addAdyenNotificationCronjob
(
'This payment method is paypal and configured to work as auto capture'
);
return
true
;
}
elseif
(
strcmp
(
$captureModePayPal
,
'manual'
)
===
0
)
{
$this
->
_adyenLogger
->
addAdyenNotificationCronjob
(
$this
->
_adyenLogger
->
addAdyenNotificationCronjob
(
'This payment method is paypal and configured to work as manual capture'
'This payment method is paypal and configured to work as manual capture'
);
);
return
false
;
return
false
;
}
else
{
$this
->
_adyenLogger
->
addAdyenNotificationCronjob
(
'This payment method is paypal and configured to work as auto capture'
);
return
true
;
}
}
}
}
if
(
strcmp
(
$captureMode
,
'manual'
)
===
0
)
{
if
(
strcmp
(
$captureMode
,
'manual'
)
===
0
)
{
...
@@ -1609,4 +1611,6 @@ class Cron
...
@@ -1609,4 +1611,6 @@ class Cron
$path
=
'payment/'
.
$paymentMethodCode
.
'/'
.
$field
;
$path
=
'payment/'
.
$paymentMethodCode
.
'/'
.
$field
;
return
$this
->
_scopeConfig
->
getValue
(
$path
,
\Magento\Store\Model\ScopeInterface
::
SCOPE_STORE
,
$storeId
);
return
$this
->
_scopeConfig
->
getValue
(
$path
,
\Magento\Store\Model\ScopeInterface
::
SCOPE_STORE
,
$storeId
);
}
}
}
}
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