Open bellu opened 1 year ago
Hey thanks for reporting this bug. Currently we haven't looked into supporting the paypal plugin of Sylius explicitly and I have no idea where Sylius is taking the individual prices from. We are using the adjustment mechanic of Sylius, which means that it should just add the customer option prices to the total before submitting them to paypal.
From the response debug output I take is that Sylius is trying to add all of those
"discount": "0.00"
"item_total": "68.00"
"shipping": "10.00"
"tax_total": "0.00"
Which is not the same as
{
"currency_code": "EUR",
"value": "88.00"
}
It looks like the item total of the order is missing the customer options. As I said I don't know how the paypal plugin works.
However it looks like you might need to add a functions to your OrderItem
class:
/**
* Overriding sylius' total calculation to also take customer options into account.
*/
public function getSubtotal(): int
{
return parent::getSubtotal() + $this->getAdjustmentsTotalRecursively(CustomerOptionRecalculator::CUSTOMER_OPTION_ADJUSTMENT);
}
I hope this helps other than that, you'd have to see if there is anything you can do to fix the prices when exporting them to paypal.
Hi,
i'm using a fixed amount price for some of my product's customization, but the paypal checkout it's not working anymore. I think it's because of the price on the custom option, i'm having an amount mismatch. I'm using the version 2.16.1.
Attached the paypal log: