Add Docker configuration and enhance payment verification - #1
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f30c49688d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if payment_session and verified_data: | ||
| payment_status_value = verified_data.get('status') | ||
| if payment_status_value == 'success': | ||
| payment_session.status = PaymentSession.STATUS_COMPLETED | ||
| payment_session.paystack_reference = reference | ||
| payment_session.save(update_fields=['status', 'paystack_reference', 'updated_at']) |
There was a problem hiding this comment.
Bind Paystack verification to the requested session
When payment_status is called with an existing session_id, the newly fetched Paystack verified_data is applied without checking that the verified transaction belongs to that session, such as by matching metadata.session_id or the stored paystack_reference. Because this endpoint is AllowAny and session ids are embedded in QR/payment links, anyone with a successful Paystack reference can mark a different pending session completed and credit the wrong transaction.
Useful? React with 👍 / 👎.
| elif payment_status_value in ('failed', 'abandoned'): | ||
| payment_session.status = PaymentSession.STATUS_FAILED | ||
| payment_session.paystack_reference = reference | ||
| payment_session.save(update_fields=['status', 'paystack_reference', 'updated_at']) |
There was a problem hiding this comment.
Mirror failed callback status onto Transaction
When Paystack verification returns failed or abandoned through the browser callback, this updates only PaymentSession; in the local/Docker or webhook-outage scenario this path is meant to handle, the matching vendors.Transaction remains pending. The dashboard and stats are backed by Transaction.status, so vendors will continue seeing failed payments as pending unless a webhook later arrives.
Useful? React with 👍 / 👎.
No description provided.