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
4a4f0e48
Commit
4a4f0e48
authored
Jan 16, 2018
by
Rik ter Beek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for klarna_account
parent
80266bd7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
21 deletions
+16
-21
Helper/Data.php
Helper/Data.php
+7
-7
Model/Cron.php
Model/Cron.php
+9
-14
No files found.
Helper/Data.php
View file @
4a4f0e48
...
...
@@ -464,7 +464,7 @@ class Data extends AbstractHelper
{
return
$this
->
getConfigData
(
$field
,
'adyen_apple_pay'
,
$storeId
);
}
/**
* @param null $storeId
* @return mixed
...
...
@@ -849,13 +849,13 @@ class Data extends AbstractHelper
{
if
(
strlen
(
$paymentMethod
)
>=
9
&&
substr
(
$paymentMethod
,
0
,
9
)
==
'afterpay_'
)
{
return
true
;
}
else
{
if
(
$paymentMethod
==
'klarna'
||
$paymentMethod
==
'ratepay'
)
{
return
true
;
}
else
{
return
false
;
}
}
elseif
(
strlen
(
$paymentMethod
)
>=
6
&&
substr
(
$paymentMethod
,
0
,
6
)
==
'klarna'
)
{
return
true
;
}
elseif
(
strlen
(
$paymentMethod
)
>=
7
&&
substr
(
$paymentMethod
,
0
,
7
)
==
'ratepay'
)
{
return
true
;
}
return
false
;
}
public
function
getRatePayId
()
...
...
Model/Cron.php
View file @
4a4f0e48
...
...
@@ -210,7 +210,8 @@ class Cron
\Adyen\Payment\Model\Order\PaymentFactory
$adyenOrderPaymentFactory
,
\Adyen\Payment\Model\Resource\Order\Payment\CollectionFactory
$adyenOrderPaymentCollectionFactory
,
AreaList
$areaList
)
{
)
{
$this
->
_scopeConfig
=
$scopeConfig
;
$this
->
_adyenLogger
=
$adyenLogger
;
$this
->
_notificationFactory
=
$notificationFactory
;
...
...
@@ -235,7 +236,7 @@ class Cron
{
try
{
$this
->
execute
();
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
$this
->
_adyenLogger
->
addAdyenNotificationCronjob
(
$e
->
getMessage
()
.
"
\n
"
.
$e
->
getTraceAsString
());
throw
$e
;
}
...
...
@@ -536,11 +537,7 @@ class Cron
}
// if payment method is klarna, ratepay or openinvoice/afterpay show the reservartion number
if
((
$this
->
_paymentMethod
==
"klarna"
||
$this
->
_paymentMethod
==
"afterpay_default"
||
$this
->
_paymentMethod
==
"openinvoice"
||
$this
->
_paymentMethod
==
"ratepay"
)
&&
(
$this
->
_klarnaReservationNumber
!=
null
&&
$this
->
_klarnaReservationNumber
!=
""
)
)
{
if
(
$this
->
_adyenHelper
->
isPaymentMethodOpenInvoiceMethod
(
$this
->
_paymentMethod
)
&&
!
empty
(
$this
->
_klarnaReservationNumber
))
{
$klarnaReservationNumberText
=
"<br /> reservationNumber: "
.
$this
->
_klarnaReservationNumber
;
}
else
{
$klarnaReservationNumberText
=
""
;
...
...
@@ -1298,6 +1295,11 @@ class Cron
$manualCaptureAllowed
=
null
;
$paymentMethod
=
$this
->
_paymentMethod
;
// For all openinvoice methods manual capture is the default
if
(
$this
->
_adyenHelper
->
isPaymentMethodOpenInvoiceMethod
(
$paymentMethod
))
{
return
true
;
}
switch
(
$paymentMethod
)
{
case
'cup'
:
case
'cartebancaire'
:
...
...
@@ -1314,17 +1316,10 @@ class Cron
case
'jcb'
:
case
'laser'
:
case
'paypal'
:
case
'klarna'
:
case
'afterpay_default'
:
case
'ratepay'
:
case
'sepadirectdebit'
:
$manualCaptureAllowed
=
true
;
break
;
default
:
// To be sure check if it payment method starts with afterpay_ then manualCapture is allowed
if
(
strlen
(
$this
->
_paymentMethod
)
>=
9
&&
substr
(
$this
->
_paymentMethod
,
0
,
9
)
==
"afterpay_"
)
{
$manualCaptureAllowed
=
true
;
}
$manualCaptureAllowed
=
false
;
}
...
...
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