mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 12:25:15 +08:00
Ensure item taxes for pui payment (WIP)
This commit is contained in:
parent
c95b9608d4
commit
28294fa79c
1 changed files with 2 additions and 1 deletions
|
@ -286,6 +286,7 @@ class PayUponInvoiceOrderEndpoint {
|
|||
if($shipping_taxes > 0) {
|
||||
$name = $data['purchase_units'][0]['items'][0]['name'];
|
||||
$category = $data['purchase_units'][0]['items'][0]['category'];
|
||||
$tax_rate = $data['purchase_units'][0]['items'][0]['tax_rate'];
|
||||
|
||||
unset($data['purchase_units'][0]['items']);
|
||||
$data['purchase_units'][0]['items'][0] = array(
|
||||
|
@ -300,7 +301,7 @@ class PayUponInvoiceOrderEndpoint {
|
|||
'currency_code' => 'EUR',
|
||||
'value' => number_format($tax_total + $shipping_taxes, 2, '.', ''),
|
||||
),
|
||||
'tax_rate' => '19',
|
||||
'tax_rate' => $tax_rate,
|
||||
);
|
||||
|
||||
$data['purchase_units'][0]['amount']['value'] = number_format($total + $shipping + $shipping_taxes, 2, '.', '');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue