Plugin Directory

Changeset 3280955


Ignore:
Timestamp:
04/24/2025 12:41:39 PM (10 months ago)
Author:
markhagan
Message:

v3.0.0 release

Location:
woocommerce-securesubmit-gateway/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • woocommerce-securesubmit-gateway/trunk/README.md

    r3270040 r3280955  
    2121## Changelog
    2222
     23#### 3.0.0
     24
     25* Added support for automatic order status update on initial order creation
     26* Require PHP Group supported PHP version (>= v8.1); https://www.php.net/supported-versions
     27
    2328#### 2.3.5
    2429
  • woocommerce-securesubmit-gateway/trunk/classes/class-wc-gateway-securesubmit.php

    r3270040 r3280955  
    1111    public $refund  = null;
    1212    public $reverse = null;
    13     private $pluginVersion = '2.3.5';
     13    private $pluginVersion = '3.0.0';
    1414    public $secret_key;
    1515    public $public_key;
    1616    public $custom_error;
    1717    public $paymentaction;
     18    /**
     19     *
     20     * @var null|string
     21     */
     22    public ?string $default_order_status;
    1823    public $txndescriptor;
    1924    public $enable_anti_fraud;
     
    5358        $this->custom_error            = $this->getSetting('custom_error');
    5459        $this->paymentaction           = $this->getSetting('paymentaction');
     60        $this->default_order_status    = $this->getSetting('default_order_status');
    5561        $this->txndescriptor           = $this->getSetting('txndescriptor');
    5662        $this->enable_anti_fraud       = ($this->getSetting('enable_anti_fraud') == 'yes' ? true : false);
  • woocommerce-securesubmit-gateway/trunk/classes/wc-gateway-securesubmit/class-payment.php

    r3075804 r3280955  
    4242            if (empty($securesubmit_token)) {
    4343                if (isset($_POST['secure_submit_card']) && $_POST['secure_submit_card'] === 'new') {
    44                     throw new Exception(__(
    45                         'Please make sure your card details have been entered correctly '
    46                             . 'and that your browser supports JavaScript.',
     44                    throw new Exception(
     45                        /* translators:  card detail error message */
     46                        esc_html_e(
     47                        'Please make sure your card details have been entered correctly
     48                             and that your browser supports JavaScript.',
    4749                        'wc_securesubmit'
    4850                    ));
     
    259261                }
    260262
    261                 $order->add_order_note(__(
    262                     'SecureSubmit payment ' . $verb,
    263                     'wc_securesubmit'
    264                 ) . ' (Transaction ID: ' . $response->transactionId . ')');
     263                $order->add_order_note(sprintf(
     264                    /* translators: %s: paymentaction */
     265                    esc_html_e( 'SecureSubmit payment %s','wc_securesubmit' ),
     266                    $verb) . ' (Transaction ID: ' . $response->transactionId . ')');
    265267                do_action('wc_securesubmit_order_credit_card_details', $orderId, $card_type, $last_four);
    266268                if ($this->parent->paymentaction !== 'verify') {
    267269                    $order->payment_complete($response->transactionId);
     270                   
     271                    if ($this->parent->default_order_status !== 'default') {
     272                        $order->update_status($this->parent->default_order_status);
     273                    }
    268274                }
    269275                WC()->cart->empty_cart();
     
    275281            } catch (HpsException $e) {
    276282                try {
    277                     $order->add_order_note(__(
    278                         'SecureSubmit payment failed. Gateway response message: "' .
    279                             $e->getMessage() . '"',
    280                         'wc_securesubmit'
    281                     ));
     283                    $order->add_order_note(
     284                        sprintf(
     285                            /* translators: %s: Gateway error response */
     286                            esc_html_e('SecureSubmit payment failed. Gateway response message: %s','wc_securesubmit' ),
     287                            $e->getMessage())
     288                           );
    282289                } catch (Exception $f) {
    283290                    // eat it
     
    351358        ) {
    352359            sleep(5);
    353             throw new HpsException(sprintf($this->parent->fraud_text, $issuerResponse));
     360            throw new HpsException(sprintf(esc_html($this->parent->fraud_text), esc_html($issuerResponse)));
    354361        }
    355362    }
     
    388395    private function getVelocityVarPrefix()
    389396    {
    390         return sprintf('HeartlandHPS_Velocity%s', md5($this->getRemoteIP()));
     397        return sprintf('HeartlandHPS_Velocity%s', md5(WC_Geolocation::get_ip_address()));
    391398    }
    392399
  • woocommerce-securesubmit-gateway/trunk/etc/securesubmit-options.php

    r3236060 r3280955  
    113113        ),
    114114    ),
     115    'default_order_status' => array(
     116        'title'       => __('Order Status', 'wc_securesubmit'),
     117        'type'        => 'select',
     118        'description' => __('Allows you to essentially override WooCommerce’s default order status handling by automatically updating to a status of your choosing on successful orders.', 'wc_securesubmit'),
     119        'default'     => 'default',
     120        'desc_tip'    => true,
     121        'options'     => array(
     122            'default'    => __('Default', 'wc_securesubmit'),
     123            'processing' => __('Procesing', 'wc_securesubmit'),
     124            'on-hold'    => __('On Hold', 'wc_securesubmit'),
     125        ),
     126    ),
    115127    'txndescriptor' => array(
    116128        'title'       => __('Order Transaction Descriptor', 'wc_securesubmit'),
  • woocommerce-securesubmit-gateway/trunk/gateway-securesubmit.php

    r3270040 r3280955  
    44Plugin URI: https://developer.heartlandpaymentsystems.com/SecureSubmit/
    55Description: Heartland Payment Systems gateway for WooCommerce.
    6 Version: 2.3.5
    7 WC tested up to: 9.6.0
     6Version: 3.0.0
     7WC tested up to: 9.8.1
    88Author: SecureSubmit
    99Author URI: https://developer.heartlandpaymentsystems.com/SecureSubmit/
     
    8585    public function activate()
    8686    {
     87        if ( version_compare( PHP_VERSION, '8.1', '<' ) ) {
     88            return;
     89        }
     90
    8791        if (!class_exists('WC_Payment_Gateway')) {
    8892            return;
  • woocommerce-securesubmit-gateway/trunk/readme.txt

    r3270040 r3280955  
    22Contributors: markhagan
    33Tags: woocommerce, woo, heartland, payment, tokenize
    4 Tested up to: 6.7.1
     4Tested up to: 6.8
    55Stable tag: trunk
    66License: GPLv2
     
    3838
    3939== Changelog ==
     40= 3.0.0 =
     41
     42* Added support for automatic order status update on initial order creation
     43* Require PHP Group supported PHP version (>= v8.1); https://www.php.net/supported-versions
     44
    4045= 2.3.5 =
    4146* Bugfix: correction to header formation
Note: See TracChangeset for help on using the changeset viewer.