Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Commit

Permalink
Use new methods to set product unit price and total excluding tax.
Browse files Browse the repository at this point in the history
  • Loading branch information
rvdsteege committed Oct 16, 2018
1 parent ea403f1 commit d4a7243
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,10 @@ public function start( Payment $payment ) {
$x = 1;

foreach ( $lines as $line ) {
$net_price = ( null === $line->get_unit_price() ) ? null : $line->get_unit_price()->get_cents();
$net_price = ( null === $line->get_unit_price_excluding_tax() ) ? null : $line->get_unit_price_excluding_tax()->get_cents();
$total = ( null === $line->get_total_amount() ) ? null : $line->get_total_amount()->get_cents();
$net_total = ( null === $line->get_total_amount_excluding_tax() ) ? null : $line->get_total_amount_excluding_tax()->get_cents();
$tax = ( null === $line->get_tax_amount() ) ? null : $line->get_tax_amount()->get_cents();
$net_total = ( $total - $tax );

$product_id = $line->get_id();

Expand Down

0 comments on commit d4a7243

Please sign in to comment.