Skip to content

Commit

Permalink
CC Processing - Soft Descriptor, ref #634
Browse files Browse the repository at this point in the history
  • Loading branch information
kcppdevelopers committed Mar 6, 2017
1 parent 2b6163b commit a3d226b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions angelleye-includes/paypal-rest-api-utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
}
}

/**
Expand Down
4 changes: 4 additions & 0 deletions classes/wc-gateway-braintree-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
3 changes: 2 additions & 1 deletion classes/wc-gateway-paypal-pro-payflow-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
);

/**
Expand Down

0 comments on commit a3d226b

Please sign in to comment.