From da8239c44cded59d5398f75f3c1fbb9c88de6b58 Mon Sep 17 00:00:00 2001 From: kcppdevelopers Date: Tue, 19 Jun 2018 15:24:48 +0530 Subject: [PATCH] compatibility: woocommerce deposits, PFW-46 --- ...-gateway-paypal-express-request-angelleye.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/angelleye-includes/express-checkout/class-wc-gateway-paypal-express-request-angelleye.php b/angelleye-includes/express-checkout/class-wc-gateway-paypal-express-request-angelleye.php index 8119d98e1..9e5bf4076 100644 --- a/angelleye-includes/express-checkout/class-wc-gateway-paypal-express-request-angelleye.php +++ b/angelleye-includes/express-checkout/class-wc-gateway-paypal-express-request-angelleye.php @@ -783,14 +783,16 @@ public function angelleye_set_express_checkout_request() { $Payment['shiptozip'] = $shipping_postcode; $Payment['shiptocountrycode'] = $shipping_country; } - if ($this->gateway->send_items) { - $Payment['order_items'] = $this->cart_param['order_items']; - } else { - $Payment['order_items'] = array(); + if(!empty($this->cart_param['is_calculation_mismatch']) && $this->cart_param['is_calculation_mismatch'] == false) { + if ($this->gateway->send_items) { + $Payment['order_items'] = $this->cart_param['order_items']; + } else { + $Payment['order_items'] = array(); + } + $Payment['taxamt'] = $this->cart_param['taxamt']; + $Payment['shippingamt'] = $this->cart_param['shippingamt']; + $Payment['itemamt'] = $this->cart_param['itemamt']; } - $Payment['taxamt'] = $this->cart_param['taxamt']; - $Payment['shippingamt'] = $this->cart_param['shippingamt']; - $Payment['itemamt'] = $this->cart_param['itemamt']; array_push($Payments, $Payment); $PayPalRequestData = array( 'SECFields' => $SECFields,