feat: add verify-return landing page for payment provider redirects [FE-103] - #1743
Merged
yusuftomilola merged 2 commits intoAug 30, 2026
Merged
Conversation
…FE-103] Builds the return-redirect landing page that payment providers send the user back to after a 3DS / hosted-checkout session. Key behaviours: - Reads paymentId (also payment_id) from the provider-appended query string - Calls POST /payments/:id/verify-return (the synchronous fast path) immediately on mount - If verify-return resolves within 5 s and the payment is terminal, shows a success card and auto-redirects to /payments/:id - If verify-return times out (webhook not yet received) or returns a non-terminal status, transparently falls back to polling GET /payments/:id every 3 s for up to 60 s, matching the backend's documented fallback behaviour - Progress bar shows polling progress visually - Handles all edge cases: missing paymentId, unauthenticated, hard API error, polling timeout - Cleanup on unmount prevents state updates after navigation Closes DistinctCodes#1632
|
Someone is attempting to deploy a commit to the naijabuz's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@SharifIbrahimDev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
yusuftomilola
approved these changes
Aug 30, 2026
yusuftomilola
left a comment
Collaborator
There was a problem hiding this comment.
No merge conflicts with main. Good addition of the verify-return landing page for payment provider redirects (FE-103) - approving.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the return-redirect landing page required by issue #1632 (
[FE-103]).Problem
POST /payments/:id/verify-returnimplements a documented "synchronous fast path" for a payment provider's return redirect, but no frontend page ever calls it — there is nowhere for a provider to send the user back to.Solution
Creates
frontend/app/payments/return/page.tsxat the route/payments/return.Flow:
/payments/return?paymentId=<id>after checkout.POST /payments/:id/verify-return(fast path)./payments/:idafter 3 s.GET /payments/:idevery 3 s for up to ~60 s — matching the backend's own documented fallback behaviour.Edge cases handled:
paymentIdin query stringpaymentIdandpayment_idquery param spellings acceptedFiles changed
frontend/app/payments/return/page.tsx(new)Testing
The page can be tested by navigating to
/payments/return?paymentId=<valid-id>while authenticated.Closes #1632