Changeset 3324086
- Timestamp:
- 07/08/2025 07:12:38 AM (9 months ago)
- Location:
- svea-webpay-for-woocommerce
- Files:
-
- 18 edited
- 1 copied
-
tags/4.0.1 (copied) (copied from svea-webpay-for-woocommerce/trunk)
-
tags/4.0.1/inc/Gateways/WC_Gateway_Abstract.php (modified) (1 diff)
-
tags/4.0.1/inc/Gateways/WC_Gateway_Svea_Card.php (modified) (7 diffs)
-
tags/4.0.1/inc/Gateways/WC_Gateway_Svea_Mobilepay.php (modified) (2 diffs)
-
tags/4.0.1/inc/Gateways/WC_Gateway_Svea_Swish.php (modified) (2 diffs)
-
tags/4.0.1/inc/Gateways/WC_Gateway_Svea_Trustly.php (modified) (3 diffs)
-
tags/4.0.1/inc/Gateways/WC_Gateway_Svea_Vipps.php (modified) (2 diffs)
-
tags/4.0.1/inc/Traits/Default_Payment_Callback.php (modified) (1 diff)
-
tags/4.0.1/readme.txt (modified) (4 diffs)
-
tags/4.0.1/svea-webpay-for-woocommerce.php (modified) (2 diffs)
-
trunk/inc/Gateways/WC_Gateway_Abstract.php (modified) (1 diff)
-
trunk/inc/Gateways/WC_Gateway_Svea_Card.php (modified) (7 diffs)
-
trunk/inc/Gateways/WC_Gateway_Svea_Mobilepay.php (modified) (2 diffs)
-
trunk/inc/Gateways/WC_Gateway_Svea_Swish.php (modified) (2 diffs)
-
trunk/inc/Gateways/WC_Gateway_Svea_Trustly.php (modified) (3 diffs)
-
trunk/inc/Gateways/WC_Gateway_Svea_Vipps.php (modified) (2 diffs)
-
trunk/inc/Traits/Default_Payment_Callback.php (modified) (1 diff)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/svea-webpay-for-woocommerce.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
svea-webpay-for-woocommerce/tags/4.0.1/inc/Gateways/WC_Gateway_Abstract.php
r3319942 r3324086 155 155 // If no suffix is provided, use the customer's country 156 156 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 ); 160 160 } 161 161 -
svea-webpay-for-woocommerce/tags/4.0.1/inc/Gateways/WC_Gateway_Svea_Card.php
r3319942 r3324086 9 9 use Svea_Webpay_For_Woocommerce\Helper; 10 10 use 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;13 11 use Svea_Webpay_For_Woocommerce\Traits\Singleton; 14 12 use WC_Countries; … … 107 105 // Set config based on suffix 108 106 if ( ! empty( $suffix ) ) { 109 parent::set_config( '_' .$suffix );107 parent::set_config( $suffix ); 110 108 } 111 109 … … 559 557 } 560 558 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 561 568 $config = $this->get_config(); 562 569 … … 815 822 add_query_arg( 816 823 [ 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, 820 828 ], 821 829 $this->get_return_url( $wc_order ) … … 829 837 'order-id' => $wc_order->get_id(), 830 838 'key' => $wc_order->get_order_key(), 839 'svea-country' => $customer_country, 831 840 'svea-callback' => true, 832 841 ], … … 907 916 add_query_arg( 908 917 [ 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, 912 922 ], 913 923 $this->get_return_url( $wc_order ) … … 918 928 add_query_arg( 919 929 [ 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, 923 935 ], 924 936 $this->get_return_url( $wc_order ) -
svea-webpay-for-woocommerce/tags/4.0.1/inc/Gateways/WC_Gateway_Svea_Mobilepay.php
r3319942 r3324086 331 331 add_query_arg( 332 332 [ 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, 336 337 ], 337 338 $this->get_return_url( $wc_order ) … … 342 343 add_query_arg( 343 344 [ 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, 347 350 ], 348 351 $this->get_return_url( $wc_order ) -
svea-webpay-for-woocommerce/tags/4.0.1/inc/Gateways/WC_Gateway_Svea_Swish.php
r3319942 r3324086 337 337 add_query_arg( 338 338 [ 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, 342 343 ], 343 344 $this->get_return_url( $wc_order ) … … 348 349 add_query_arg( 349 350 [ 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, 353 356 ], 354 357 $this->get_return_url( $wc_order ) -
svea-webpay-for-woocommerce/tags/4.0.1/inc/Gateways/WC_Gateway_Svea_Trustly.php
r3319942 r3324086 338 338 exit; 339 339 } 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'] ) ); 340 349 341 350 $config = $this->get_config(); … … 537 546 add_query_arg( 538 547 [ 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, 542 552 ], 543 553 $this->get_return_url( $wc_order ) … … 548 558 add_query_arg( 549 559 [ 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, 553 565 ], 554 566 $this->get_return_url( $wc_order ) -
svea-webpay-for-woocommerce/tags/4.0.1/inc/Gateways/WC_Gateway_Svea_Vipps.php
r3319942 r3324086 333 333 add_query_arg( 334 334 [ 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, 338 339 ], 339 340 $this->get_return_url( $wc_order ) … … 344 345 add_query_arg( 345 346 [ 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, 349 352 ], 350 353 $this->get_return_url( $wc_order ) -
svea-webpay-for-woocommerce/tags/4.0.1/inc/Traits/Default_Payment_Callback.php
r3319942 r3324086 57 57 exit; 58 58 } 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'] ) ); 59 68 60 69 $config = $this->get_config(); -
svea-webpay-for-woocommerce/tags/4.0.1/readme.txt
r3319942 r3324086 4 4 Donate link: https://www.svea.com/ 5 5 Requires at least: 4.9 6 Tested up to: 6. 5.06 Tested up to: 6.8.1 7 7 Requires PHP: 7.0 8 8 WC requires at least: 4.0.0 … … 10 10 License: Apache 2.0 11 11 License URI: https://www.apache.org/licenses/LICENSE-2.0 12 Stable tag: 4.0. 012 Stable tag: 4.0.1 13 13 14 14 The Svea Stand Alone payment module is a complete solution for shops using WordPress / WooCommerce as an e-commerce platform. … … 39 39 == Upgrade Notice == 40 40 41 = 4.0.1 = 42 4.0.1 is a patch release. 43 41 44 = 4.0.0 = 42 45 4.0.0 is a major release. … … 51 54 52 55 == Changelog == 56 57 = 4.0.1 2025-07-08 = 58 * Prevent errors with card payments for stores upgrading from < 4.0.0. 53 59 54 60 = 4.0.0 2025-06-30 = -
svea-webpay-for-woocommerce/tags/4.0.1/svea-webpay-for-woocommerce.php
r3319942 r3324086 4 4 * Plugin Name: Svea Stand Alone for WooCommerce 5 5 * 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. 06 * Version: 4.0.1 7 7 * Author: The Generation 8 8 * Author URI: https://thegeneration.se/ … … 37 37 * @var string 38 38 */ 39 const VERSION = '4.0. 0';39 const VERSION = '4.0.1'; 40 40 41 41 /** -
svea-webpay-for-woocommerce/trunk/inc/Gateways/WC_Gateway_Abstract.php
r3319942 r3324086 155 155 // If no suffix is provided, use the customer's country 156 156 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 ); 160 160 } 161 161 -
svea-webpay-for-woocommerce/trunk/inc/Gateways/WC_Gateway_Svea_Card.php
r3319942 r3324086 9 9 use Svea_Webpay_For_Woocommerce\Helper; 10 10 use 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;13 11 use Svea_Webpay_For_Woocommerce\Traits\Singleton; 14 12 use WC_Countries; … … 107 105 // Set config based on suffix 108 106 if ( ! empty( $suffix ) ) { 109 parent::set_config( '_' .$suffix );107 parent::set_config( $suffix ); 110 108 } 111 109 … … 559 557 } 560 558 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 561 568 $config = $this->get_config(); 562 569 … … 815 822 add_query_arg( 816 823 [ 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, 820 828 ], 821 829 $this->get_return_url( $wc_order ) … … 829 837 'order-id' => $wc_order->get_id(), 830 838 'key' => $wc_order->get_order_key(), 839 'svea-country' => $customer_country, 831 840 'svea-callback' => true, 832 841 ], … … 907 916 add_query_arg( 908 917 [ 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, 912 922 ], 913 923 $this->get_return_url( $wc_order ) … … 918 928 add_query_arg( 919 929 [ 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, 923 935 ], 924 936 $this->get_return_url( $wc_order ) -
svea-webpay-for-woocommerce/trunk/inc/Gateways/WC_Gateway_Svea_Mobilepay.php
r3319942 r3324086 331 331 add_query_arg( 332 332 [ 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, 336 337 ], 337 338 $this->get_return_url( $wc_order ) … … 342 343 add_query_arg( 343 344 [ 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, 347 350 ], 348 351 $this->get_return_url( $wc_order ) -
svea-webpay-for-woocommerce/trunk/inc/Gateways/WC_Gateway_Svea_Swish.php
r3319942 r3324086 337 337 add_query_arg( 338 338 [ 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, 342 343 ], 343 344 $this->get_return_url( $wc_order ) … … 348 349 add_query_arg( 349 350 [ 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, 353 356 ], 354 357 $this->get_return_url( $wc_order ) -
svea-webpay-for-woocommerce/trunk/inc/Gateways/WC_Gateway_Svea_Trustly.php
r3319942 r3324086 338 338 exit; 339 339 } 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'] ) ); 340 349 341 350 $config = $this->get_config(); … … 537 546 add_query_arg( 538 547 [ 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, 542 552 ], 543 553 $this->get_return_url( $wc_order ) … … 548 558 add_query_arg( 549 559 [ 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, 553 565 ], 554 566 $this->get_return_url( $wc_order ) -
svea-webpay-for-woocommerce/trunk/inc/Gateways/WC_Gateway_Svea_Vipps.php
r3319942 r3324086 333 333 add_query_arg( 334 334 [ 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, 338 339 ], 339 340 $this->get_return_url( $wc_order ) … … 344 345 add_query_arg( 345 346 [ 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, 349 352 ], 350 353 $this->get_return_url( $wc_order ) -
svea-webpay-for-woocommerce/trunk/inc/Traits/Default_Payment_Callback.php
r3319942 r3324086 57 57 exit; 58 58 } 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'] ) ); 59 68 60 69 $config = $this->get_config(); -
svea-webpay-for-woocommerce/trunk/readme.txt
r3319942 r3324086 4 4 Donate link: https://www.svea.com/ 5 5 Requires at least: 4.9 6 Tested up to: 6. 5.06 Tested up to: 6.8.1 7 7 Requires PHP: 7.0 8 8 WC requires at least: 4.0.0 … … 10 10 License: Apache 2.0 11 11 License URI: https://www.apache.org/licenses/LICENSE-2.0 12 Stable tag: 4.0. 012 Stable tag: 4.0.1 13 13 14 14 The Svea Stand Alone payment module is a complete solution for shops using WordPress / WooCommerce as an e-commerce platform. … … 39 39 == Upgrade Notice == 40 40 41 = 4.0.1 = 42 4.0.1 is a patch release. 43 41 44 = 4.0.0 = 42 45 4.0.0 is a major release. … … 51 54 52 55 == Changelog == 56 57 = 4.0.1 2025-07-08 = 58 * Prevent errors with card payments for stores upgrading from < 4.0.0. 53 59 54 60 = 4.0.0 2025-06-30 = -
svea-webpay-for-woocommerce/trunk/svea-webpay-for-woocommerce.php
r3319942 r3324086 4 4 * Plugin Name: Svea Stand Alone for WooCommerce 5 5 * 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. 06 * Version: 4.0.1 7 7 * Author: The Generation 8 8 * Author URI: https://thegeneration.se/ … … 37 37 * @var string 38 38 */ 39 const VERSION = '4.0. 0';39 const VERSION = '4.0.1'; 40 40 41 41 /**
Note: See TracChangeset
for help on using the changeset viewer.