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
fd0f6d90
Commit
fd0f6d90
authored
Nov 19, 2024
by
Yvon Kerdoncuff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaning
parent
3e5789d7
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
69 deletions
+7
-69
PaymentController.php
src/Controller/PaymentController.php
+1
-7
Payment.php
src/Entity/Payment.php
+0
-20
Version20240930144459.php
src/Migrations/Version20240930144459.php
+0
-31
Version20241119090231.php
src/Migrations/Version20241119090231.php
+5
-3
PaymentRepository.php
src/Repository/PaymentRepository.php
+1
-8
No files found.
src/Controller/PaymentController.php
View file @
fd0f6d90
...
...
@@ -145,16 +145,10 @@ class PaymentController extends AbstractController
$captureToken
->
setTargetUrl
(
$targetUrl
);
$captureToken
->
setAfterUrl
(
$afterUrl
);
$targetUrl
=
$captureToken
->
getTargetUrl
();
/* @var Payment $payment */
if
(
!
$payment
->
getPayzenStartingPaymentUrl
())
{
$payment
->
setPayzenStartingPaymentUrl
(
$targetUrl
);
}
$this
->
em
->
persist
(
$captureToken
);
$this
->
em
->
flush
();
return
$this
->
redirect
(
$
targetUrl
);
return
$this
->
redirect
(
$
captureToken
->
getTargetUrl
()
);
}
/* COMMENT LES FLUX SONT-ILS CREES SUITE A LA CREATION D'UN PAIEMENT PAYZEN ?
...
...
src/Entity/Payment.php
View file @
fd0f6d90
...
...
@@ -82,14 +82,6 @@ class Payment extends BasePayment
/**
* @var string|null
* Payzen payment page requested when payment starts
*
* @ORM\Column(type="text", nullable=true)
*/
protected
$payzenStartingPaymentUrl
;
/**
* @var string|null
*
* @ORM\Column(type="string", length=50, nullable=true)
*/
...
...
@@ -210,18 +202,6 @@ class Payment extends BasePayment
return
$this
;
}
public
function
getPayzenStartingPaymentUrl
()
:
?
string
{
return
$this
->
payzenStartingPaymentUrl
;
}
public
function
setPayzenStartingPaymentUrl
(
?
string
$payzenStartingPaymentUrl
)
:
self
{
$this
->
payzenStartingPaymentUrl
=
$payzenStartingPaymentUrl
;
return
$this
;
}
/**
* @return string
*/
...
...
src/Migrations/Version20240930144459.php
deleted
100644 → 0
View file @
3e5789d7
<?php
declare
(
strict_types
=
1
);
namespace
DoctrineMigrations
;
use
Doctrine\DBAL\Schema\Schema
;
use
Doctrine\Migrations\AbstractMigration
;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final
class
Version20240930144459
extends
AbstractMigration
{
public
function
getDescription
()
:
string
{
return
''
;
}
public
function
up
(
Schema
$schema
)
:
void
{
// this up() migration is auto-generated, please modify it to your needs
$this
->
addSql
(
'ALTER TABLE payment ADD payzen_starting_payment_url LONGTEXT DEFAULT NULL, ADD starting_payment_analysis_status VARCHAR(50) DEFAULT NULL'
);
}
public
function
down
(
Schema
$schema
)
:
void
{
// this down() migration is auto-generated, please modify it to your needs
$this
->
addSql
(
'ALTER TABLE payment DROP payzen_starting_payment_url, DROP starting_payment_analysis_status'
);
}
}
src/Migrations/Version20241
007081547
.php
→
src/Migrations/Version20241
119090231
.php
View file @
fd0f6d90
...
...
@@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final
class
Version20241
007081547
extends
AbstractMigration
final
class
Version20241
119090231
extends
AbstractMigration
{
public
function
getDescription
()
:
string
{
...
...
@@ -20,12 +20,14 @@ final class Version20241007081547 extends AbstractMigration
public
function
up
(
Schema
$schema
)
:
void
{
// this up() migration is auto-generated, please modify it to your needs
$this
->
addSql
(
'ALTER TABLE payment ADD created_at DATETIME DEFAULT NULL'
);
$this
->
addSql
(
'ALTER TABLE payment ADD starting_payment_analysis_status VARCHAR(50) DEFAULT NULL, ADD created_at DATETIME DEFAULT NULL'
);
$this
->
addSql
(
'ALTER TABLE prestataire CHANGE iban iban LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:personal_data)\''
);
}
public
function
down
(
Schema
$schema
)
:
void
{
// this down() migration is auto-generated, please modify it to your needs
$this
->
addSql
(
'ALTER TABLE payment DROP created_at'
);
$this
->
addSql
(
'ALTER TABLE payment DROP starting_payment_analysis_status, DROP created_at'
);
$this
->
addSql
(
'ALTER TABLE prestataire CHANGE iban iban LONGTEXT CHARACTER SET utf8mb3 DEFAULT NULL COLLATE `utf8mb3_general_ci` COMMENT \'(DC2Type:personal_data)\''
);
}
}
src/Repository/PaymentRepository.php
View file @
fd0f6d90
...
...
@@ -51,8 +51,7 @@ class PaymentRepository extends ServiceEntityRepository
*/
public
function
findValidStartingPayment
(
$clientEmail
)
{
//At first, this method was created to return the url of an existing starting payment.
//As we don't know how to use this url to redirect the user to the existing payment page,
//Remark : we don't know how to redirect the user to the existing payment page,
//we simply return the datetime when the payment will be expired.
$candidates
=
$this
->
findBy
([
'clientEmail'
=>
$clientEmail
,
...
...
@@ -64,12 +63,6 @@ class PaymentRepository extends ServiceEntityRepository
$p
->
setStartingPaymentAnalysisStatus
(
'NOT CONCERNED'
);
continue
;
}
/* @var Payment $p */
$url
=
$p
->
getPayzenStartingPaymentUrl
();
if
(
!
$url
)
{
$p
->
setStartingPaymentAnalysisStatus
(
'NO URL'
);
continue
;
}
$createdAt
=
clone
$p
->
getCreatedAt
();
//don't modify original object
$timeout
=
$createdAt
->
add
(
\DateInterval
::
createFromDateString
(
"10 minutes"
));
if
(
$timeout
<
new
\DateTime
())
{
...
...
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