Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
commerce_2c2p
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_2c2p
Commits
e0319921
Commit
e0319921
authored
6 months ago
by
jose
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3343420
by Redwan Jamous: Always respond to 2c2p notification request
parent
a28a860d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Plugin/Commerce/PaymentGateway/OffsiteRedirect2C2P.php
+2
-2
2 additions, 2 deletions
src/Plugin/Commerce/PaymentGateway/OffsiteRedirect2C2P.php
with
2 additions
and
2 deletions
src/Plugin/Commerce/PaymentGateway/OffsiteRedirect2C2P.php
+
2
−
2
View file @
e0319921
...
...
@@ -227,7 +227,7 @@ class OffsiteRedirect2C2P extends OffsitePaymentGatewayBase {
$this
->
getLogger
(
'commerce_2c2p'
)
->
error
(
'Invalid order ID from gateway: @reference'
,
[
'@reference'
=>
$pt_res_payload
->
invoiceNo
]);
throw
new
PaymentGatewayException
(
'Invalid order ID from gateway.'
);
}
if
(
$pt_res_payload
->
respCode
===
"0000"
)
{
if
(
$pt_res_payload
->
respCode
===
"0000"
&&
$order
->
getState
()
->
getId
()
!==
'completed'
)
{
// Trigger payment success event.
$event
=
new
PaymentSuccessEvent
(
$pt_res_payload
,
$order
);
$this
->
eventDispatcher
->
dispatch
(
$event
,
Commerce2C2PPaymentEvents
::
PAYMENT_SUCCESS
);
...
...
@@ -246,7 +246,7 @@ class OffsiteRedirect2C2P extends OffsitePaymentGatewayBase {
throw
new
PaymentGatewayException
(
'Payment failed.'
);
}
}
catch
(
\UnexpectedValueException
$e
)
{
catch
(
\UnexpectedValueException
|
PaymentGatewayException
)
{
return
new
Response
(
''
,
200
);
}
}
...
...
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