Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Line Item price changes via plugin are not reflected #7

Open
aladrach opened this issue Mar 17, 2020 · 1 comment
Open

Line Item price changes via plugin are not reflected #7

aladrach opened this issue Mar 17, 2020 · 1 comment

Comments

@aladrach
Copy link

aladrach commented Mar 17, 2020

Changing prices via:
Event::on(LineItems::class, LineItems::EVENT_POPULATE_LINE_ITEM, function(LineItemEvent $e)
show up correctly in the Commerce checkout, but in Apple/Google Pay, the changes are not reflected, and it tries to charge the amount before those changes.

@matt-adigital
Copy link

I've also just encountered this issue. Opened up src/services/StripeService.php on line 157 and changed $item->purchasable->salePrice * $item->qty within the brackets to be $item->subtotal for a quick test and this has fixed the issue.

In my local copy with this edit, the complete version of line 157 now reads as:
$amount = round($item->subtotal * 100);

This has preserved the custom # logic I've used elsewhere. Can this please be implemented in the next release @Tam? Thanks.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants