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 5, 2017
1 parent c4a7533 commit 2b6163b
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 4 deletions.
7 changes: 7 additions & 0 deletions angelleye-includes/angelleye-utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,13 @@ public static function angelleye_paypal_credit_card_rest_setting_fields() {
'type' => 'text',
'default' => plugins_url('/assets/images/cards.png', plugin_basename(dirname(__FILE__)))
),
'softdescriptor' => array(
'title' => __('Credit Card Statement Name', 'paypal-for-woocommerce'),
'type' => 'text',
'description' => __('If you provide a value in this field, the value display on the buyer\'s statement', 'paypal-for-woocommerce'),
'default' => '',
'desc_tip' => true,
),
'debug' => array(
'title' => __('Debug Log', 'paypal-for-woocommerce'),
'type' => 'checkbox',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function __construct($gateway) {
$this->billing_address = 'yes' === $this->gateway->get_option('billing_address', 'no');
$this->disable_term = 'yes' === $this->gateway->get_option('disable_term', 'no');
$this->save_abandoned_checkout = 'yes' == $this->gateway->get_option('save_abandoned_checkout', 'no');
$this->softdescriptor = $this->gateway->get_option('softdescriptor', '');
$this->credentials = array(
'Sandbox' => $this->gateway->testmode == 'yes' ? TRUE : FALSE,
'APIUsername' => $this->gateway->api_username,
Expand Down Expand Up @@ -209,7 +210,7 @@ public function angelleye_do_express_checkout_payment_request() {
'sellerid' => '',
'sellerusername' => '',
'sellerregistrationdate' => '',
'softdescriptor' => ''
'softdescriptor' => $this->softdescriptor
);
if (isset($this->gateway->notifyurl) && !empty($this->gateway->notifyurl)) {
$Payment['notifyurl'] = $this->gateway->notifyurl;
Expand Down Expand Up @@ -744,7 +745,7 @@ public function DoReferenceTransaction($order_id) {
'referenceid' => $token->get_token(),
'paymentaction' => !empty($this->gateway->payment_action) ? $this->gateway->payment_action : 'Sale',
'returnfmfdetails' => '1',
'softdescriptor' => ''
'softdescriptor' => $this->softdescriptor
);
$PayPalRequestData['DRTFields'] = $DRTFields;
$PaymentDetails = array(
Expand Down
8 changes: 8 additions & 0 deletions classes/wc-gateway-braintree-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ function __construct() {
$this->merchant_account_id = $this->sandbox == 'no' ? $this->get_option('merchant_account_id') : $this->get_option('sandbox_merchant_account_id');
$this->debug = 'yes' === $this->get_option('debug', 'no');
$this->is_encrypt = $this->get_option('is_encrypt', 'no');
$this->softdescriptor = $this->get_option('softdescriptor', '');
add_action('woocommerce_update_options_payment_gateways_' . $this->id, array($this, 'process_admin_options'));
add_filter('woocommerce_settings_api_sanitized_fields_' . $this->id, array($this, 'angelleye_braintree_encrypt_gateway_api'), 10, 1);
$this->response = '';
Expand Down Expand Up @@ -262,6 +263,13 @@ public function init_form_fields() {
'default' => 'no',
'class' => 'enable_tokenized_payments'
),
'softdescriptor' => array(
'title' => __('Credit Card Statement Name', 'paypal-for-woocommerce'),
'type' => 'text',
'description' => __('If you provide a value in this field, the value display on the buyer\'s statement', 'paypal-for-woocommerce'),
'default' => '',
'desc_tip' => true,
),
'card_icon' => array(
'title' => __('Card Icon', 'paypal-for-woocommerce'),
'type' => 'text',
Expand Down
9 changes: 8 additions & 1 deletion classes/wc-gateway-paypal-advanced-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public function __construct() {


$this->hostaddr = $this->testmode == 'yes' ? $this->testurl : $this->liveurl;
$this->softdescriptor = $this->get_option('softdescriptor', '');

if ($this->debug == 'yes')
$this->log = new WC_Logger();
Expand Down Expand Up @@ -742,7 +743,13 @@ public function init_form_fields() {
'default' => 'no',
'class' => 'enable_tokenized_payments'
),

'softdescriptor' => array(
'title' => __('Credit Card Statement Name', 'paypal-for-woocommerce'),
'type' => 'text',
'description' => __('If you provide a value in this field, the value display on the buyer\'s statement', 'paypal-for-woocommerce'),
'default' => '',
'desc_tip' => true,
),
'testmode' => array(
'title' => __('PayPal sandbox', 'paypal-for-woocommerce'),
'type' => 'checkbox',
Expand Down
1 change: 1 addition & 0 deletions classes/wc-gateway-paypal-credit-cards-rest-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function __construct() {
$this->rest_client_id = $this->get_option('rest_client_id', false);
$this->rest_secret_id = $this->get_option('rest_secret_id', false);
}
$this->softdescriptor = $this->get_option('softdescriptor', '');
add_action('woocommerce_update_options_payment_gateways', array($this, 'process_admin_options'));
add_action('woocommerce_update_options_payment_gateways_' . $this->id, array($this, 'process_admin_options'));
add_action('admin_notices', array($this, 'checks'));
Expand Down
8 changes: 8 additions & 0 deletions classes/wc-gateway-paypal-express-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public function __construct() {
$this->checkout_with_pp_button_type = $this->get_option('checkout_with_pp_button_type', 'paypalimage');
$this->pp_button_type_text_button = $this->get_option('pp_button_type_text_button', 'Proceed to Checkout');
$this->pp_button_type_my_custom = $this->get_option('pp_button_type_my_custom', $this->checkout_with_pp_button_type);
$this->softdescriptor = $this->get_option('softdescriptor', '');
$this->version = "64";
$this->Force_tls_one_point_two = get_option('Force_tls_one_point_two', 'no');
$this->page_style = $this->get_option('page_style', '');
Expand Down Expand Up @@ -421,6 +422,13 @@ public function init_form_fields() {
'default' => '',
'desc_tip' => true,
),
'softdescriptor' => array(
'title' => __('Credit Card Statement Name', 'paypal-for-woocommerce'),
'type' => 'text',
'description' => __('If you provide a value in this field, the value display on the buyer\'s statement', 'paypal-for-woocommerce'),
'default' => '',
'desc_tip' => true,
),
'angelleye_skip_text' => array(
'title' => __('Express Checkout Message', 'paypal-for-woocommerce'),
'type' => 'text',
Expand Down
10 changes: 9 additions & 1 deletion classes/wc-gateway-paypal-pro-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ function __construct()
$this->send_items = 'yes' === $this->get_option('send_items', 'yes');
$this->enable_notifyurl = $this->get_option('enable_notifyurl', 'no');
$this->is_encrypt = $this->get_option('is_encrypt', 'no');
$this->softdescriptor = $this->get_option('softdescriptor', '');
$this->notifyurl = '';
if($this->enable_notifyurl == 'yes') {
$this->notifyurl = $this->get_option('notifyurl');
Expand Down Expand Up @@ -325,6 +326,13 @@ function init_form_fields()
'description' => __('Display card holder first and last name in credit card form.', 'paypal-for-woocommerce'),
'default' => 'no'
),
'softdescriptor' => array(
'title' => __('Credit Card Statement Name', 'paypal-for-woocommerce'),
'type' => 'text',
'description' => __('If you provide a value in this field, the value display on the buyer\'s statement', 'paypal-for-woocommerce'),
'default' => '',
'desc_tip' => true,
),
'debug' => array(
'title' => __('Debug Log', 'paypal-for-woocommerce'),
'type' => 'checkbox',
Expand Down Expand Up @@ -972,7 +980,7 @@ function do_payment($order, $card_number, $card_type, $card_exp_month, $card_exp
'referenceid' => $token->get_token(),
'paymentaction' => !empty($this->payment_action) ? $this->payment_action : 'Sale',
'returnfmfdetails' => '1',
'softdescriptor' => ''
'softdescriptor' => $this->softdescriptor
);
$PayPalResult = $PayPal->DoReferenceTransaction($PayPalRequestData);
} else {
Expand Down
8 changes: 8 additions & 0 deletions classes/wc-gateway-paypal-pro-payflow-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ function __construct() {
if($this->enable_tokenized_payments == 'yes') {
array_push($this->supports, "tokenization");
}
$this->softdescriptor = $this->get_option('softdescriptor', '');
$this->Force_tls_one_point_two = get_option('Force_tls_one_point_two', 'no');
$this->enable_cardholder_first_last_name = 'yes' === $this->get_option('enable_cardholder_first_last_name', 'no');
$this->is_encrypt = $this->get_option('is_encrypt', 'no');
Expand Down Expand Up @@ -233,6 +234,13 @@ function init_form_fields() {
),
'default' => 'Sale'
),
'softdescriptor' => array(
'title' => __('Credit Card Statement Name', 'paypal-for-woocommerce'),
'type' => 'text',
'description' => __('If you provide a value in this field, the value display on the buyer\'s statement', 'paypal-for-woocommerce'),
'default' => '',
'desc_tip' => true,
),
'enable_tokenized_payments' => array(
'title' => __('Enable Tokenized Payments', 'paypal-for-woocommerce'),
'label' => __('Enable Tokenized Payments', 'paypal-for-woocommerce'),
Expand Down

0 comments on commit 2b6163b

Please sign in to comment.