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
ab470b0d
Commit
ab470b0d
authored
Jun 29, 2016
by
Rik ter Beek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
catch exception and throw nice error to shopper
parent
b56c3bc3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
Model/Method/Boleto.php
Model/Method/Boleto.php
+7
-1
Model/Method/Sepa.php
Model/Method/Sepa.php
+7
-1
No files found.
Model/Method/Boleto.php
View file @
ab470b0d
...
...
@@ -208,7 +208,13 @@ class Boleto extends \Magento\Payment\Model\Method\AbstractMethod
{
switch
(
$request
)
{
case
"authorise"
:
$response
=
$this
->
_paymentRequest
->
fullApiRequest
(
$payment
,
$this
->
_code
);
try
{
$response
=
$this
->
_paymentRequest
->
fullApiRequest
(
$payment
,
$this
->
_code
);
}
catch
(
\Adyen\AdyenException
$e
)
{
$errorMsg
=
__
(
'Error with payment method please select different payment method.'
);
$this
->
_logger
->
critical
(
$e
->
getMessage
());
throw
new
\Magento\Framework\Exception\LocalizedException
(
__
(
$errorMsg
));
}
break
;
}
...
...
Model/Method/Sepa.php
View file @
ab470b0d
...
...
@@ -278,7 +278,13 @@ class Sepa extends \Magento\Payment\Model\Method\AbstractMethod
{
switch
(
$request
)
{
case
"authorise"
:
$response
=
$this
->
_paymentRequest
->
fullApiRequest
(
$payment
,
$this
->
_code
);
try
{
$response
=
$this
->
_paymentRequest
->
fullApiRequest
(
$payment
,
$this
->
_code
);
}
catch
(
\Adyen\AdyenException
$e
)
{
$errorMsg
=
__
(
'Error with payment method please select different payment method.'
);
$this
->
_logger
->
critical
(
$e
->
getMessage
());
throw
new
\Magento\Framework\Exception\LocalizedException
(
__
(
$errorMsg
));
}
break
;
}
...
...
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