Skip to content

Commit

Permalink
Use line item price rather than purchasable
Browse files Browse the repository at this point in the history
Fixes #27
  • Loading branch information
Tam committed Feb 3, 2022
1 parent 7e78058 commit 4789228
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.9.2 - 2022-02-03
### Fixed
- Use line item price rather than purchasable (Fixes #27)

## 1.0.9 - 2021-10-13
### Added
- Add support for Guzzle 7
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ether/web-payments",
"description": "Use the Web Payments API and Google / Apply Pay to vastly improve your checkout process!",
"version": "1.0.9.1",
"version": "1.0.9.2",
"type": "craft-plugin",
"keywords": [
"payments",
Expand Down
2 changes: 1 addition & 1 deletion src/services/StripeService.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public function orderToPaymentRequest (Order $order, $includeItems = false)

foreach ($order->lineItems as $item)
{
$amount = round($item->purchasable->salePrice * $item->qty * 100);
$amount = round($item->salePrice * $item->qty * 100);

$items[] = [
'id' => $item->purchasableId,
Expand Down

0 comments on commit 4789228

Please sign in to comment.