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
We will be off on April 7th (Monday) for public holiday in our country
Open sidebar
Shared Libs
Adyen Magento2
Commits
9b182736
Commit
9b182736
authored
9 years ago
by
rikterbeek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove old magetno 1.x code
parent
deac145c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
8 deletions
+23
-8
app/code/Adyen/Payment/Controller/Process/Result.php
app/code/Adyen/Payment/Controller/Process/Result.php
+1
-3
app/code/Adyen/Payment/Model/Cron.php
app/code/Adyen/Payment/Model/Cron.php
+13
-3
app/code/Adyen/Payment/Model/Method/Cc.php
app/code/Adyen/Payment/Model/Method/Cc.php
+9
-2
No files found.
app/code/Adyen/Payment/Controller/Process/Result.php
View file @
9b182736
...
...
@@ -147,9 +147,7 @@ class Result extends \Magento\Framework\App\Action\Action
throw
new
\Magento\Framework\Exception\LocalizedException
(
__
(
'Order does not exists with increment_id: %s1'
,
$incrementId
));
}
}
else
{
Mage
::
throwException
(
Mage
::
helper
(
'adyen'
)
->
__
(
'Empty merchantReference'
)
);
throw
new
\Magento\Framework\Exception\LocalizedException
(
__
(
'Empty merchantReference'
));
}
return
$result
;
}
...
...
This diff is collapsed.
Click to expand it.
app/code/Adyen/Payment/Model/Cron.php
View file @
9b182736
...
...
@@ -64,6 +64,11 @@ class Cron
*/
protected
$_orderSender
;
/**
* @var \Magento\Framework\DB\TransactionFactory
*/
protected
$_transactionFactory
;
// notification attributes
protected
$_pspReference
;
...
...
@@ -99,7 +104,8 @@ class Cron
\Magento\Framework\Stdlib\DateTime
$dateTime
,
\Magento\Framework\Stdlib\DateTime\TimezoneInterface
$localeDate
,
\Adyen\Payment\Helper\Data
$adyenHelper
,
OrderSender
$orderSender
OrderSender
$orderSender
,
\Magento\Framework\DB\TransactionFactory
$transactionFactory
)
{
$this
->
_scopeConfig
=
$scopeConfig
;
...
...
@@ -110,6 +116,7 @@ class Cron
$this
->
_localeDate
=
$localeDate
;
$this
->
_adyenHelper
=
$adyenHelper
;
$this
->
_orderSender
=
$orderSender
;
$this
->
_transactionFactory
=
$transactionFactory
;
}
...
...
@@ -907,10 +914,13 @@ class Cron
$shipment
->
getOrder
()
->
setIsInProcess
(
true
);
$comment
=
__
(
'Shipment created by Adyen'
);
$shipment
->
addComment
(
$comment
);
Mage
::
getModel
(
'core/resource_transaction'
)
->
addObject
(
$shipment
)
/** @var \Magento\Framework\DB\Transaction $transaction */
$transaction
=
$this
->
_transactionFactory
->
create
();
$transaction
->
addObject
(
$shipment
)
->
addObject
(
$shipment
->
getOrder
())
->
save
();
$this
->
_debugData
[
'_createShipment done'
]
=
'Order is shipped'
;
}
}
else
{
...
...
This diff is collapsed.
Click to expand it.
app/code/Adyen/Payment/Model/Method/Cc.php
View file @
9b182736
...
...
@@ -136,7 +136,14 @@ class Cc extends \Magento\Payment\Model\Method\Cc
{
parent
::
assignData
(
$data
);
$infoInstance
=
$this
->
getInfoInstance
();
$infoInstance
->
setAdditionalInformation
(
'encrypted_data'
,
$data
[
'encrypted_data'
]);
$this
->
_adyenLogger
if
(
isset
(
$data
[
'encrypted_data'
]))
{
$infoInstance
->
setAdditionalInformation
(
'encrypted_data'
,
$data
[
'encrypted_data'
]);
}
$this
->
_adyenLogger
->
info
(
"CSE key is set"
);
return
$this
;
}
...
...
@@ -236,7 +243,7 @@ class Cc extends \Magento\Payment\Model\Method\Cc
break
;
}
}
else
{
$errorMsg
=
Mage
::
helper
(
'adyen'
)
->
__
(
'The payment is REFUSED by Adyen.'
);
$errorMsg
=
__
(
'The payment is REFUSED by Adyen.'
);
}
if
(
$errorMsg
)
{
...
...
This diff is collapsed.
Click to expand it.
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