Plugin Directory

Changeset 3324086


Ignore:
Timestamp:
07/08/2025 07:12:38 AM (9 months ago)
Author:
thegeneration
Message:

Tagging version 4.0.1

Location:
svea-webpay-for-woocommerce
Files:
18 edited
1 copied

Legend:

Unmodified
Added
Removed
  • svea-webpay-for-woocommerce/tags/4.0.1/inc/Gateways/WC_Gateway_Abstract.php

    r3319942 r3324086  
    155155        // If no suffix is provided, use the customer's country
    156156        if ( $suffix === false ) {
    157             $customer_country = strtolower( WC()->customer->get_billing_country() );
    158 
    159             $suffix = '_' . $customer_country;
     157            $suffix = '_' . strtolower( WC()->customer->get_billing_country() );
     158        } else if ( $suffix !== '' ) {
     159            $suffix = '_' . strtolower( $suffix );
    160160        }
    161161
  • svea-webpay-for-woocommerce/tags/4.0.1/inc/Gateways/WC_Gateway_Svea_Card.php

    r3319942 r3324086  
    99use Svea_Webpay_For_Woocommerce\Helper;
    1010use Svea_Webpay_For_Woocommerce\Gateways\WC_Gateway_Abstract;
    11 use Svea_Webpay_For_Woocommerce\Service_Providers\Config_Production;
    12 use Svea_Webpay_For_Woocommerce\Service_Providers\Config_Test;
    1311use Svea_Webpay_For_Woocommerce\Traits\Singleton;
    1412use WC_Countries;
     
    107105        // Set config based on suffix
    108106        if ( ! empty( $suffix ) ) {
    109             parent::set_config( '_' . $suffix );
     107            parent::set_config( $suffix );
    110108        }
    111109
     
    559557        }
    560558
     559        if ( ! isset( $request['svea-country'] ) || ! is_string( $request['svea-country'] )
     560            || ! in_array( strtoupper( $request['svea-country'] ), Helper::ALLOWED_COUNTRIES_ASYNC, true ) ) {
     561            status_header( 400 );
     562            self::log( 'Svea country parameter in request is not set or not valid' );
     563            exit;
     564        }
     565
     566        $this->set_config( strtolower( $request['svea-country'] ) );
     567
    561568        $config = $this->get_config();
    562569
     
    815822                add_query_arg(
    816823                    [
    817                         'wc-api'   => 'wc_gateway_svea_card',
    818                         'order-id' => $wc_order->get_id(),
    819                         'key'      => $wc_order->get_order_key(),
     824                        'wc-api'       => 'wc_gateway_svea_card',
     825                        'order-id'     => $wc_order->get_id(),
     826                        'key'          => $wc_order->get_order_key(),
     827                        'svea-country' => $customer_country,
    820828                    ],
    821829                    $this->get_return_url( $wc_order )
     
    829837                        'order-id'      => $wc_order->get_id(),
    830838                        'key'           => $wc_order->get_order_key(),
     839                        'svea-country'  => $customer_country,
    831840                        'svea-callback' => true,
    832841                    ],
     
    907916            add_query_arg(
    908917                [
    909                     'wc-api'   => 'wc_gateway_svea_card',
    910                     'order-id' => $wc_order->get_id(),
    911                     'key'      => $wc_order->get_order_key(),
     918                    'wc-api'       => 'wc_gateway_svea_card',
     919                    'order-id'     => $wc_order->get_id(),
     920                    'key'          => $wc_order->get_order_key(),
     921                    'svea-country' => $customer_country,
    912922                ],
    913923                $this->get_return_url( $wc_order )
     
    918928            add_query_arg(
    919929                [
    920                     'wc-api'   => 'wc_gateway_svea_card',
    921                     'order-id' => $wc_order->get_id(),
    922                     'key'      => $wc_order->get_order_key(),
     930                    'wc-api'        => 'wc_gateway_svea_card',
     931                    'order-id'      => $wc_order->get_id(),
     932                    'key'           => $wc_order->get_order_key(),
     933                    'svea-country'  => $customer_country,
     934                    'svea-callback' => true,
    923935                ],
    924936                $this->get_return_url( $wc_order )
  • svea-webpay-for-woocommerce/tags/4.0.1/inc/Gateways/WC_Gateway_Svea_Mobilepay.php

    r3319942 r3324086  
    331331            add_query_arg(
    332332                [
    333                     'wc-api'   => 'wc_gateway_svea_mobilepay',
    334                     'order-id' => $wc_order->get_id(),
    335                     'key'      => $wc_order->get_order_key(),
     333                    'wc-api'       => 'wc_gateway_svea_mobilepay',
     334                    'order-id'     => $wc_order->get_id(),
     335                    'key'          => $wc_order->get_order_key(),
     336                    'svea-country' => $customer_country,
    336337                ],
    337338                $this->get_return_url( $wc_order )
     
    342343            add_query_arg(
    343344                [
    344                     'wc-api'   => 'wc_gateway_svea_mobilepay',
    345                     'order-id' => $wc_order->get_id(),
    346                     'key'      => $wc_order->get_order_key(),
     345                    'wc-api'        => 'wc_gateway_svea_mobilepay',
     346                    'order-id'      => $wc_order->get_id(),
     347                    'key'           => $wc_order->get_order_key(),
     348                    'svea-country'  => $customer_country,
     349                    'svea-callback' => true,
    347350                ],
    348351                $this->get_return_url( $wc_order )
  • svea-webpay-for-woocommerce/tags/4.0.1/inc/Gateways/WC_Gateway_Svea_Swish.php

    r3319942 r3324086  
    337337            add_query_arg(
    338338                [
    339                     'wc-api'   => 'wc_gateway_svea_swish',
    340                     'order-id' => $wc_order->get_id(),
    341                     'key'      => $wc_order->get_order_key(),
     339                    'wc-api'       => 'wc_gateway_svea_swish',
     340                    'order-id'     => $wc_order->get_id(),
     341                    'key'          => $wc_order->get_order_key(),
     342                    'svea-country' => $customer_country,
    342343                ],
    343344                $this->get_return_url( $wc_order )
     
    348349            add_query_arg(
    349350                [
    350                     'wc-api'   => 'wc_gateway_svea_swish',
    351                     'order-id' => $wc_order->get_id(),
    352                     'key'      => $wc_order->get_order_key(),
     351                    'wc-api'        => 'wc_gateway_svea_swish',
     352                    'order-id'      => $wc_order->get_id(),
     353                    'key'           => $wc_order->get_order_key(),
     354                    'svea-country'  => $customer_country,
     355                    'svea-callback' => true,
    353356                ],
    354357                $this->get_return_url( $wc_order )
  • svea-webpay-for-woocommerce/tags/4.0.1/inc/Gateways/WC_Gateway_Svea_Trustly.php

    r3319942 r3324086  
    338338            exit;
    339339        }
     340
     341        if ( ! isset( $request['svea-country'] ) || ! is_string( $request['svea-country'] )
     342            || ! in_array( strtoupper( $request['svea-country'] ), Helper::ALLOWED_COUNTRIES_ASYNC, true ) ) {
     343            status_header( 400 );
     344            self::log( 'Svea country parameter in request is not set or not valid' );
     345            exit;
     346        }
     347
     348        $this->set_config( strtolower( $request['svea-country'] ) );
    340349
    341350        $config = $this->get_config();
     
    537546            add_query_arg(
    538547                [
    539                     'wc-api'   => 'wc_gateway_svea_trustly',
    540                     'order-id' => $wc_order->get_id(),
    541                     'key'      => $wc_order->get_order_key(),
     548                    'wc-api'       => 'wc_gateway_svea_trustly',
     549                    'order-id'     => $wc_order->get_id(),
     550                    'key'          => $wc_order->get_order_key(),
     551                    'svea-country' => $customer_country,
    542552                ],
    543553                $this->get_return_url( $wc_order )
     
    548558            add_query_arg(
    549559                [
    550                     'wc-api'   => 'wc_gateway_svea_trustly',
    551                     'order-id' => $wc_order->get_id(),
    552                     'key'      => $wc_order->get_order_key(),
     560                    'wc-api'        => 'wc_gateway_svea_trustly',
     561                    'order-id'      => $wc_order->get_id(),
     562                    'key'           => $wc_order->get_order_key(),
     563                    'svea-country'  => $customer_country,
     564                    'svea-callback' => true,
    553565                ],
    554566                $this->get_return_url( $wc_order )
  • svea-webpay-for-woocommerce/tags/4.0.1/inc/Gateways/WC_Gateway_Svea_Vipps.php

    r3319942 r3324086  
    333333            add_query_arg(
    334334                [
    335                     'wc-api'   => 'wc_gateway_svea_vipps',
    336                     'order-id' => $wc_order->get_id(),
    337                     'key'      => $wc_order->get_order_key(),
     335                    'wc-api'       => 'wc_gateway_svea_vipps',
     336                    'order-id'     => $wc_order->get_id(),
     337                    'key'          => $wc_order->get_order_key(),
     338                    'svea-country' => $customer_country,
    338339                ],
    339340                $this->get_return_url( $wc_order )
     
    344345            add_query_arg(
    345346                [
    346                     'wc-api'   => 'wc_gateway_svea_vipps',
    347                     'order-id' => $wc_order->get_id(),
    348                     'key'      => $wc_order->get_order_key(),
     347                    'wc-api'        => 'wc_gateway_svea_vipps',
     348                    'order-id'      => $wc_order->get_id(),
     349                    'key'           => $wc_order->get_order_key(),
     350                    'svea-country'  => $customer_country,
     351                    'svea-callback' => true,
    349352                ],
    350353                $this->get_return_url( $wc_order )
  • svea-webpay-for-woocommerce/tags/4.0.1/inc/Traits/Default_Payment_Callback.php

    r3319942 r3324086  
    5757            exit;
    5858        }
     59
     60        if ( ! isset( $request['svea-country'] ) || ! is_string( $request['svea-country'] )
     61            || ! in_array( strtoupper( $request['svea-country'] ), Helper::ALLOWED_COUNTRIES_ASYNC, true ) ) {
     62            status_header( 400 );
     63            self::log( 'Svea country parameter in request is not set or not valid' );
     64            exit;
     65        }
     66
     67        $this->set_config( strtolower( $request['svea-country'] ) );
    5968
    6069        $config = $this->get_config();
  • svea-webpay-for-woocommerce/tags/4.0.1/readme.txt

    r3319942 r3324086  
    44Donate link: https://www.svea.com/
    55Requires at least: 4.9
    6 Tested up to: 6.5.0
     6Tested up to: 6.8.1
    77Requires PHP: 7.0
    88WC requires at least: 4.0.0
     
    1010License: Apache 2.0
    1111License URI: https://www.apache.org/licenses/LICENSE-2.0
    12 Stable tag: 4.0.0
     12Stable tag: 4.0.1
    1313
    1414The Svea Stand Alone payment module is a complete solution for shops using WordPress / WooCommerce as an e-commerce platform.
     
    3939== Upgrade Notice ==
    4040
     41= 4.0.1 =
     424.0.1 is a patch release.
     43
    4144= 4.0.0 =
    42454.0.0 is a major release.
     
    5154
    5255== Changelog ==
     56
     57= 4.0.1 2025-07-08 =
     58* Prevent errors with card payments for stores upgrading from < 4.0.0.
    5359
    5460= 4.0.0 2025-06-30 =
  • svea-webpay-for-woocommerce/tags/4.0.1/svea-webpay-for-woocommerce.php

    r3319942 r3324086  
    44 * Plugin Name: Svea Stand Alone for WooCommerce
    55 * Description: Supercharge your WooCommerce Store with powerful features to pay via Svea Credit card, Invoice, Part Payment, Trustly, Swish, MobilePay and Vipps.
    6  * Version: 4.0.0
     6 * Version: 4.0.1
    77 * Author: The Generation
    88 * Author URI: https://thegeneration.se/
     
    3737         * @var     string
    3838         */
    39         const VERSION = '4.0.0';
     39        const VERSION = '4.0.1';
    4040
    4141        /**
  • svea-webpay-for-woocommerce/trunk/inc/Gateways/WC_Gateway_Abstract.php

    r3319942 r3324086  
    155155        // If no suffix is provided, use the customer's country
    156156        if ( $suffix === false ) {
    157             $customer_country = strtolower( WC()->customer->get_billing_country() );
    158 
    159             $suffix = '_' . $customer_country;
     157            $suffix = '_' . strtolower( WC()->customer->get_billing_country() );
     158        } else if ( $suffix !== '' ) {
     159            $suffix = '_' . strtolower( $suffix );
    160160        }
    161161
  • svea-webpay-for-woocommerce/trunk/inc/Gateways/WC_Gateway_Svea_Card.php

    r3319942 r3324086  
    99use Svea_Webpay_For_Woocommerce\Helper;
    1010use Svea_Webpay_For_Woocommerce\Gateways\WC_Gateway_Abstract;
    11 use Svea_Webpay_For_Woocommerce\Service_Providers\Config_Production;
    12 use Svea_Webpay_For_Woocommerce\Service_Providers\Config_Test;
    1311use Svea_Webpay_For_Woocommerce\Traits\Singleton;
    1412use WC_Countries;
     
    107105        // Set config based on suffix
    108106        if ( ! empty( $suffix ) ) {
    109             parent::set_config( '_' . $suffix );
     107            parent::set_config( $suffix );
    110108        }
    111109
     
    559557        }
    560558
     559        if ( ! isset( $request['svea-country'] ) || ! is_string( $request['svea-country'] )
     560            || ! in_array( strtoupper( $request['svea-country'] ), Helper::ALLOWED_COUNTRIES_ASYNC, true ) ) {
     561            status_header( 400 );
     562            self::log( 'Svea country parameter in request is not set or not valid' );
     563            exit;
     564        }
     565
     566        $this->set_config( strtolower( $request['svea-country'] ) );
     567
    561568        $config = $this->get_config();
    562569
     
    815822                add_query_arg(
    816823                    [
    817                         'wc-api'   => 'wc_gateway_svea_card',
    818                         'order-id' => $wc_order->get_id(),
    819                         'key'      => $wc_order->get_order_key(),
     824                        'wc-api'       => 'wc_gateway_svea_card',
     825                        'order-id'     => $wc_order->get_id(),
     826                        'key'          => $wc_order->get_order_key(),
     827                        'svea-country' => $customer_country,
    820828                    ],
    821829                    $this->get_return_url( $wc_order )
     
    829837                        'order-id'      => $wc_order->get_id(),
    830838                        'key'           => $wc_order->get_order_key(),
     839                        'svea-country'  => $customer_country,
    831840                        'svea-callback' => true,
    832841                    ],
     
    907916            add_query_arg(
    908917                [
    909                     'wc-api'   => 'wc_gateway_svea_card',
    910                     'order-id' => $wc_order->get_id(),
    911                     'key'      => $wc_order->get_order_key(),
     918                    'wc-api'       => 'wc_gateway_svea_card',
     919                    'order-id'     => $wc_order->get_id(),
     920                    'key'          => $wc_order->get_order_key(),
     921                    'svea-country' => $customer_country,
    912922                ],
    913923                $this->get_return_url( $wc_order )
     
    918928            add_query_arg(
    919929                [
    920                     'wc-api'   => 'wc_gateway_svea_card',
    921                     'order-id' => $wc_order->get_id(),
    922                     'key'      => $wc_order->get_order_key(),
     930                    'wc-api'        => 'wc_gateway_svea_card',
     931                    'order-id'      => $wc_order->get_id(),
     932                    'key'           => $wc_order->get_order_key(),
     933                    'svea-country'  => $customer_country,
     934                    'svea-callback' => true,
    923935                ],
    924936                $this->get_return_url( $wc_order )
  • svea-webpay-for-woocommerce/trunk/inc/Gateways/WC_Gateway_Svea_Mobilepay.php

    r3319942 r3324086  
    331331            add_query_arg(
    332332                [
    333                     'wc-api'   => 'wc_gateway_svea_mobilepay',
    334                     'order-id' => $wc_order->get_id(),
    335                     'key'      => $wc_order->get_order_key(),
     333                    'wc-api'       => 'wc_gateway_svea_mobilepay',
     334                    'order-id'     => $wc_order->get_id(),
     335                    'key'          => $wc_order->get_order_key(),
     336                    'svea-country' => $customer_country,
    336337                ],
    337338                $this->get_return_url( $wc_order )
     
    342343            add_query_arg(
    343344                [
    344                     'wc-api'   => 'wc_gateway_svea_mobilepay',
    345                     'order-id' => $wc_order->get_id(),
    346                     'key'      => $wc_order->get_order_key(),
     345                    'wc-api'        => 'wc_gateway_svea_mobilepay',
     346                    'order-id'      => $wc_order->get_id(),
     347                    'key'           => $wc_order->get_order_key(),
     348                    'svea-country'  => $customer_country,
     349                    'svea-callback' => true,
    347350                ],
    348351                $this->get_return_url( $wc_order )
  • svea-webpay-for-woocommerce/trunk/inc/Gateways/WC_Gateway_Svea_Swish.php

    r3319942 r3324086  
    337337            add_query_arg(
    338338                [
    339                     'wc-api'   => 'wc_gateway_svea_swish',
    340                     'order-id' => $wc_order->get_id(),
    341                     'key'      => $wc_order->get_order_key(),
     339                    'wc-api'       => 'wc_gateway_svea_swish',
     340                    'order-id'     => $wc_order->get_id(),
     341                    'key'          => $wc_order->get_order_key(),
     342                    'svea-country' => $customer_country,
    342343                ],
    343344                $this->get_return_url( $wc_order )
     
    348349            add_query_arg(
    349350                [
    350                     'wc-api'   => 'wc_gateway_svea_swish',
    351                     'order-id' => $wc_order->get_id(),
    352                     'key'      => $wc_order->get_order_key(),
     351                    'wc-api'        => 'wc_gateway_svea_swish',
     352                    'order-id'      => $wc_order->get_id(),
     353                    'key'           => $wc_order->get_order_key(),
     354                    'svea-country'  => $customer_country,
     355                    'svea-callback' => true,
    353356                ],
    354357                $this->get_return_url( $wc_order )
  • svea-webpay-for-woocommerce/trunk/inc/Gateways/WC_Gateway_Svea_Trustly.php

    r3319942 r3324086  
    338338            exit;
    339339        }
     340
     341        if ( ! isset( $request['svea-country'] ) || ! is_string( $request['svea-country'] )
     342            || ! in_array( strtoupper( $request['svea-country'] ), Helper::ALLOWED_COUNTRIES_ASYNC, true ) ) {
     343            status_header( 400 );
     344            self::log( 'Svea country parameter in request is not set or not valid' );
     345            exit;
     346        }
     347
     348        $this->set_config( strtolower( $request['svea-country'] ) );
    340349
    341350        $config = $this->get_config();
     
    537546            add_query_arg(
    538547                [
    539                     'wc-api'   => 'wc_gateway_svea_trustly',
    540                     'order-id' => $wc_order->get_id(),
    541                     'key'      => $wc_order->get_order_key(),
     548                    'wc-api'       => 'wc_gateway_svea_trustly',
     549                    'order-id'     => $wc_order->get_id(),
     550                    'key'          => $wc_order->get_order_key(),
     551                    'svea-country' => $customer_country,
    542552                ],
    543553                $this->get_return_url( $wc_order )
     
    548558            add_query_arg(
    549559                [
    550                     'wc-api'   => 'wc_gateway_svea_trustly',
    551                     'order-id' => $wc_order->get_id(),
    552                     'key'      => $wc_order->get_order_key(),
     560                    'wc-api'        => 'wc_gateway_svea_trustly',
     561                    'order-id'      => $wc_order->get_id(),
     562                    'key'           => $wc_order->get_order_key(),
     563                    'svea-country'  => $customer_country,
     564                    'svea-callback' => true,
    553565                ],
    554566                $this->get_return_url( $wc_order )
  • svea-webpay-for-woocommerce/trunk/inc/Gateways/WC_Gateway_Svea_Vipps.php

    r3319942 r3324086  
    333333            add_query_arg(
    334334                [
    335                     'wc-api'   => 'wc_gateway_svea_vipps',
    336                     'order-id' => $wc_order->get_id(),
    337                     'key'      => $wc_order->get_order_key(),
     335                    'wc-api'       => 'wc_gateway_svea_vipps',
     336                    'order-id'     => $wc_order->get_id(),
     337                    'key'          => $wc_order->get_order_key(),
     338                    'svea-country' => $customer_country,
    338339                ],
    339340                $this->get_return_url( $wc_order )
     
    344345            add_query_arg(
    345346                [
    346                     'wc-api'   => 'wc_gateway_svea_vipps',
    347                     'order-id' => $wc_order->get_id(),
    348                     'key'      => $wc_order->get_order_key(),
     347                    'wc-api'        => 'wc_gateway_svea_vipps',
     348                    'order-id'      => $wc_order->get_id(),
     349                    'key'           => $wc_order->get_order_key(),
     350                    'svea-country'  => $customer_country,
     351                    'svea-callback' => true,
    349352                ],
    350353                $this->get_return_url( $wc_order )
  • svea-webpay-for-woocommerce/trunk/inc/Traits/Default_Payment_Callback.php

    r3319942 r3324086  
    5757            exit;
    5858        }
     59
     60        if ( ! isset( $request['svea-country'] ) || ! is_string( $request['svea-country'] )
     61            || ! in_array( strtoupper( $request['svea-country'] ), Helper::ALLOWED_COUNTRIES_ASYNC, true ) ) {
     62            status_header( 400 );
     63            self::log( 'Svea country parameter in request is not set or not valid' );
     64            exit;
     65        }
     66
     67        $this->set_config( strtolower( $request['svea-country'] ) );
    5968
    6069        $config = $this->get_config();
  • svea-webpay-for-woocommerce/trunk/readme.txt

    r3319942 r3324086  
    44Donate link: https://www.svea.com/
    55Requires at least: 4.9
    6 Tested up to: 6.5.0
     6Tested up to: 6.8.1
    77Requires PHP: 7.0
    88WC requires at least: 4.0.0
     
    1010License: Apache 2.0
    1111License URI: https://www.apache.org/licenses/LICENSE-2.0
    12 Stable tag: 4.0.0
     12Stable tag: 4.0.1
    1313
    1414The Svea Stand Alone payment module is a complete solution for shops using WordPress / WooCommerce as an e-commerce platform.
     
    3939== Upgrade Notice ==
    4040
     41= 4.0.1 =
     424.0.1 is a patch release.
     43
    4144= 4.0.0 =
    42454.0.0 is a major release.
     
    5154
    5255== Changelog ==
     56
     57= 4.0.1 2025-07-08 =
     58* Prevent errors with card payments for stores upgrading from < 4.0.0.
    5359
    5460= 4.0.0 2025-06-30 =
  • svea-webpay-for-woocommerce/trunk/svea-webpay-for-woocommerce.php

    r3319942 r3324086  
    44 * Plugin Name: Svea Stand Alone for WooCommerce
    55 * Description: Supercharge your WooCommerce Store with powerful features to pay via Svea Credit card, Invoice, Part Payment, Trustly, Swish, MobilePay and Vipps.
    6  * Version: 4.0.0
     6 * Version: 4.0.1
    77 * Author: The Generation
    88 * Author URI: https://thegeneration.se/
     
    3737         * @var     string
    3838         */
    39         const VERSION = '4.0.0';
     39        const VERSION = '4.0.1';
    4040
    4141        /**
Note: See TracChangeset for help on using the changeset viewer.