diff --git a/angelleye-includes/angelleye-admin-order-payment-process.php b/angelleye-includes/angelleye-admin-order-payment-process.php index d0db4f988..828df22a1 100644 --- a/angelleye-includes/angelleye-admin-order-payment-process.php +++ b/angelleye-includes/angelleye-admin-order-payment-process.php @@ -631,6 +631,11 @@ public function angelleye_reference_transaction_request_ec_pp_pf($order, $refere } else { $Payment['order_items'] = array(); } + if( $order->get_total() != $PaymentDetails['shippingamt'] ) { + $PaymentDetails['shippingamt'] = $PaymentDetails['shippingamt']; + } else { + $PaymentDetails['shippingamt'] = 0.00; + } $PayPalRequestData['PaymentDetails'] = $PaymentDetails; return $PayPalRequestData; } 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 a1382c465..9033eab11 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 @@ -529,6 +529,11 @@ public function angelleye_do_express_checkout_payment_request() { } else { $Payment['order_items'] = array(); } + if( $order->get_total() != $Payment['shippingamt'] ) { + $Payment['shippingamt'] = $Payment['shippingamt']; + } else { + $Payment['shippingamt'] = 0.00; + } $REVIEW_RESULT = !empty($paypal_express_checkout['ExpresscheckoutDetails']) ? $paypal_express_checkout['ExpresscheckoutDetails'] : array(); $PaymentRedeemedOffers = array(); if ((isset($REVIEW_RESULT) && !empty($REVIEW_RESULT)) && isset($REVIEW_RESULT['WALLETTYPE0'])) { @@ -1386,6 +1391,11 @@ public function DoReferenceTransaction($order_id) { } else { $Payment['order_items'] = array(); } + if( $order->get_total() != $PaymentDetails['shippingamt'] ) { + $PaymentDetails['shippingamt'] = $PaymentDetails['shippingamt']; + } else { + $PaymentDetails['shippingamt'] = 0.00; + } $PayPalRequestData['PaymentDetails'] = $PaymentDetails; $this->paypal_response = $this->paypal->DoReferenceTransaction($PayPalRequestData); AngellEYE_Gateway_Paypal::angelleye_paypal_for_woocommerce_curl_error_handler($this->paypal_response, $methos_name = 'DoExpressCheckoutPayment', $gateway = 'PayPal Express Checkout', $this->gateway->error_email_notify);