Trigger "partially_refund" order payment transition on each partial refund
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 73
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
According to code lines below, "partially_refund" transition is not triggered on order payment state if that state is already on "partially_refund".
I think it's a mistake.
sylius_order_payment state machine allow transition from "partially_refund" to "partially_refund". So why not playing transition on a new partial refund ?
Rather than checking current order payment state, you should use if( $stateMachine->can( OrderPaymentTransitions::TRANSITION_PARTIALLY_REFUND ) ) before applying.
What do you think about ?
Thanks a lot ;-)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/StateResolver/OrderPartiallyRefundedStateResolver.php lines 50-56 and inspect how the order payment state is checked before applying the transition. Confirm that a new partial refund triggers the partially_refund transition when the state machine permits it, including when the current state is already partially_refund.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- payments
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100