Skip to content

Commit

Permalink
Merge pull request #1284 from angelleye/PFW-372
Browse files Browse the repository at this point in the history
PFW-372
  • Loading branch information
Drew Angell committed Feb 19, 2019
2 parents 2cf8472 + 6231146 commit 872f4dd
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions classes/wc-gateway-braintree-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,9 @@ public function angelleye_do_payment($order) {
return false;
}
$request_data['paymentMethodNonce'] = $payment_method_nonce;
if($this->enable_braintree_drop_in == false && $this->threed_secure_enabled === false) {
$request_data['creditCard']['cardholderName'] = $order->get_formatted_billing_full_name();
}
}
if (is_user_logged_in()) {
$customer_id = get_current_user_id();
Expand Down Expand Up @@ -1311,7 +1314,7 @@ public function process_refund($order_id, $amount = null, $reason = '') {
} catch (Braintree_Exception_NotFound $e) {
$this->add_log("Braintree_Transaction::void Braintree_Exception_NotFound: " . $e->getMessage());
return new WP_Error(404, $e->getMessage());
} catch (Exception $ex) {
} catch (Exception $e) {
$this->add_log("Braintree_Transaction::void Exception: " . $e->getMessage());
return new WP_Error(404, $e->getMessage());
}
Expand All @@ -1336,7 +1339,7 @@ public function process_refund($order_id, $amount = null, $reason = '') {
} catch (Braintree_Exception_NotFound $e) {
$this->add_log("Braintree_Transaction::refund Braintree_Exception_NotFound: " . $e->getMessage());
return new WP_Error(404, $e->getMessage());
} catch (Exception $ex) {
} catch (Exception $e) {
$this->add_log("Braintree_Transaction::refund Exception: " . $e->getMessage());
return new WP_Error(404, $e->getMessage());
}
Expand Down Expand Up @@ -1875,6 +1878,9 @@ public function braintree_create_customer($customer_id) {
'fax' => '',
'website' => ''
);
if($this->enable_braintree_drop_in == false && $this->threed_secure_enabled === false) {
$create_customer_request['creditCard']['cardholderName'] = $firstName . $lastName;
}
$result = Braintree_Customer::create(apply_filters('angelleye_woocommerce_braintree_create_customer_request_args', $create_customer_request));
if ($result->success == true) {
if (!empty($result->customer->id)) {
Expand Down Expand Up @@ -2026,6 +2032,9 @@ public function process_subscription_payment($order, $amount, $payment_token = n
}
$request_data['orderId'] = $order->get_order_number();
$request_data['options'] = $this->get_braintree_options();
if($this->enable_braintree_drop_in == false && $this->threed_secure_enabled === false) {
$request_data['creditCard']['cardholderName'] = $order->get_formatted_billing_full_name();
}
$request_data['channel'] = 'AngellEYEPayPalforWoo_BT';
if ($this->debug) {
$this->add_log('Begin Braintree_Transaction::sale request');
Expand Down Expand Up @@ -2426,6 +2435,9 @@ public function braintree_create_customer_auth($customer_id) {
'fax' => '',
'website' => ''
);
if($this->enable_braintree_drop_in == false && $this->threed_secure_enabled === false) {
$create_customer_request['creditCard']['cardholderName'] = $firstName . $lastName;
}
$result = Braintree_Customer::create(apply_filters('angelleye_woocommerce_braintree_create_customer_request_args', $create_customer_request));
if ($result->success == true) {
if (!empty($result->customer->id)) {
Expand Down

0 comments on commit 872f4dd

Please sign in to comment.