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
7ce373bc
Commit
7ce373bc
authored
Apr 10, 2017
by
Rik ter Beek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#104 add to all config retrievals for cronjob payment method and storeId
parent
4ba82195
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
10 deletions
+30
-10
Model/Cron.php
Model/Cron.php
+30
-10
No files found.
Model/Cron.php
View file @
7ce373bc
...
...
@@ -461,7 +461,9 @@ class Cron
// If notification is pending status and pending status is set add the status change to the comment history
if
(
$this
->
_eventCode
==
Notification
::
PENDING
)
{
$pendingStatus
=
$this
->
_getConfigData
(
'pending_status'
,
'adyen_abstract'
,
$this
->
_order
->
getStoreId
());
$pendingStatus
=
$this
->
_getConfigData
(
'pending_status'
,
'adyen_abstract'
,
$this
->
_order
->
getStoreId
()
);
if
(
$pendingStatus
!=
""
)
{
$this
->
_order
->
addStatusHistoryComment
(
$comment
,
$pendingStatus
);
$this
->
_adyenLogger
->
addAdyenNotificationCronjob
(
...
...
@@ -598,7 +600,9 @@ class Cron
*/
protected
function
_holdCancelOrder
(
$ignoreHasInvoice
)
{
$orderStatus
=
$this
->
_getConfigData
(
'payment_cancelled'
,
'adyen_abstract'
,
$this
->
_order
->
getStoreId
());
$orderStatus
=
$this
->
_getConfigData
(
'payment_cancelled'
,
'adyen_abstract'
,
$this
->
_order
->
getStoreId
()
);
// check if order has in invoice only cancel/hold if this is not the case
if
(
$ignoreHasInvoice
||
!
$this
->
_order
->
hasInvoices
())
{
...
...
@@ -988,7 +992,9 @@ class Cron
*/
private
function
_setPrePaymentAuthorized
()
{
$status
=
$this
->
_getConfigData
(
'payment_pre_authorized'
,
'adyen_abstract'
,
$this
->
_order
->
getStoreId
());
$status
=
$this
->
_getConfigData
(
'payment_pre_authorized'
,
'adyen_abstract'
,
$this
->
_order
->
getStoreId
()
);
// only do this if status in configuration is set
if
(
!
empty
(
$status
))
{
...
...
@@ -1084,8 +1090,12 @@ class Cron
{
// validate if payment methods allowes manual capture
if
(
$this
->
_manualCaptureAllowed
())
{
$captureMode
=
trim
(
$this
->
_getConfigData
(
'capture_mode'
,
'adyen_abstract'
,
$this
->
_order
->
getStoreId
()));
$sepaFlow
=
trim
(
$this
->
_getConfigData
(
'sepa_flow'
,
'adyen_abstract'
,
$this
->
_order
->
getStoreId
()));
$captureMode
=
trim
(
$this
->
_getConfigData
(
'capture_mode'
,
'adyen_abstract'
,
$this
->
_order
->
getStoreId
())
);
$sepaFlow
=
trim
(
$this
->
_getConfigData
(
'sepa_flow'
,
'adyen_abstract'
,
$this
->
_order
->
getStoreId
())
);
$_paymentCode
=
$this
->
_paymentMethodCode
();
$captureModeOpenInvoice
=
$this
->
_getConfigData
(
'auto_capture_openinvoice'
,
'adyen_abstract'
,
$this
->
_order
->
getStoreId
()
...
...
@@ -1224,7 +1234,9 @@ class Cron
*/
protected
function
_getFraudManualReviewStatus
()
{
return
$this
->
_getConfigData
(
'fraud_manual_review_status'
,
'adyen_abstract'
,
$this
->
_order
->
getStoreId
());
return
$this
->
_getConfigData
(
'fraud_manual_review_status'
,
'adyen_abstract'
,
$this
->
_order
->
getStoreId
()
);
}
/**
...
...
@@ -1360,12 +1372,16 @@ class Cron
$this
->
_createInvoice
();
}
$status
=
$this
->
_getConfigData
(
'payment_authorized'
,
'adyen_abstract'
,
$this
->
_order
->
getStoreId
());
$status
=
$this
->
_getConfigData
(
'payment_authorized'
,
'adyen_abstract'
,
$this
->
_order
->
getStoreId
()
);
// virtual order can have different status
if
(
$this
->
_order
->
getIsVirtual
())
{
$this
->
_adyenLogger
->
addAdyenNotificationCronjob
(
'Product is a virtual product'
);
$virtualStatus
=
$this
->
_getConfigData
(
'payment_authorized_virtual'
);
$virtualStatus
=
$this
->
_getConfigData
(
'payment_authorized_virtual'
,
'adyen_abstract'
,
$this
->
_order
->
getStoreId
()
);
if
(
$virtualStatus
!=
""
)
{
$status
=
$virtualStatus
;
}
...
...
@@ -1389,11 +1405,15 @@ class Cron
$paidAmount
=
floatval
(
trim
(
$paidAmount
));
if
(
$paidAmount
>
$orginalAmount
)
{
$overpaidStatus
=
$this
->
_getConfigData
(
'order_overpaid_status'
,
'adyen_boleto'
);
$overpaidStatus
=
$this
->
_getConfigData
(
'order_overpaid_status'
,
'adyen_boleto'
,
$this
->
_order
->
getStoreId
()
);
// check if there is selected a status if not fall back to the default
$status
=
(
!
empty
(
$overpaidStatus
))
?
$overpaidStatus
:
$status
;
}
else
{
$underpaidStatus
=
$this
->
_getConfigData
(
'order_underpaid_status'
,
'adyen_boleto'
);
$underpaidStatus
=
$this
->
_getConfigData
(
'order_underpaid_status'
,
'adyen_boleto'
,
$this
->
_order
->
getStoreId
()
);
// check if there is selected a status if not fall back to the default
$status
=
(
!
empty
(
$underpaidStatus
))
?
$underpaidStatus
:
$status
;
}
...
...
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