diff --git a/angelleye-includes/paypal-rest-api-utility.php b/angelleye-includes/paypal-rest-api-utility.php index 82c3ba2c9..b84f51826 100644 --- a/angelleye-includes/paypal-rest-api-utility.php +++ b/angelleye-includes/paypal-rest-api-utility.php @@ -40,6 +40,7 @@ public function __construct($gateway) { $this->gateway = $gateway; } $this->testmode = 'yes' === $this->gateway->get_option('testmode', 'no'); + $this->softdescriptor = $this->get_option('softdescriptor', ''); $this->mode = $this->testmode == 'yes' ? 'SANDBOX' : 'LIVE'; $this->debug = 'yes' === $this->gateway->get_option('debug', 'no'); if ($this->testmode) { @@ -243,6 +244,9 @@ public function set_transaction() { $this->transaction->setItemList($this->item_list); $this->transaction->setDescription("Payment description"); $this->transaction->setInvoiceNumber(uniqid()); + if( !empty($this->softdescriptor) ) { + $this->transaction->setSoftDescriptor($this->softdescriptor); + } } /** diff --git a/classes/wc-gateway-braintree-angelleye.php b/classes/wc-gateway-braintree-angelleye.php index 9ac026b30..3157116e4 100644 --- a/classes/wc-gateway-braintree-angelleye.php +++ b/classes/wc-gateway-braintree-angelleye.php @@ -539,6 +539,10 @@ public function angelleye_do_payment($order) { $request_data['orderId'] = $order->get_order_number(); $request_data['options'] = $this->get_braintree_options(); $request_data['channel'] = 'AngellEYEPayPalforWoo_BT'; + if( !empty($this->softdescriptor) ) { + $request_data['descriptor'] = array('name' => $this->softdescriptor); + } + if ($this->debug) { $this->add_log('Begin Braintree_Transaction::sale request'); $this->add_log('Order: ' . print_r($order->get_order_number(), true)); diff --git a/classes/wc-gateway-paypal-pro-payflow-angelleye.php b/classes/wc-gateway-paypal-pro-payflow-angelleye.php index 503d74c40..65c3ef20e 100644 --- a/classes/wc-gateway-paypal-pro-payflow-angelleye.php +++ b/classes/wc-gateway-paypal-pro-payflow-angelleye.php @@ -444,7 +444,8 @@ function do_payment( $order, $card_number, $card_exp, $card_csc, $centinelPAResS 'endtime'=>'', // For inquiry transaction when using CUSTREF to specify the transaction. 'securetoken'=>'', // Required if using secure tokens. A value the Payflow server created upon your request for storing transaction data. 32 char 'partialauth'=>'', // Required for partial authorizations. Set to Y to submit a partial auth. - 'authcode'=>'' // Rrequired for voice authorizations. Returned only for approved voice authorization transactions. AUTHCODE is the approval code received over the phone from the processing network. 6 char max + 'authcode'=>'', // Rrequired for voice authorizations. Returned only for approved voice authorization transactions. AUTHCODE is the approval code received over the phone from the processing network. 6 char max + 'merchdescr' => $this->softdescriptor ); /**