Skip to content

Conversation

@smarcet
Copy link
Collaborator

@smarcet smarcet commented Oct 9, 2025

1. create ledger entry
2. run job async to emit the refund on payment gateway
@smarcet smarcet requested a review from Copilot October 9, 2025 13:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ProcessPaymentGatewayRefundJob for 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.

@smarcet smarcet requested a review from Copilot October 9, 2025 13:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@smarcet smarcet merged commit 57298dc into main Oct 9, 2025
3 checks passed
smarcet added a commit that referenced this pull request Oct 9, 2025
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants