Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos-tav
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
agplv3
kohinos-tav
Commits
9186ba4b
Commit
9186ba4b
authored
Oct 07, 2024
by
Yvon Kerdoncuff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
take into account payment lines with status new or null
parent
0f70de63
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
PaymentRepository.php
src/Repository/PaymentRepository.php
+7
-1
No files found.
src/Repository/PaymentRepository.php
View file @
9186ba4b
...
...
@@ -5,6 +5,7 @@ namespace App\Repository;
use
App\Entity\Payment
;
use
Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository
;
use
Doctrine\Persistence\ManagerRegistry
;
use
Payum\Core\Request\GetHumanStatus
;
use
Symfony\Component\HttpClient\HttpClient
;
/**
...
...
@@ -53,11 +54,14 @@ class PaymentRepository extends ServiceEntityRepository
{
$candidates
=
$this
->
findBy
([
'clientEmail'
=>
$clientEmail
,
'status'
=>
null
,
'startingPaymentAnalysisStatus'
=>
null
,
]);
foreach
(
$candidates
as
$p
)
{
if
(
!
in_array
(
$p
->
getStatus
(),[
null
,
GetHumanStatus
::
STATUS_NEW
]))
{
$p
->
setStartingPaymentAnalysisStatus
(
'NOT CONCERNED'
);
continue
;
}
/* @var Payment $p */
$url
=
$p
->
getPayzenStartingPaymentUrl
();
if
(
!
$url
)
{
...
...
@@ -69,6 +73,8 @@ class PaymentRepository extends ServiceEntityRepository
if
(
$timeout
<
new
\DateTime
())
{
$p
->
setStartingPaymentAnalysisStatus
(
'TIMEOUT'
);
}
else
{
var_dump
(
"OK RETURNING URL !"
);
die
;
return
$url
;
}
}
...
...
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