Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iyzipay
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
iyzipay
Commits
7edf7d53
Commit
7edf7d53
authored
1 year ago
by
Tolga Özses
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3324439
by hasankeyifsiz: You have requested a non-existing service
parent
27b2c1cd
No related branches found
No related tags found
1 merge request
!4
Issue #3262977: You get an error when you have more than one payment methods...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Controller/RedirectController.php
+4
-8
4 additions, 8 deletions
src/Controller/RedirectController.php
with
4 additions
and
8 deletions
src/Controller/RedirectController.php
+
4
−
8
View file @
7edf7d53
...
...
@@ -4,7 +4,6 @@ namespace Drupal\iyzipay\Controller;
use
Drupal\Core\Controller\ControllerBase
;
use
Drupal\Core\Entity\EntityTypeManager
;
use
Drupal\Core\Entity\Query\QueryFactory
;
use
Drupal\Core\Messenger\MessengerInterface
;
use
Drupal\Core\Routing\TrustedRedirectResponse
;
use
Symfony\Component\DependencyInjection\ContainerInterface
;
...
...
@@ -24,15 +23,13 @@ class RedirectController extends ControllerBase {
*
* @var Drupal\Core\Entity\Query\QueryFactory
*/
protected
$entityQuery
;
protected
$entityTypeManager
;
protected
$messenger
;
/**
* Dependency injection for entity
query and entity
type manager.
* Dependency injection for entity type manager.
*/
public
function
__construct
(
QueryFactory
$entityQuery
,
EntityTypeManager
$entityTypeManager
,
MessengerInterface
$messenger
)
{
$this
->
entityQuery
=
$entityQuery
;
public
function
__construct
(
EntityTypeManager
$entityTypeManager
,
MessengerInterface
$messenger
)
{
$this
->
entityTypeManager
=
$entityTypeManager
;
$this
->
messenger
=
$messenger
;
}
...
...
@@ -42,7 +39,6 @@ class RedirectController extends ControllerBase {
*/
public
static
function
create
(
ContainerInterface
$container
)
{
return
new
static
(
$container
->
get
(
'entity.query'
),
$container
->
get
(
'entity_type.manager'
),
$container
->
get
(
'messenger'
)
);
...
...
@@ -60,7 +56,7 @@ class RedirectController extends ControllerBase {
$conversationId
=
$request
->
request
->
get
(
'conversationId'
);
$mdStatus
=
$request
->
request
->
get
(
'mdStatus'
);
$query
=
$this
->
entity
Qu
er
y
->
get
(
'commerce_payment'
);
$query
=
$this
->
entity
TypeManag
er
->
get
Storage
(
'commerce_payment'
)
->
getQuery
()
;
$query
->
condition
(
'order_id'
,
$conversationId
);
$query
->
condition
(
'payment_gateway'
,
'iyzipay'
);
$payment_ids
=
$query
->
execute
();
...
...
@@ -104,7 +100,7 @@ class RedirectController extends ControllerBase {
$message
=
$this
->
t
(
"Your transaction is successful!"
);
$message
=
""
;
$message_status
=
"success"
;
$query
=
$this
->
entity
Qu
er
y
->
get
(
'commerce_
order'
);
$query
=
$this
->
entity
TypeManag
er
->
get
Storage
(
'commerce_
payment'
)
->
getQuery
(
);
$query
->
condition
(
'order_id'
,
$conversationId
);
if
(
\Drupal
::
currentUser
()
->
isAnonymous
())
{
...
...
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