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
51dd1bb7
Commit
51dd1bb7
authored
Mar 26, 2024
by
Yvon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try to handle recurring payment notification coz not compliant with payum NotifyController
parent
f2951dcf
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
PaymentController.php
src/Controller/PaymentController.php
+25
-0
No files found.
src/Controller/PaymentController.php
View file @
51dd1bb7
...
...
@@ -144,6 +144,31 @@ class PaymentController extends AbstractController
}
/**
* @param Request $request
* @return Response
* @Route("/payment/notify", name="notify_recurring_payment)
*/
public
function
notifyRecurringPaymentAction
(
Request
$request
)
{
try
{
$token
=
$this
->
payum
->
getHttpRequestVerifier
()
->
verify
(
$request
);
}
catch
(
\Exception
$e
)
{
// Token expired
return
new
Response
(
"Token expired"
);
}
// Get payment
$gateway
=
$this
->
payum
->
getGateway
(
$token
->
getGatewayName
());
$gateway
->
execute
(
$status
=
new
GetHumanStatus
(
$token
));
$payment
=
$status
->
getFirstModel
();
if
(
$payment
->
getIsRecurrent
())
{
$gateway
->
execute
(
new
Notify
(
$token
));
return
new
Response
(
"Execute notify recurring payment"
);
}
return
new
Response
(
"Payment is not marked recurring."
);
}
/**
* Ce contrôleur est sollicité lorsque Payzen renvoie le cotisant sur l'URL de retour.
*
* IMPORTANT : ce contrôleur n'est PAS sollicité directement par Payzen via l'URL de notification.
...
...
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