Sylius: [PayumBundle] Wrong capture total amount, when partial payment is used

Created on 12 Nov 2017  Â·  5Comments  Â·  Source: Sylius/Sylius

| Q | A
| ---------------- | -----
| Bug report? | yes
| Feature request? | no
| BC Break report? | no
| RFC? | yes
| Sylius version | master

Issue is that CaptureAction assumes, that payment covers order fully, which isn't the case by design as partial payments are supported.

Consequently I've encountered this issue on custom partial payment flow, so I would think it's not reproducible with vanilla Sylius.

---             $totalAmount = $order->getTotal();
+++             $totalAmount = $payment->getAmount();
                $payumPayment = new PayumPayment();
                $payumPayment->setNumber($order->getNumber());

https://github.com/Sylius/Sylius/blob/master/src/Sylius/Bundle/PayumBundle/Action/CapturePaymentAction.php#L63

Same for description provider.
https://github.com/Sylius/Sylius/blob/master/src/Sylius/Bundle/PayumBundle/Provider/PaymentDescriptionProvider.php

Should I do PR?

Regards.

Potential Bug

Most helpful comment

Hey! This is still an issue. Would a PR still be applicable? If so, I could handle it.

All 5 comments

@diimpp Thanks for reporting, I think you are correct. PR would be more than welcome! :)

Hey! This is still an issue. Would a PR still be applicable? If so, I could handle it.

Hey Leopold, PR should be still applicable and welcomed :) Feel free to open it.

Fixed by #10613.

Wrong payment amount when paying the remaining payment and cancel it.
The new payment record generated with order total as the amount.

Also, when using the refund plugin, the remaining payment amount should be:
order total - paid total + refunded total

Was this page helpful?
0 / 5 - 0 ratings

Related issues

reyostallenberg picture reyostallenberg  Â·  3Comments

eb22fbb4 picture eb22fbb4  Â·  3Comments

loic425 picture loic425  Â·  3Comments

loic425 picture loic425  Â·  3Comments

javiereguiluz picture javiereguiluz  Â·  3Comments