Conversation
1. create ledger entry 2. run job async to emit the refund on payment gateway
There was a problem hiding this comment.
Pull Request Overview
This PR implements a 2-phase refund flow that separates the immediate refund processing from the payment gateway communication. The refund process now creates a refund request immediately and then queues a job to handle the actual payment gateway refund processing asynchronously.
Key changes:
- Split refund processing into immediate database operations and asynchronous payment gateway processing
- Added new job
ProcessPaymentGatewayRefundJobfor handling payment gateway refunds - Added repository dependency for refund request management
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| app/Services/Model/Imp/SummitOrderService.php | Refactored refund logic to use 2-phase approach and added new method for processing payment gateway refunds |
| app/Services/Model/ISummitOrderService.php | Added interface method for new payment gateway refund processing |
| app/Jobs/ProcessPaymentGatewayRefundJob.php | New job class for asynchronous payment gateway refund processing |
| tests/SummitOrderServiceTest.php | Added mock for new refund request repository dependency |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
* fix: break on 2 phase refund process 1. create ledger entry 2. run job async to emit the refund on payment gateway * chore: fix unit tests * fix: repo typo
ref: https://app.clickup.com/t/86b7095wn