Skip to content

Commit

Permalink
Merge pull request #1335 from angelleye/PFW-447
Browse files Browse the repository at this point in the history
Cart Amount Mismatch : PFW-447
  • Loading branch information
kcppdevelopers committed Jul 10, 2019
2 parents 68330ac + f53329f commit 6b2ccae
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions angelleye-includes/angelleye-admin-order-payment-process.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'])) {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 6b2ccae

Please sign in to comment.