Plugin Directory

Changeset 3444652


Ignore:
Timestamp:
01/22/2026 09:22:49 AM (2 months ago)
Author:
acquired2021
Message:

Update to version 2.1.0 from GitHub

Location:
acquired-payments-gateway-for-woocommerce
Files:
16 edited
1 copied

Legend:

Unmodified
Added
Removed
  • acquired-payments-gateway-for-woocommerce/tags/2.1.0/acquired-com-for-woocommerce.php

    r3382664 r3444652  
    33 * Plugin Name: Acquired.com for WooCommerce
    44 * Description: Securely accept Cards, Apple Pay & Google Pay on your store using Acquired.com.
    5  * Version: 2.0.0
     5 * Version: 2.1.0
    66 * Author: Acquired
    77 * Author URI: https://acquired.com
     
    4545}
    4646if ( ! defined( 'ACFW_VERSION' ) ) {
    47     define( 'ACFW_VERSION', '2.0.0' );
     47    define( 'ACFW_VERSION', '2.1.0' );
    4848}
    4949if ( ! defined( 'ACFW_PHP_VERSION' ) ) {
  • acquired-payments-gateway-for-woocommerce/tags/2.1.0/languages/acquired-com-for-woocommerce.pot

    r3382664 r3444652  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Acquired.com for WooCommerce 2.0.0\n"
     5"Project-Id-Version: Acquired.com for WooCommerce 2.1.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/acquired-com-for-woocommerce\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  • acquired-payments-gateway-for-woocommerce/tags/2.1.0/readme.txt

    r3382664 r3444652  
    55Tested up to: 6.8.3
    66Requires PHP: 8.1
    7 Stable tag: 2.0.0
     7Stable tag: 2.1.0
    88License: MIT License
    99License URI: https://opensource.org/license/mit
     
    6262== Changelog ==
    6363
     64= 2.1.0 - 2026/01/22 =
     65* Feature: Update to support the release of signing keys and multiple APP IDs.
     66
    6467= 2.0.0 - 2025/10/22 =
    6568* Release version 2.0.0
  • acquired-payments-gateway-for-woocommerce/tags/2.1.0/src/Api/IncomingDataHandler.php

    r3382664 r3444652  
    2525     * @param LoggerService $logger_service
    2626     * @param string $app_key
    27      */
    28     public function __construct( private LoggerService $logger_service, private string $app_key ) {}
     27     * @param string $signing_key
     28     */
     29    public function __construct( private LoggerService $logger_service, private string $app_key, private string $signing_key = '' ) {}
    2930
    3031    /**
     
    9091     */
    9192    private function validate_redirect_hash( array $data ) : bool {
    92         if ( ! $this->app_key ) {
     93        // Determine which key to use: signing_key takes precedence, fallback to app_key for backward compatibility
     94        $key = ( ! empty( $this->signing_key ) ) ? $this->signing_key : $this->app_key;
     95
     96        if ( ! $key ) {
    9397            return false;
    9498        }
    9599
    96         $first_hash = hash( 'sha256', $data['status'] . $data['transaction_id'] . $data['order_id'] . $data['timestamp'] );
    97 
    98         $final_hash = hash( 'sha256', $first_hash . $this->app_key );
    99 
    100         return hash_equals( $data['hash'], $final_hash );
     100        $first_hash    = hash( 'sha256', $data['status'] . $data['transaction_id'] . $data['order_id'] . $data['timestamp'] );
     101        $expected_hash = hash( 'sha256', $first_hash . $key );
     102
     103        // Support comma-delimited hashes for key rotation. If ANY hash matches, validation passes.
     104        $hashes = array_map( 'trim', explode( ',', $data['hash'] ) );
     105        foreach ( $hashes as $candidate_hash ) {
     106            if ( hash_equals( $expected_hash, $candidate_hash ) ) {
     107                return true;
     108            }
     109        }
     110
     111        return false;
    101112    }
    102113
     
    109120     */
    110121    private function validate_webhook_hash( string $data, string $hash ) : bool {
    111         if ( ! $this->app_key ) {
     122        // Determine which key to use: signing_key takes precedence, fallback to app_key for backward compatibility
     123        $key = ( ! empty( $this->signing_key ) ) ? $this->signing_key : $this->app_key;
     124
     125        if ( ! $key ) {
    112126            return false;
    113127        }
    114128
    115         return hash_equals( hash_hmac( 'sha256', preg_replace( '/\s+/', '', $data ), $this->app_key ), $hash );
     129        $sanitized_data = preg_replace( '/\s+/', '', $data );
     130        $expected_hash  = hash_hmac( 'sha256', $sanitized_data, $key );
     131
     132        // Support comma-delimited hashes for key rotation. If ANY hash matches, validation passes.
     133        $hashes = array_map( 'trim', explode( ',', $hash ) );
     134        foreach ( $hashes as $candidate_hash ) {
     135            if ( hash_equals( $expected_hash, $candidate_hash ) ) {
     136                return true;
     137            }
     138        }
     139
     140        return false;
    116141    }
    117142
  • acquired-payments-gateway-for-woocommerce/tags/2.1.0/src/Services/SettingsService.php

    r3382664 r3444652  
    264264
    265265    /**
     266     * Get signing key for specific environment.
     267     *
     268     * @param string $environment
     269     * @return string
     270     */
     271    public function get_signing_key_for_environment( string $environment ) : string {
     272        return $this->get_option( 'signing_key_' . $environment, '' );
     273    }
     274
     275    /**
     276     * Get signing key for current environment.
     277     *
     278     * @return string
     279     */
     280    public function get_signing_key() : string {
     281        return $this->get_signing_key_for_environment( $this->is_environment_production() ? 'production' : 'staging' );
     282    }
     283
     284    /**
    266285     * Get payment reference.
    267286     *
     
    435454                'type'        => 'password',
    436455                'description' => __( 'Enter your Acquired.com staging App Key.', 'acquired-com-for-woocommerce' ),
     456                'desc_tip'    => true,
     457            ],
     458            'signing_keys'            => [
     459                'title'       => __( 'Signing Keys', 'acquired-com-for-woocommerce' ),
     460                'description' => __( 'Signing keys for webhook and redirect hash validation. For backward compatibility, the App Key will be used if no signing key is provided.', 'acquired-com-for-woocommerce' ),
     461                'type'        => 'title',
     462            ],
     463            'signing_key_production'  => [
     464                'title'       => __( 'Live Signing Key', 'acquired-com-for-woocommerce' ),
     465                'type'        => 'password',
     466                'description' => __( 'Enter your Acquired.com production signing key (format: sk_{32-bit hex}).', 'acquired-com-for-woocommerce' ),
     467                'desc_tip'    => true,
     468            ],
     469            'signing_key_staging'     => [
     470                'title'       => __( 'Staging Signing Key', 'acquired-com-for-woocommerce' ),
     471                'type'        => 'password',
     472                'description' => __( 'Enter your Acquired.com staging signing key (format: sk_{32-bit hex}).', 'acquired-com-for-woocommerce' ),
    437473                'desc_tip'    => true,
    438474            ],
  • acquired-payments-gateway-for-woocommerce/tags/2.1.0/src/bootstrap.php

    r3382664 r3444652  
    6969        CustomerService::class      => autowire(),
    7070        IncomingDataHandler::class  => function( $container ) {
    71             return new IncomingDataHandler( $container->get( LoggerService::class ), $container->get( SettingsService::class )->get_app_key() );
     71            return new IncomingDataHandler( $container->get( LoggerService::class ), $container->get( SettingsService::class )->get_app_key(), $container->get( SettingsService::class )->get_signing_key() );
    7272        },
    7373        LoggerService::class        => function( $container ) {
  • acquired-payments-gateway-for-woocommerce/tags/2.1.0/vendor/composer/autoload_static.php

    r3382664 r3444652  
    1515
    1616    public static $prefixLengthsPsr4 = array (
    17         'P' => 
     17        'P' =>
    1818        array (
    1919            'Psr\\Http\\Message\\' => 17,
     
    2121            'Psr\\Container\\' => 14,
    2222        ),
    23         'L' => 
     23        'L' =>
    2424        array (
    2525            'Laravel\\SerializableClosure\\' => 28,
    2626        ),
    27         'I' => 
     27        'I' =>
    2828        array (
    2929            'Invoker\\' => 8,
    3030        ),
    31         'G' => 
     31        'G' =>
    3232        array (
    3333            'GuzzleHttp\\Psr7\\' => 16,
     
    3535            'GuzzleHttp\\' => 11,
    3636        ),
    37         'D' => 
     37        'D' =>
    3838        array (
    3939            'DI\\' => 3,
    4040        ),
    41         'A' => 
     41        'A' =>
    4242        array (
    4343            'AcquiredComForWooCommerce\\' => 26,
     
    4646
    4747    public static $prefixDirsPsr4 = array (
    48         'Psr\\Http\\Message\\' => 
     48        'Psr\\Http\\Message\\' =>
    4949        array (
    5050            0 => __DIR__ . '/..' . '/psr/http-factory/src',
    5151            1 => __DIR__ . '/..' . '/psr/http-message/src',
    5252        ),
    53         'Psr\\Http\\Client\\' => 
     53        'Psr\\Http\\Client\\' =>
    5454        array (
    5555            0 => __DIR__ . '/..' . '/psr/http-client/src',
    5656        ),
    57         'Psr\\Container\\' => 
     57        'Psr\\Container\\' =>
    5858        array (
    5959            0 => __DIR__ . '/..' . '/psr/container/src',
    6060        ),
    61         'Laravel\\SerializableClosure\\' => 
     61        'Laravel\\SerializableClosure\\' =>
    6262        array (
    6363            0 => __DIR__ . '/..' . '/laravel/serializable-closure/src',
    6464        ),
    65         'Invoker\\' => 
     65        'Invoker\\' =>
    6666        array (
    6767            0 => __DIR__ . '/..' . '/php-di/invoker/src',
    6868        ),
    69         'GuzzleHttp\\Psr7\\' => 
     69        'GuzzleHttp\\Psr7\\' =>
    7070        array (
    7171            0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
    7272        ),
    73         'GuzzleHttp\\Promise\\' => 
     73        'GuzzleHttp\\Promise\\' =>
    7474        array (
    7575            0 => __DIR__ . '/..' . '/guzzlehttp/promises/src',
    7676        ),
    77         'GuzzleHttp\\' => 
     77        'GuzzleHttp\\' =>
    7878        array (
    7979            0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src',
    8080        ),
    81         'DI\\' => 
     81        'DI\\' =>
    8282        array (
    8383            0 => __DIR__ . '/..' . '/php-di/php-di/src',
    8484        ),
    85         'AcquiredComForWooCommerce\\' => 
     85        'AcquiredComForWooCommerce\\' =>
    8686        array (
    8787            0 => __DIR__ . '/../..' . '/src',
  • acquired-payments-gateway-for-woocommerce/tags/2.1.0/vendor/composer/installed.php

    r3382664 r3444652  
    22    'root' => array(
    33        'name' => 'acquired-com/acquired-com-for-woocommerce',
    4         'pretty_version' => '2.0.0',
    5         'version' => '2.0.0.0',
    6         'reference' => '9253e38ea8ac62aaf43c1b5d3cf42016c3d544ff',
     4        'pretty_version' => 'v2.1.0',
     5        'version' => '2.1.0.0',
     6        'reference' => 'a93f08d0336663bc2dfb37ae5157f73e7a1b5ce4',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        'acquired-com/acquired-com-for-woocommerce' => array(
    14             'pretty_version' => '2.0.0',
    15             'version' => '2.0.0.0',
    16             'reference' => '9253e38ea8ac62aaf43c1b5d3cf42016c3d544ff',
     14            'pretty_version' => 'v2.1.0',
     15            'version' => '2.1.0.0',
     16            'reference' => 'a93f08d0336663bc2dfb37ae5157f73e7a1b5ce4',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
  • acquired-payments-gateway-for-woocommerce/trunk/acquired-com-for-woocommerce.php

    r3382664 r3444652  
    33 * Plugin Name: Acquired.com for WooCommerce
    44 * Description: Securely accept Cards, Apple Pay & Google Pay on your store using Acquired.com.
    5  * Version: 2.0.0
     5 * Version: 2.1.0
    66 * Author: Acquired
    77 * Author URI: https://acquired.com
     
    4545}
    4646if ( ! defined( 'ACFW_VERSION' ) ) {
    47     define( 'ACFW_VERSION', '2.0.0' );
     47    define( 'ACFW_VERSION', '2.1.0' );
    4848}
    4949if ( ! defined( 'ACFW_PHP_VERSION' ) ) {
  • acquired-payments-gateway-for-woocommerce/trunk/languages/acquired-com-for-woocommerce.pot

    r3382664 r3444652  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Acquired.com for WooCommerce 2.0.0\n"
     5"Project-Id-Version: Acquired.com for WooCommerce 2.1.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/acquired-com-for-woocommerce\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  • acquired-payments-gateway-for-woocommerce/trunk/readme.txt

    r3382664 r3444652  
    55Tested up to: 6.8.3
    66Requires PHP: 8.1
    7 Stable tag: 2.0.0
     7Stable tag: 2.1.0
    88License: MIT License
    99License URI: https://opensource.org/license/mit
     
    6262== Changelog ==
    6363
     64= 2.1.0 - 2026/01/22 =
     65* Feature: Update to support the release of signing keys and multiple APP IDs.
     66
    6467= 2.0.0 - 2025/10/22 =
    6568* Release version 2.0.0
  • acquired-payments-gateway-for-woocommerce/trunk/src/Api/IncomingDataHandler.php

    r3382664 r3444652  
    2525     * @param LoggerService $logger_service
    2626     * @param string $app_key
    27      */
    28     public function __construct( private LoggerService $logger_service, private string $app_key ) {}
     27     * @param string $signing_key
     28     */
     29    public function __construct( private LoggerService $logger_service, private string $app_key, private string $signing_key = '' ) {}
    2930
    3031    /**
     
    9091     */
    9192    private function validate_redirect_hash( array $data ) : bool {
    92         if ( ! $this->app_key ) {
     93        // Determine which key to use: signing_key takes precedence, fallback to app_key for backward compatibility
     94        $key = ( ! empty( $this->signing_key ) ) ? $this->signing_key : $this->app_key;
     95
     96        if ( ! $key ) {
    9397            return false;
    9498        }
    9599
    96         $first_hash = hash( 'sha256', $data['status'] . $data['transaction_id'] . $data['order_id'] . $data['timestamp'] );
    97 
    98         $final_hash = hash( 'sha256', $first_hash . $this->app_key );
    99 
    100         return hash_equals( $data['hash'], $final_hash );
     100        $first_hash    = hash( 'sha256', $data['status'] . $data['transaction_id'] . $data['order_id'] . $data['timestamp'] );
     101        $expected_hash = hash( 'sha256', $first_hash . $key );
     102
     103        // Support comma-delimited hashes for key rotation. If ANY hash matches, validation passes.
     104        $hashes = array_map( 'trim', explode( ',', $data['hash'] ) );
     105        foreach ( $hashes as $candidate_hash ) {
     106            if ( hash_equals( $expected_hash, $candidate_hash ) ) {
     107                return true;
     108            }
     109        }
     110
     111        return false;
    101112    }
    102113
     
    109120     */
    110121    private function validate_webhook_hash( string $data, string $hash ) : bool {
    111         if ( ! $this->app_key ) {
     122        // Determine which key to use: signing_key takes precedence, fallback to app_key for backward compatibility
     123        $key = ( ! empty( $this->signing_key ) ) ? $this->signing_key : $this->app_key;
     124
     125        if ( ! $key ) {
    112126            return false;
    113127        }
    114128
    115         return hash_equals( hash_hmac( 'sha256', preg_replace( '/\s+/', '', $data ), $this->app_key ), $hash );
     129        $sanitized_data = preg_replace( '/\s+/', '', $data );
     130        $expected_hash  = hash_hmac( 'sha256', $sanitized_data, $key );
     131
     132        // Support comma-delimited hashes for key rotation. If ANY hash matches, validation passes.
     133        $hashes = array_map( 'trim', explode( ',', $hash ) );
     134        foreach ( $hashes as $candidate_hash ) {
     135            if ( hash_equals( $expected_hash, $candidate_hash ) ) {
     136                return true;
     137            }
     138        }
     139
     140        return false;
    116141    }
    117142
  • acquired-payments-gateway-for-woocommerce/trunk/src/Services/SettingsService.php

    r3382664 r3444652  
    264264
    265265    /**
     266     * Get signing key for specific environment.
     267     *
     268     * @param string $environment
     269     * @return string
     270     */
     271    public function get_signing_key_for_environment( string $environment ) : string {
     272        return $this->get_option( 'signing_key_' . $environment, '' );
     273    }
     274
     275    /**
     276     * Get signing key for current environment.
     277     *
     278     * @return string
     279     */
     280    public function get_signing_key() : string {
     281        return $this->get_signing_key_for_environment( $this->is_environment_production() ? 'production' : 'staging' );
     282    }
     283
     284    /**
    266285     * Get payment reference.
    267286     *
     
    435454                'type'        => 'password',
    436455                'description' => __( 'Enter your Acquired.com staging App Key.', 'acquired-com-for-woocommerce' ),
     456                'desc_tip'    => true,
     457            ],
     458            'signing_keys'            => [
     459                'title'       => __( 'Signing Keys', 'acquired-com-for-woocommerce' ),
     460                'description' => __( 'Signing keys for webhook and redirect hash validation. For backward compatibility, the App Key will be used if no signing key is provided.', 'acquired-com-for-woocommerce' ),
     461                'type'        => 'title',
     462            ],
     463            'signing_key_production'  => [
     464                'title'       => __( 'Live Signing Key', 'acquired-com-for-woocommerce' ),
     465                'type'        => 'password',
     466                'description' => __( 'Enter your Acquired.com production signing key (format: sk_{32-bit hex}).', 'acquired-com-for-woocommerce' ),
     467                'desc_tip'    => true,
     468            ],
     469            'signing_key_staging'     => [
     470                'title'       => __( 'Staging Signing Key', 'acquired-com-for-woocommerce' ),
     471                'type'        => 'password',
     472                'description' => __( 'Enter your Acquired.com staging signing key (format: sk_{32-bit hex}).', 'acquired-com-for-woocommerce' ),
    437473                'desc_tip'    => true,
    438474            ],
  • acquired-payments-gateway-for-woocommerce/trunk/src/bootstrap.php

    r3382664 r3444652  
    6969        CustomerService::class      => autowire(),
    7070        IncomingDataHandler::class  => function( $container ) {
    71             return new IncomingDataHandler( $container->get( LoggerService::class ), $container->get( SettingsService::class )->get_app_key() );
     71            return new IncomingDataHandler( $container->get( LoggerService::class ), $container->get( SettingsService::class )->get_app_key(), $container->get( SettingsService::class )->get_signing_key() );
    7272        },
    7373        LoggerService::class        => function( $container ) {
  • acquired-payments-gateway-for-woocommerce/trunk/vendor/composer/autoload_static.php

    r3382664 r3444652  
    1515
    1616    public static $prefixLengthsPsr4 = array (
    17         'P' => 
     17        'P' =>
    1818        array (
    1919            'Psr\\Http\\Message\\' => 17,
     
    2121            'Psr\\Container\\' => 14,
    2222        ),
    23         'L' => 
     23        'L' =>
    2424        array (
    2525            'Laravel\\SerializableClosure\\' => 28,
    2626        ),
    27         'I' => 
     27        'I' =>
    2828        array (
    2929            'Invoker\\' => 8,
    3030        ),
    31         'G' => 
     31        'G' =>
    3232        array (
    3333            'GuzzleHttp\\Psr7\\' => 16,
     
    3535            'GuzzleHttp\\' => 11,
    3636        ),
    37         'D' => 
     37        'D' =>
    3838        array (
    3939            'DI\\' => 3,
    4040        ),
    41         'A' => 
     41        'A' =>
    4242        array (
    4343            'AcquiredComForWooCommerce\\' => 26,
     
    4646
    4747    public static $prefixDirsPsr4 = array (
    48         'Psr\\Http\\Message\\' => 
     48        'Psr\\Http\\Message\\' =>
    4949        array (
    5050            0 => __DIR__ . '/..' . '/psr/http-factory/src',
    5151            1 => __DIR__ . '/..' . '/psr/http-message/src',
    5252        ),
    53         'Psr\\Http\\Client\\' => 
     53        'Psr\\Http\\Client\\' =>
    5454        array (
    5555            0 => __DIR__ . '/..' . '/psr/http-client/src',
    5656        ),
    57         'Psr\\Container\\' => 
     57        'Psr\\Container\\' =>
    5858        array (
    5959            0 => __DIR__ . '/..' . '/psr/container/src',
    6060        ),
    61         'Laravel\\SerializableClosure\\' => 
     61        'Laravel\\SerializableClosure\\' =>
    6262        array (
    6363            0 => __DIR__ . '/..' . '/laravel/serializable-closure/src',
    6464        ),
    65         'Invoker\\' => 
     65        'Invoker\\' =>
    6666        array (
    6767            0 => __DIR__ . '/..' . '/php-di/invoker/src',
    6868        ),
    69         'GuzzleHttp\\Psr7\\' => 
     69        'GuzzleHttp\\Psr7\\' =>
    7070        array (
    7171            0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
    7272        ),
    73         'GuzzleHttp\\Promise\\' => 
     73        'GuzzleHttp\\Promise\\' =>
    7474        array (
    7575            0 => __DIR__ . '/..' . '/guzzlehttp/promises/src',
    7676        ),
    77         'GuzzleHttp\\' => 
     77        'GuzzleHttp\\' =>
    7878        array (
    7979            0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src',
    8080        ),
    81         'DI\\' => 
     81        'DI\\' =>
    8282        array (
    8383            0 => __DIR__ . '/..' . '/php-di/php-di/src',
    8484        ),
    85         'AcquiredComForWooCommerce\\' => 
     85        'AcquiredComForWooCommerce\\' =>
    8686        array (
    8787            0 => __DIR__ . '/../..' . '/src',
  • acquired-payments-gateway-for-woocommerce/trunk/vendor/composer/installed.php

    r3382664 r3444652  
    22    'root' => array(
    33        'name' => 'acquired-com/acquired-com-for-woocommerce',
    4         'pretty_version' => '2.0.0',
    5         'version' => '2.0.0.0',
    6         'reference' => '9253e38ea8ac62aaf43c1b5d3cf42016c3d544ff',
     4        'pretty_version' => 'v2.1.0',
     5        'version' => '2.1.0.0',
     6        'reference' => 'a93f08d0336663bc2dfb37ae5157f73e7a1b5ce4',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    1212    'versions' => array(
    1313        'acquired-com/acquired-com-for-woocommerce' => array(
    14             'pretty_version' => '2.0.0',
    15             'version' => '2.0.0.0',
    16             'reference' => '9253e38ea8ac62aaf43c1b5d3cf42016c3d544ff',
     14            'pretty_version' => 'v2.1.0',
     15            'version' => '2.1.0.0',
     16            'reference' => 'a93f08d0336663bc2dfb37ae5157f73e7a1b5ce4',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.