Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
commerce_datatrans
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
commerce_datatrans
Commits
ab883508
Commit
ab883508
authored
2 months ago
by
Noah Siegrist
Committed by
András Czövek
2 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Automated Project Update Bot fixes from run 11-137198.
parent
a489c330
No related branches found
No related tags found
1 merge request
!8
Automated Project Update Bot fixes from run 11-137198.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
commerce_datatrans.info.yml
+1
-1
1 addition, 1 deletion
commerce_datatrans.info.yml
src/Plugin/Commerce/PaymentGateway/Datatrans.php
+6
-2
6 additions, 2 deletions
src/Plugin/Commerce/PaymentGateway/Datatrans.php
with
7 additions
and
3 deletions
commerce_datatrans.info.yml
+
1
−
1
View file @
ab883508
...
...
@@ -2,6 +2,6 @@ name: Commerce Datatrans
type
:
module
description
:
'
Provides
payment
gateway
for
Datatrans.'
package
:
Commerce
core_version_requirement
:
^
8.7.7 || ^9 || ^10
core_version_requirement
:
^
10.1 || ^11
dependencies
:
-
commerce:commerce_payment
This diff is collapsed.
Click to expand it.
src/Plugin/Commerce/PaymentGateway/Datatrans.php
+
6
−
2
View file @
ab883508
...
...
@@ -7,7 +7,9 @@ use Drupal\commerce_payment\Exception\PaymentGatewayException;
use
Drupal\commerce_payment
\Plugin\Commerce\PaymentGateway\OffsitePaymentGatewayInterface
;
use
Drupal\commerce_payment
\Plugin\Commerce\PaymentGateway\SupportsRefundsInterface
;
use
Drupal\Component\Serialization\Json
;
use
Drupal\Core\Logger\LoggerChannelTrait
;
use
Drupal\Core\Url
;
use
Drupal\Core\Utility\Error
;
use
Symfony\Component\HttpFoundation\Request
;
/**
...
...
@@ -31,11 +33,13 @@ use Symfony\Component\HttpFoundation\Request;
*/
class
Datatrans
extends
DatatransBase
implements
SupportsRefundsInterface
,
OffsitePaymentGatewayInterface
{
use
LoggerChannelTrait
;
/**
* {@inheritdoc}
*/
public
function
onReturn
(
OrderInterface
$order
,
Request
$request
)
{
$transaction_id
=
$request
->
query
->
get
(
'datatransTrxId'
);
$transaction_id
=
$request
->
query
->
get
(
'datatransTrxId'
);
// Check if a payment already exists to avoid an extra API request, then
// the webhook successfully processed this already.
...
...
@@ -56,7 +60,7 @@ class Datatrans extends DatatransBase implements SupportsRefundsInterface, Offsi
throw
$e
;
}
catch
(
\Exception
$e
)
{
\watchdog_exception
(
'commerce_datatrans'
,
$e
);
Error
::
logException
(
$this
->
getLogger
(
'commerce_datatrans'
)
,
$e
);
throw
new
PaymentGatewayException
(
$this
->
t
(
'There was a problem while processing your payment.'
));
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment