Skip to content
Permalink
Browse files

Merge pull request #1252 from angelleye/PFW-324

PFW-324
  • Loading branch information...
angelleye committed Dec 8, 2018
2 parents e9833fc + 3da764a commit 33720c9a8ccbc32b31d22762187e326110017d04
@@ -151,7 +151,11 @@ public function create_payment($order, $card_data) {
}
}
} catch (Exception $ex) {
$order->add_order_note('ERROR: ' . $ex->getMessage());
if(function_exists('wc_add_notice')) {
wc_add_notice(__('ERROR: ' . $ex->getMessage()), 'error');
}
}
}
$order->payment_complete($transaction_id);
@@ -200,6 +200,10 @@ public function validate_fields() {
}
$card = $this->paypal_rest_api->get_posted_card();
if ($card->type == 'maestro') {
throw new Exception(__('Your processor is unable to process the Card Type. Please try another card type', 'paypal-for-woocommerce'));
}
if (empty($card->exp_month) || empty($card->exp_year)) {
throw new Exception(__('Card expiration date is invalid', 'woocommerce-gateway-paypal-pro'));

0 comments on commit 33720c9

Please sign in to comment.
You can’t perform that action at this time.