From 14951c11fc42e8a9c2fc05e512e3ffb1c1d34d28 Mon Sep 17 00:00:00 2001 From: kcppdevelopers Date: Tue, 21 Jun 2016 23:37:04 +0530 Subject: [PATCH] American Express Unsupported - Blocking when it shouldn't, ref #485 --- classes/wc-gateway-paypal-pro-angelleye.php | 2 +- classes/wc-gateway-paypal-pro-payflow-angelleye.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/wc-gateway-paypal-pro-angelleye.php b/classes/wc-gateway-paypal-pro-angelleye.php index 9b92cd889..2878fed04 100644 --- a/classes/wc-gateway-paypal-pro-angelleye.php +++ b/classes/wc-gateway-paypal-pro-angelleye.php @@ -482,7 +482,7 @@ public function validate_fields() $card_type = AngellEYE_Utility::card_type_from_account_number($card->number); - if ($card_type == 'amex' && (get_woocommerce_currency() != 'USD' || get_woocommerce_currency() != 'AUD')) { + if ($card_type == 'amex' && (get_woocommerce_currency() != 'USD' && get_woocommerce_currency() != 'AUD')) { throw new Exception(__('Your processor is unable to process the Card Type in the currency requested. Please try another card type', 'paypal-for-woocommerce')); } diff --git a/classes/wc-gateway-paypal-pro-payflow-angelleye.php b/classes/wc-gateway-paypal-pro-payflow-angelleye.php index 090e3ac83..a758a31f7 100644 --- a/classes/wc-gateway-paypal-pro-payflow-angelleye.php +++ b/classes/wc-gateway-paypal-pro-payflow-angelleye.php @@ -274,7 +274,7 @@ function process_payment( $order_id ) { $card_type = AngellEYE_Utility::card_type_from_account_number($card_number); - if($card_type == 'amex' && (get_woocommerce_currency() != 'USD' || get_woocommerce_currency() != 'AUD')) { + if($card_type == 'amex' && (get_woocommerce_currency() != 'USD' && get_woocommerce_currency() != 'AUD')) { throw new Exception( __( 'Your processor is unable to process the Card Type in the currency requested. Please try another card type', 'paypal-for-woocommerce' ) ); }