Skip to content

Stripe (and some other providers) partial refund sets status to refunded after first partial refund #475

@YounesOMK

Description

@YounesOMK

ive been testing the Stripe provider these past days because i'm planning to use it in production, and i noticed something that i'm not sure if it is intended. the thing is when a partial refund is done, the payment status gets set to REFUNDED right away.
The problem is that after this first partial refund, doing another partial refund looks impossible, because BasePayment.refund() only allows refunds while the payment is still CONFIRMED.

So the flow becomes something like:

  • payment starts as CONFIRMED
  • first partial refund works
  • status becomes REFUNDED
  • second partial refund can't be done anymore, even if there is still some amount left to refund

maybe the status must stay CONFIRMED after a partial refund, and only become REFUNDED once the remaining captured_amount reaches 0 (which is already handeled by BasePayment.refund())

I did notice a few other providers seem to do something similar too, but im opening this for Stripe because that's the one i'm testing right now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions