Plugin Directory

Changeset 3327589


Ignore:
Timestamp:
07/14/2025 02:53:11 PM (9 months ago)
Author:
thegeneration
Message:

Tagging version 4.0.2

Location:
svea-webpay-for-woocommerce
Files:
4 added
44 edited
1 copied

Legend:

Unmodified
Added
Removed
  • svea-webpay-for-woocommerce/tags/4.0.2/inc/Scripts.php

    r3319942 r3327589  
    128128        ];
    129129
    130         $svea_data['isPayPage'] = is_checkout() ? true : false;
     130        $svea_data['isPayPage'] = is_checkout_pay_page() ? true : false;
    131131
    132132        if ( is_checkout_pay_page() ) {
  • svea-webpay-for-woocommerce/tags/4.0.2/readme.txt

    r3324086 r3327589  
    1010License: Apache 2.0
    1111License URI: https://www.apache.org/licenses/LICENSE-2.0
    12 Stable tag: 4.0.1
     12Stable tag: 4.0.2
    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.2 =
     424.0.2 is a patch release.
     43
    4144= 4.0.1 =
    42454.0.1 is a patch release.
     
    5457
    5558== Changelog ==
     59
     60= 4.0.2 2025-07-09 =
     61* Correct pay page logic, fixing issues with get address.
    5662
    5763= 4.0.1 2025-07-08 =
  • svea-webpay-for-woocommerce/tags/4.0.2/svea-webpay-for-woocommerce.php

    r3324086 r3327589  
    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.1
     6 * Version: 4.0.2
    77 * Author: The Generation
    88 * Author URI: https://thegeneration.se/
     
    3737         * @var     string
    3838         */
    39         const VERSION = '4.0.1';
     39        const VERSION = '4.0.2';
    4040
    4141        /**
  • svea-webpay-for-woocommerce/tags/4.0.2/vendor/autoload.php

    r3319942 r3327589  
    2020require_once __DIR__ . '/composer/autoload_real.php';
    2121
    22 return ComposerAutoloaderInit33686362a7e49595b5bc1ca0cfcfc4ae::getLoader();
     22return ComposerAutoloaderInitbc30d1434a3a88a158b0c9e929d8f6f0::getLoader();
  • svea-webpay-for-woocommerce/tags/4.0.2/vendor/composer/autoload_classmap.php

    r3319942 r3327589  
    2828    'Svea\\Checkout\\Implementation\\Admin\\ReplaceOrderRows' => $vendorDir . '/sveaekonomi/checkout/src/Implementation/Admin/ReplaceOrderRows.php',
    2929    'Svea\\Checkout\\Implementation\\Admin\\UpdateOrderRow' => $vendorDir . '/sveaekonomi/checkout/src/Implementation/Admin/UpdateOrderRow.php',
     30    'Svea\\Checkout\\Implementation\\ChangePaymentMethod' => $vendorDir . '/sveaekonomi/checkout/src/Implementation/ChangePaymentMethod.php',
    3031    'Svea\\Checkout\\Implementation\\CreateOrder' => $vendorDir . '/sveaekonomi/checkout/src/Implementation/CreateOrder.php',
    3132    'Svea\\Checkout\\Implementation\\CreateTokenOrder' => $vendorDir . '/sveaekonomi/checkout/src/Implementation/CreateTokenOrder.php',
     
    5960    'Svea\\Checkout\\Validation\\Admin\\ValidateReplaceOrderRowsData' => $vendorDir . '/sveaekonomi/checkout/src/Validation/Admin/ValidateReplaceOrderRowsData.php',
    6061    'Svea\\Checkout\\Validation\\Admin\\ValidateUpdateOrderRowData' => $vendorDir . '/sveaekonomi/checkout/src/Validation/Admin/ValidateUpdateOrderRowData.php',
     62    'Svea\\Checkout\\Validation\\ValidateChangePaymentMethodData' => $vendorDir . '/sveaekonomi/checkout/src/Validation/ValidateChangePaymentMethodData.php',
    6163    'Svea\\Checkout\\Validation\\ValidateCreateOrderData' => $vendorDir . '/sveaekonomi/checkout/src/Validation/ValidateCreateOrderData.php',
    6264    'Svea\\Checkout\\Validation\\ValidateCreateTokenOrderData' => $vendorDir . '/sveaekonomi/checkout/src/Validation/ValidateCreateTokenOrderData.php',
  • svea-webpay-for-woocommerce/tags/4.0.2/vendor/composer/autoload_real.php

    r3319942 r3327589  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit33686362a7e49595b5bc1ca0cfcfc4ae
     5class ComposerAutoloaderInitbc30d1434a3a88a158b0c9e929d8f6f0
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInit33686362a7e49595b5bc1ca0cfcfc4ae', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInitbc30d1434a3a88a158b0c9e929d8f6f0', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit33686362a7e49595b5bc1ca0cfcfc4ae', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInitbc30d1434a3a88a158b0c9e929d8f6f0', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticInit33686362a7e49595b5bc1ca0cfcfc4ae::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInitbc30d1434a3a88a158b0c9e929d8f6f0::getInitializer($loader));
    3333
    3434        $loader->register(true);
  • svea-webpay-for-woocommerce/tags/4.0.2/vendor/composer/autoload_static.php

    r3319942 r3327589  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit33686362a7e49595b5bc1ca0cfcfc4ae
     7class ComposerStaticInitbc30d1434a3a88a158b0c9e929d8f6f0
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    5353        'Svea\\Checkout\\Implementation\\Admin\\ReplaceOrderRows' => __DIR__ . '/..' . '/sveaekonomi/checkout/src/Implementation/Admin/ReplaceOrderRows.php',
    5454        'Svea\\Checkout\\Implementation\\Admin\\UpdateOrderRow' => __DIR__ . '/..' . '/sveaekonomi/checkout/src/Implementation/Admin/UpdateOrderRow.php',
     55        'Svea\\Checkout\\Implementation\\ChangePaymentMethod' => __DIR__ . '/..' . '/sveaekonomi/checkout/src/Implementation/ChangePaymentMethod.php',
    5556        'Svea\\Checkout\\Implementation\\CreateOrder' => __DIR__ . '/..' . '/sveaekonomi/checkout/src/Implementation/CreateOrder.php',
    5657        'Svea\\Checkout\\Implementation\\CreateTokenOrder' => __DIR__ . '/..' . '/sveaekonomi/checkout/src/Implementation/CreateTokenOrder.php',
     
    8485        'Svea\\Checkout\\Validation\\Admin\\ValidateReplaceOrderRowsData' => __DIR__ . '/..' . '/sveaekonomi/checkout/src/Validation/Admin/ValidateReplaceOrderRowsData.php',
    8586        'Svea\\Checkout\\Validation\\Admin\\ValidateUpdateOrderRowData' => __DIR__ . '/..' . '/sveaekonomi/checkout/src/Validation/Admin/ValidateUpdateOrderRowData.php',
     87        'Svea\\Checkout\\Validation\\ValidateChangePaymentMethodData' => __DIR__ . '/..' . '/sveaekonomi/checkout/src/Validation/ValidateChangePaymentMethodData.php',
    8688        'Svea\\Checkout\\Validation\\ValidateCreateOrderData' => __DIR__ . '/..' . '/sveaekonomi/checkout/src/Validation/ValidateCreateOrderData.php',
    8789        'Svea\\Checkout\\Validation\\ValidateCreateTokenOrderData' => __DIR__ . '/..' . '/sveaekonomi/checkout/src/Validation/ValidateCreateTokenOrderData.php',
     
    342344    {
    343345        return \Closure::bind(function () use ($loader) {
    344             $loader->prefixLengthsPsr4 = ComposerStaticInit33686362a7e49595b5bc1ca0cfcfc4ae::$prefixLengthsPsr4;
    345             $loader->prefixDirsPsr4 = ComposerStaticInit33686362a7e49595b5bc1ca0cfcfc4ae::$prefixDirsPsr4;
    346             $loader->classMap = ComposerStaticInit33686362a7e49595b5bc1ca0cfcfc4ae::$classMap;
     346            $loader->prefixLengthsPsr4 = ComposerStaticInitbc30d1434a3a88a158b0c9e929d8f6f0::$prefixLengthsPsr4;
     347            $loader->prefixDirsPsr4 = ComposerStaticInitbc30d1434a3a88a158b0c9e929d8f6f0::$prefixDirsPsr4;
     348            $loader->classMap = ComposerStaticInitbc30d1434a3a88a158b0c9e929d8f6f0::$classMap;
    347349
    348350        }, null, ClassLoader::class);
  • svea-webpay-for-woocommerce/tags/4.0.2/vendor/composer/installed.json

    r3319942 r3327589  
    33        {
    44            "name": "sveaekonomi/checkout",
    5             "version": "1.5.3",
    6             "version_normalized": "1.5.3.0",
     5            "version": "1.6.0",
     6            "version_normalized": "1.6.0.0",
    77            "source": {
    88                "type": "git",
    99                "url": "https://github.com/sveawebpay/php-checkout.git",
    10                 "reference": "6241c3f894322775a8d574843f56bf1e2df884c1"
     10                "reference": "d184c949b60b96595cb786320bf049a5fbaf91df"
    1111            },
    1212            "dist": {
    1313                "type": "zip",
    14                 "url": "https://api.github.com/repos/sveawebpay/php-checkout/zipball/6241c3f894322775a8d574843f56bf1e2df884c1",
    15                 "reference": "6241c3f894322775a8d574843f56bf1e2df884c1",
     14                "url": "https://api.github.com/repos/sveawebpay/php-checkout/zipball/d184c949b60b96595cb786320bf049a5fbaf91df",
     15                "reference": "d184c949b60b96595cb786320bf049a5fbaf91df",
    1616                "shasum": ""
    1717            },
     
    2929                "symfony/dependency-injection": "^2.7.51 || ^2.8.50 || ^3.4.26 || ^4.1.12 || ^4.2.7"
    3030            },
    31             "time": "2024-11-13T10:20:09+00:00",
     31            "time": "2025-06-30T13:03:15+00:00",
    3232            "type": "library",
    3333            "installation-source": "dist",
     
    5050            "support": {
    5151                "issues": "https://github.com/sveawebpay/php-checkout/issues",
    52                 "source": "https://github.com/sveawebpay/php-checkout/tree/1.5.3"
     52                "source": "https://github.com/sveawebpay/php-checkout/tree/1.6.0"
    5353            },
    5454            "install-path": "../sveaekonomi/checkout"
     
    5656        {
    5757            "name": "sveaekonomi/webpay",
    58             "version": "3.16.0",
    59             "version_normalized": "3.16.0.0",
     58            "version": "3.16.1",
     59            "version_normalized": "3.16.1.0",
    6060            "source": {
    6161                "type": "git",
    6262                "url": "https://github.com/sveawebpay/php-integration.git",
    63                 "reference": "deda4e94e2558d8de02887425e8dc5fa241376b7"
     63                "reference": "277dccf36e9bc7c82530cdf8d3572ec5c2e98810"
    6464            },
    6565            "dist": {
    6666                "type": "zip",
    67                 "url": "https://api.github.com/repos/sveawebpay/php-integration/zipball/deda4e94e2558d8de02887425e8dc5fa241376b7",
    68                 "reference": "deda4e94e2558d8de02887425e8dc5fa241376b7",
     67                "url": "https://api.github.com/repos/sveawebpay/php-integration/zipball/277dccf36e9bc7c82530cdf8d3572ec5c2e98810",
     68                "reference": "277dccf36e9bc7c82530cdf8d3572ec5c2e98810",
    6969                "shasum": ""
    7070            },
     
    7878                "phpunit/phpunit": "^8"
    7979            },
    80             "time": "2025-06-26T08:40:15+00:00",
     80            "time": "2025-07-14T14:44:38+00:00",
    8181            "type": "library",
    8282            "installation-source": "dist",
     
    9999            "support": {
    100100                "issues": "https://github.com/sveawebpay/php-integration/issues",
    101                 "source": "https://github.com/sveawebpay/php-integration/tree/3.16.0"
     101                "source": "https://github.com/sveawebpay/php-integration/tree/3.16.1"
    102102            },
    103103            "install-path": "../sveaekonomi/webpay"
  • svea-webpay-for-woocommerce/tags/4.0.2/vendor/composer/installed.php

    r3319942 r3327589  
    1212    'versions' => array(
    1313        'sveaekonomi/checkout' => array(
    14             'pretty_version' => '1.5.3',
    15             'version' => '1.5.3.0',
    16             'reference' => '6241c3f894322775a8d574843f56bf1e2df884c1',
     14            'pretty_version' => '1.6.0',
     15            'version' => '1.6.0.0',
     16            'reference' => 'd184c949b60b96595cb786320bf049a5fbaf91df',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../sveaekonomi/checkout',
     
    2121        ),
    2222        'sveaekonomi/webpay' => array(
    23             'pretty_version' => '3.16.0',
    24             'version' => '3.16.0.0',
    25             'reference' => 'deda4e94e2558d8de02887425e8dc5fa241376b7',
     23            'pretty_version' => '3.16.1',
     24            'version' => '3.16.1.0',
     25            'reference' => '277dccf36e9bc7c82530cdf8d3572ec5c2e98810',
    2626            'type' => 'library',
    2727            'install_path' => __DIR__ . '/../sveaekonomi/webpay',
  • svea-webpay-for-woocommerce/tags/4.0.2/vendor/composer/platform_check.php

    r2981521 r3327589  
    2020        }
    2121    }
    22     trigger_error(
    23         'Composer detected issues in your platform: ' . implode(' ', $issues),
    24         E_USER_ERROR
     22    throw new \RuntimeException(
     23        'Composer detected issues in your platform: ' . implode(' ', $issues)
    2524    );
    2625}
  • svea-webpay-for-woocommerce/tags/4.0.2/vendor/sveaekonomi/checkout/README.md

    r3065202 r3327589  
    99* [6. Create recurring order](#6-create-recurring-order)
    1010* [7. Get recurring order](#7-get-recurring-order)
    11 * [8. Response](#8-response)
    12 * [9. Additional requests](#9-additional-requests)
    13 * [10. Data structures](#10-data-structures)
    14 * [11. HttpStatusCodes](#11-httpstatuscodes)
    15 * [12. Order administration](#12-order-administration)
    16 * [13. Javascript API](#13-javascript-api)
     11* [8. Change payment method for recurring order](#8-change-payment-method-for-recurring-order)
     12* [9. Response](#9-response)
     13* [10. Additional requests](#10-additional-requests)
     14* [11. Data structures](#11-data-structures)
     15* [12. HttpStatusCodes](#12-httpstatuscodes)
     16* [13. Order administration](#13-order-administration)
     17* [14. Javascript API](#14-javascript-api)
    1718## Introduction
    1819The checkout offers a complete solution with a variety of payment methods. The payment methods that are currently available in the checkout are invoice, payment plan, account credit, card payments and payment by bank.
    1920
    2021
    21 The checkout supports both B2C and B2B payments, fast customer identification and caches customers behaviour.
     22The checkout supports both B2C and B2B payments, fast customer identification and caches customers behavior.
    2223
    2324
     
    135136| IdentityFlags                     |          | Array of [*IdentityFlags*](#1012-identityflags) | Array of [*IdentityFlags*](#812-identityflags) used to hide certain features of the iframe |
    136137| PartnerKey                        |          | Guid                                            | Optional, provided by Svea on request. Used to create statistics.                               |
    137 | Recurring                         |          | Boolean                                         | Optional, if set to true the order will be a recurring order. (Only avilable if the merchant account has this feature enabled)                                 |
     138| Recurring                         |          | Boolean                                         | Optional, if set to true the order will be a recurring order. (Only available if the merchant account has this feature enabled)                                 |
    138139| MerchantData                      |          | String                                          | Metadata visible in the checkout API, returned when the order is fetched through the API.     |
    139140 
     
    375376```
    376377
    377 ### 8. Response
     378### 8. Change payment method for recurring order
     379Svea Checkout allows you to let customers change the payment method for an existing recurring order.
     380This feature is useful if a customer's card expires.
     381
     382#### Prerequisites
     383- The recurring order must be created and active.
     384- You need a "token" associated with the subscription.
     385
     386#### How it works
     387You use the changePaymentMethod endpoint via the \Svea\Checkout\CheckoutClient.
     388This will generate a new checkout session where the customer can select a new payment method.
     389Once the customer completes the flow, the new payment method will be linked to the recurring order.
     390
     391#### Example
     392```php
     393// include the library
     394include 'vendor/autoload.php';
     395
     396// without composer
     397require_once 'include.php';
     398
     399$checkoutClient = new \Svea\Checkout\CheckoutClient($connector);
     400
     401$data = [
     402    'token' => '12345678-90ab-cdef-1234-567890abcdef',
     403    'termsUrl' => 'http://yourdomain.se/terms'
     404];
     405
     406$response = $checkoutClient->changePaymentMethod($data);
     407
     408// Show the customer this snippet that lets them select a new payment method.
     409$sveaCheckoutIframe = $response['Gui']['Snippet'] ?? null;
     410echo $sveaCheckoutIframe ?: '';
     411```
     412
     413After the customer has completed the payment method change, Svea will update the payment details on the current token. No change needed from your side.
     414
     415### 9. Response
    378416The response contains information about the order such as Cart, Status, PaymentType and much more.
    379417
     
    542580echo $response['Gui']['Snippet']
    543581```
    544 ### 9. Additional requests
    545 
    546 #### 9.1 GetAvailablePartPaymentCampaigns
     582### 10. Additional requests
     583
     584#### 10.1 GetAvailablePartPaymentCampaigns
    547585
    548586GetAvailablePartPaymentCampaigns can be used to fetch the details of all the campaigns that are available on the merchant
     
    635673If you are a finnish merchant you have to display ALL the values described [here](https://www.kkv.fi/sv/beslut-och-publikationer/publikationer/konsumentrombudsmannens-riktlinjer/enligt-substans/tillhandahallande-av-konsumentkrediter/#luottolinjausSVE5.1) to be compliant with finnish laws.
    636674
    637 ### 10. Data structures
    638 
    639 #### 10.1 MerchantSettings
     675### 11. Data structures
     676
     677#### 11.1 MerchantSettings
    640678
    641679| Parameters                | Required  | Type      | Description  | Limits  |
    642680|------------------------------|-----------|-----------|--------------|---------|
    643 | TermsUri                     |    *      | string    | URI to a page which contains terms of the webshop. | 1-500 characters, must be a valid Url |
    644 | CheckoutUri                  |    *      | string    | URI to the page in the webshop that loads the Checkout.  | 1-500 characters, must be a valid Url |
    645 | ConfirmationUri              |    *      | string    | URI to the page in the webshop displaying specific information to a customer after the order has been confirmed. | 1-500 characters, must be a valid Url |
     681| TermsUri                     |    *      | string    | URI to a page which contains terms of the web shop. | 1-500 characters, must be a valid Url |
     682| CheckoutUri                  |    *      | string    | URI to the page in the web shop that loads the Checkout.  | 1-500 characters, must be a valid Url |
     683| ConfirmationUri              |    *      | string    | URI to the page in the web shop displaying specific information to a customer after the order has been confirmed. | 1-500 characters, must be a valid Url |
    646684| PushUri                      |    *      | string    | URI to a location that is expecting callbacks when CheckoutOrderStatus is changed. Uri should use the {checkout.order.uri} placeholder.  | 1-500 characters, must be a valid Url |
    647685| CheckoutValidationCallBackUri|           | string    | An optional URl to a location that is expecting callbacks from the Checkout to validate order’s stock status, and also the possibility to update checkout with an updated ClientOrderNumber. Uri may have a {checkout.order.uri} placeholder which will be replaced with the CheckoutOrderId. Please refer below [*CheckoutValidationCallbackResponse*](#1013-checkoutvalidationcallbackresponse) to see the expected response. | 1-500 characters, must be a valid Url |
     
    649687| PromotedPartPaymentCampaign  |           | integer   | Valid CampaignID. If used then the chosen campaign will be shown as the first payment method in all payment method lists. | Must be valid CampaignID |
    650688
    651 #### 10.2 Items
     689#### 11.2 Items
    652690
    653691| Parameters                | Required  | Type                                 | Description         |
     
    655693| Items                        |    *      | List of [*OrderRows*](#103-orderrow)  | See structure below |
    656694
    657 #### 10.3 OrderRow
     695#### 11.3 OrderRow
    658696
    659697| Parameters                | Required   | Type      | Description  | Limits  |
    660698|------------------------------|------------|-----------|--------------|---------|
    661 | ArticleNumber                |            | String    | Articlenumber as a string, can contain letters and numbers. | Maximum 1000 characters |
     699| ArticleNumber                |            | String    | Article number as a string, can contain letters and numbers. | Maximum 1000 characters |
    662700| Name                         |    *       | String    | Article name | 1-40 characters |
    663701| Quantity                     |    *       | Integer       | Set as basis point (1/100) e.g  2 = 200      | 1-9 digits. Minor currency |
    664702| UnitPrice                    |    *       | Integer       | Set as basis point (1/100) e.g. 25.00 = 2500 | 1-13 digits, can be negative. Minor currency |
    665 | DiscountPercent              |            | Integer       | The discountpercent of the product. | 0-100 |
     703| DiscountPercent              |            | Integer       | The discount percent of the product. | 0-100 |
    666704| VatPercent                   |    *       | Integer       | The VAT percentage of the current product. | Valid vat percentage for that country. Minor currency.  |
    667705| Unit                         |            | String        | The unit type, e.g., “st”, “pc”, “kg” etc. | 0-4 characters|
    668 | TemporaryReference           |            | String        | Can be used when creating or updating an order. The returned rows will have their corresponding temporaryreference as they were given in the indata. It will not be stored and will not be returned in GetOrder.  | |
     706| TemporaryReference           |            | String        | Can be used when creating or updating an order. The returned rows will have their corresponding "temporaryreference" as they were given in the indata. It will not be stored and will not be returned in GetOrder.  | |
    669707| MerchantData                 |            | String        | Can be used to store data, the data is not displayed anywhere but in the API
    670708
    671 #### 10.4 PresetValue
     709#### 11.4 PresetValue
    672710
    673711| Parameters             | Required  | Type          | Description  |
     
    685723| PhoneNumber               | String        |              | 1-18 digits, can include “+”, “-“s and space |
    686724| PostalCode                | String        |              | Company specific validation |
    687 | IsCompany                 | Boolean       |              | Required if nationalid is set |
    688 
    689 #### 10.5 Gui
     725| IsCompany                 | Boolean       |              | Required if "nationalid" is set |
     726
     727#### 11.5 Gui
    690728
    691729| Parameters               |  Type      | Description  |
     
    694732| Snippet                      | String     | HTML-snippet including javascript to populate the iFrame. |
    695733
    696 #### 10.6 Customer
     734#### 11.6 Customer
    697735
    698736| Parameters               | Type      | Description  |
    699737|------------------------------|-----------|--------------|
    700 | NationalId                   | String    | Personal- or organizationnumber. |
    701 | IsCompany                    | Boolean   | True if nationalId is organisationnumber, false if nationalid is personalnumber.   |
     738| NationalId                   | String    | Personal- or organization number. |
     739| IsCompany                    | Boolean   | True if nationalId is organisation number, false if "nationalid" is personal number.   |
    702740| CountryCode                  | String    |  Defined by two-letter ISO 3166-1 alpha-2, i.e. SE, DE, FI etc.|
    703741| Id                           | Integer   | Customer-specific id |
    704742
    705 #### 10.7 Address
     743#### 11.7 Address
    706744
    707745| Parameters                | Type      | Description  |
     
    718756| AddressLines                 | Array of strings | Null unless international flow is used
    719757
    720 #### 10.8 CheckoutOrderStatus
     758#### 11.8 CheckoutOrderStatus
    721759
    722760The order can only be considered “ready to send to customer” when the CheckoutOrderStatus is Final. No other status can guarantee payment.
     
    728766| Final                        | The order is completed in the checkout and managed by WebPay’s subsystems. The order can now be administrated using either the library or browsing to the admin user interface|
    729767
    730 #### 10.9 Locale
     768#### 11.9 Locale
    731769| Parameter | Description     |
    732770|-----------|-----------------|
     
    739777
    740778
    741 #### 10.10 PaymentType
     779#### 11.10 PaymentType
    742780| Parameter   | Description     |
    743781|-------------|-----------------|
     
    755793| LEASINGUNAPPROVED | Leasing (Manual approve process by Sveas leasing department, check Store pay admin page) |
    756794| LEASINGAPPROVED | Leasing (Automatically approved leasing contract)
    757 | TRUSTLY            | The customer paied with Trustly |
     795| TRUSTLY            | The customer paid with Trustly |
    758796| Directbank (varies)  |    The customer paid the order with direct bank e.g. Nordea, SEB. See below for all available parameters |
    759797
     
    778816
    779817
    780 #### 10.11 CampaignCodeInfo
     818#### 11.11 CampaignCodeInfo
    781819| Parameter                 | Type      | Description |
    782820|---------------------------|-----------|-------------|
     
    794832| PaymentPlanType           | Integer   | Type of campaign |
    795833
    796 #### 10.12 IdentityFlags
     834#### 11.12 IdentityFlags
    797835| Parameter                 | Type      | Description |
    798836|---------------------------|-----------|-------------|
     
    801839| HideAnonymous           | Boolean   | Hides anonymous flow, forcing users to identify with their nationalId to perform a purchase |
    802840
    803 #### 10.13 CheckoutValidationCallbackResponse
     841#### 11.13 CheckoutValidationCallbackResponse
    804842If a CheckoutValidationCallbackUri is set on an order when it's created, Svea will send a HTTP GET request to the specified URI when a customer clicks on "Confirm Order".
    805843
     
    811849| ClientOrderNumber |          | String  | Max 32 characters. Set if you want the ClientOrderNumber to be updated. |
    812850
    813 ### 11. HttpStatusCodes
     851### 12. HttpStatusCodes
    814852| Parameter | Type          | Description |
    815853|-----------|---------------|-------------|
     
    827865If the returned ResultCode is not present in the above tables please contact Svea Ekonomi for further information.
    828866
    829 ## 12. Order administration
     867## 13. Order administration
    830868
    831869[See full examples](examples/admin)
     
    843881\Exception - For any other error
    844882
    845 ### 12.1 Get order
     883### 13.1 Get order
    846884This method is used to get the entire order with all its relevant information. Including its deliveries, rows, credits and addresses.
    847885
     
    856894| Parameters OUT                | Type      | Description  |
    857895|-------------------------------|-----------|--------------|
    858 | Order          | array     | An array containing all the order details. See [12.14 Data objects](#1215-data-objects) |
    859 
    860 
    861 
    862 ### 12.2 Get task
     896| Order          | array     | An array containing all the order details. See [13.14 Data objects](#1215-data-objects) |
     897
     898
     899
     900### 13.2 Get task
    863901A task will explain the status of a previously performed operation. When finished it will point towards the new resource with the Location.
    864902#### Parameters
     
    874912| Task                          | [Task](#12154-task)      | An object containing details regarding a queued task |
    875913
    876 ### 12.3 Deliver order
     914### 13.3 Deliver order
    877915Creates a delivery on a checkout order. Assuming the order got the **CanDeliverOrder** action.
    878916
     
    894932| HeaderLocation                | string    | URI to the created task. (Absolute URL) |
    895933
    896 ### 12.3.1 Row Delivery Options
     934### 13.3.1 Row Delivery Options
    897935
    898936| Parameter                     | Type       | Description  |
     
    901939| quantity                      | int        | Number of items to credit |
    902940
    903 ### 12.4 Deliver order with lower amount
     941### 13.4 Deliver order with lower amount
    904942Creates a delivery on a checkout order with a lower amount than the total, canceling the remaining amount. Assuming the order got **CanDeliverOrder** and **CanCancelAmount** action.
    905943
     
    918956| HeaderLocation       | string | URI to the created task (Absolute URL)  |
    919957
    920 ### 12.5 Cancel Order
     958### 13.5 Cancel Order
    921959Cancel an order before it has been delivered. Assuming the order has the action **CanCancelOrder**.
    922960
     
    930968If the order is successfully cancelled, Response is empty.
    931969
    932 ### 12.6 Cancel order amount
     970### 13.6 Cancel order amount
    933971By specifying a higher amount than the current order cancelled amount then the order cancelled amount will increase,
    934972assuming the order has the action **CanCancelOrderAmount**. The delta between the new *CancelledAmount* and the former *CancelledAmount* will be cancelled.
     
    946984If order amount is successfully cancelled, Response is empty.
    947985
    948 ### 12.7 Cancel order row
     986### 13.7 Cancel order row
    949987Changes the status of an order row to *Cancelled*, assuming the order has the action **CanCancelOrderRow** and the OrderRow has the action **CanCancelRow**.
    950988
     
    959997If order row is successfully cancelled, Response is empty.
    960998
    961 ### 12.8 Credit order rows
     999### 13.8 Credit order rows
    9621000Creates a new credit on the specified delivery with specified order rows. Assuming the delivery has action **CanCreditOrderRows** and the specified order rows also has action **CanCreditRow**
    9631001
     
    9771015On the returned URL can be checked status of the task.
    9781016
    979 ### 12.8.1 Row Crediting Options
     1017### 13.8.1 Row Crediting Options
    9801018
    9811019| Parameter                     | Type       | Description  |
     
    9841022| quantity                      | int        | Number of items to credit |
    9851023
    986 ### 12.9 Credit new order row
     1024### 13.9 Credit new order row
    9871025By specifying a new credit row, a new credit row will be created on the delivery, assuming the delivery has action **CanCreditNewRow**.
    9881026
     
    10011039On the returned URL can be checked status of the task.
    10021040
    1003 ### 12.10 Credit order rows with fee
     1041### 13.10 Credit order rows with fee
    10041042Creates a new credit on the specified delivery with specified order rows. Assuming the delivery has action **CanCreditOrderRows** and the specified order rows also has action **CanCreditRow**. Adds the ability to add a fee to the credit.
    10051043
     
    10191057
    10201058On the returned URL can be checked status of the task.
    1021 ### 12.11 Credit amount
     1059### 13.11 Credit amount
    10221060By specifying a credited amount larger than the current credited amount. A credit is being made on the specified delivery. The credited amount cannot be lower than the current credited amount or larger than the delivered amount.
    10231061
     
    10341072If order amount is successfully credited, Response is empty.
    10351073
    1036 ### 12.12 Add order row
     1074### 13.12 Add order row
    10371075This method is used to add order rows to an order, assuming the order has the action **CanAddOrderRow**.
    10381076If the new order amount will exceed the current order amount, a credit check will be performed.
     
    10521090On the returned URL (HeaderLocation) can be checked status of the task.
    10531091
    1054 ### 12.13 Update order row
     1092### 13.13 Update order row
    10551093This method is used to update an order row, assuming the order has action "CanUpdateOrderRow" and the order row has the action **CanUpdateRow**.
    10561094The method will update all fields set in the payload, if a field is not set the row will keep the current value.
     
    10671105If order row is successfully updated, Response is empty.
    10681106
    1069 ### 12.14 Replace order rows
     1107### 13.14 Replace order rows
    10701108This method is used to update an order row, assuming the order has action "CanUpdateOrderRow".
    10711109This method will delete all the present rows and replace with the ones set in the payload.
     
    10821120
    10831121
    1084 ### 12.15 Data objects
    1085 
    1086 #### 12.15.1 Order
     1122### 13.15 Data objects
     1123
     1124#### 13.15.1 Order
    10871125| Parameter             |   Type        | Description                                               |
    10881126|-----------------------|---------------|-----------------------------------------------------------|
     
    10951133| PaymentType           | string        | The final payment method for the order. Will only have a value when the order is locked, otherwise null. See list of possible PaymentType below.|
    10961134| CreationDate          | DateTime      | Date and time when the order was created|
    1097 | NationalId            | string        | Personal- or organizationnumber.|
    1098 | IsCompany             | boolean       | True if nationalid is organisationnumber, false if nationalid is personalnumber.| 
     1135| NationalId            | string        | Personal- or organization number.|
     1136| IsCompany             | boolean       | True if "nationalid" is organisation number, false if "nationalid" is personal number.| 
    10991137| OrderAmount           | int           | The total amount on the order. Minor unit|
    11001138| CancelledAmount       | int           | The total cancelled amount on the order. Minor uit|
     
    11051143| Actions               | List of String | A list of actions possible on the order.|
    11061144
    1107 #### 12.15.2 Delivery
     1145#### 13.15.2 Delivery
    11081146
    11091147| Parameter             |   Type        | Description                                               |
     
    11181156| Actions               | List of string | A list of actions possible on the delivery.|
    11191157
    1120 #### 12.15.3 Credit
     1158#### 13.15.3 Credit
    11211159
    11221160| Parameter             |   Type        | Description                                               |
     
    11261164| Actions               | List of String | A list of actions possible on the credit.|
    11271165
    1128 #### 12.15.4 Task
     1166#### 13.15.4 Task
    11291167
    11301168| Parameter             |   Type        | Description                                               |
     
    11331171| Status                | String        | Status of the task |
    11341172
    1135 #### 12.15.5 Order Row
     1173#### 13.15.5 Order Row
    11361174
    11371175|Parameter              |R  | RO | Type     | Description                   |   Limits|
    11381176|-----------------------|---|----|----------|-------------------------------|-------------------|
    11391177| OrderRowId            |   | *  |int      | Order row id from underlying system, unique on order. | Not possible to set through API, only get.|
    1140 | ArticleNumber         |   |    |string    | Articlenumber as a string, can contain letters and numbers. | Maximum 256 characters.   |
     1178| ArticleNumber         |   |    |string    | Article number as a string, can contain letters and numbers. | Maximum 256 characters.   |
    11411179| Name                  | * |    |string    | Article name. | 1-40 characters. |
    11421180| Quantity              | * |    |int      | Quantity of the product. | 1-9 digits. Minor unit.|
    11431181| UnitPrice             | * |    |int      | Price of the product including VAT. | 1-13 digits, can be negative. Minor currency.|
    1144 | DiscountPercent       |   |    |int      | The discountpercent of the product. | 0-9900. Minor unit|
     1182| DiscountPercent       |   |    |int      | The discount percent of the product. | 0-9900. Minor unit|
    11451183| VatPercent            | * |    |int      | The VAT percentage of the current product. | Valid vat percentage for that country . Minor unit.0-10000|
    11461184| Unit                  |   |    |string    | The unit type, e.g., “st”, “pc”, “kg” etc.  | 0-4 characters. |
     
    11481186| Actions               |   | *  |List of string | A list of actions possible on the order row. See list of OrderRow actions below. | Not possible to set through API, only get.|
    11491187
    1150 #### 12.15.6 Address
     1188#### 13.15.6 Address
    11511189
    11521190| Parameter             |   Type        | Description                                               |
     
    11591197| CountryCode           |   string      |   2-letter ISO country code |
    11601198
    1161 #### 12.15.7 Order Status
     1199#### 13.15.7 Order Status
    11621200
    11631201| Parameter             |  Description                                               |
     
    11681206| Failed                | The payment for this order has failed |
    11691207
    1170 #### 12.15.8 Order actions
     1208#### 13.15.8 Order actions
    11711209
    11721210| Parameter                 |  Description                                               |
     
    11801218| CanUpdateOrderRow         ||
    11811219
    1182 #### 12.15.9 Delivery actions
     1220#### 13.15.9 Delivery actions
    11831221
    11841222| Parameter             |  Description                                               |
     
    11881226| CanCreditAmount       ||     
    11891227
    1190 #### 12.15.10 Order Row actions
     1228#### 13.15.10 Order Row actions
    11911229
    11921230| Parameter             |  Description                                               |
     
    11971235| CanUpdateRow          ||
    11981236
    1199 ## 13. Javascript API
     1237## 14. Javascript API
    12001238
    12011239(Please note that the API is still considered a work in progress and might see significant changes.)
  • svea-webpay-for-woocommerce/tags/4.0.2/vendor/sveaekonomi/checkout/VERSION

    r3319942 r3327589  
    1 1.5.2
     11.6.0
  • svea-webpay-for-woocommerce/tags/4.0.2/vendor/sveaekonomi/checkout/composer.json

    r3319942 r3327589  
    11{
    22  "name": "sveaekonomi/checkout",
    3   "version": "1.5.3",
     3  "version": "1.6.0",
    44  "description": "Php integration library for Svea Checkout",
    55  "license": "Apache-2.0",
     
    2626    "phploc/phploc": "^2.0.1",
    2727    "sebastian/phpcpd": "^2.0.4",
    28     "symfony/dependency-injection": "^2.7.51 || ^2.8.50 || ^3.4.26 || ^4.1.12 || ^4.2.7"
     28      "symfony/dependency-injection": "^2.7.51 || ^2.8.50 || ^3.4.26 || ^4.1.12 || ^4.2.7"
    2929  },
    3030  "scripts": {
  • svea-webpay-for-woocommerce/tags/4.0.2/vendor/sveaekonomi/checkout/src/CheckoutClient.php

    r3065202 r3327589  
    7070
    7171        return $this->executeAction($class, $data);
     72    }
     73
     74    /**
     75     * Change payment method for existing Svea Checkout order.
     76     *
     77     * @param array $data
     78     * @return mixed
     79     */
     80    public function changePaymentMethod( array $data )
     81    {
     82        return $this->executeAction(ImplementationFactory::returnChangePaymentMethodClass($this->connector), $data);
     83       
    7284    }
    7385
  • svea-webpay-for-woocommerce/tags/4.0.2/vendor/sveaekonomi/checkout/src/Implementation/ImplementationFactory.php

    r3065202 r3327589  
    55use Svea\Checkout\Transport\Connector;
    66use Svea\Checkout\Validation\ValidateCreateOrderData;
     7use Svea\Checkout\Validation\ValidateChangePaymentMethodData;
    78use Svea\Checkout\Validation\ValidateCreateTokenOrderData;
    89use Svea\Checkout\Validation\ValidateGetOrderData;
     
    1718    /**
    1819     * @param Connector $connector
    19      * @return ImplementationInterface
     20     * @return CreateOrder
    2021     */
    2122    public static function returnCreateOrderClass(Connector $connector)
     
    2627    /**
    2728     * @param Connector $connector
    28      * @return ImplementationInterface
     29     * @return CreateTokenOrder
    2930     */
    30     public static function returnCreateTokenOrderClass(Connector $connector) {
     31    public static function returnCreateTokenOrderClass(Connector $connector)
     32    {
    3133        return new CreateTokenOrder($connector, new ValidateCreateTokenOrderData());
    3234    }
     
    3436    /**
    3537     * @param Connector $connector
    36      * @return ImplementationInterface
     38     * @return ChangePaymentMethod
     39     */
     40    public static function returnChangePaymentMethodClass(Connector $connector)
     41    {
     42        return new ChangePaymentMethod($connector, new ValidateChangePaymentMethodData());
     43    }
     44
     45    /**
     46     * @param Connector $connector
     47     * @return GetOrder
    3748     */
    3849    public static function returnGetOrderClass(Connector $connector)
     
    4354    /**
    4455     * @param Connector $connector
    45      * @return ImplementationInterface
     56     * @return GetTokenOrder
    4657     */
    4758    public static function returnGetTokenOrderClass(Connector $connector)
     
    5263    /**
    5364     * @param Connector $connector
    54      * @return ImplementationInterface
     65     * @return GetToken
    5566     */
    5667    public static function returnGetTokenClass(Connector $connector)
     
    6172    /**
    6273     * @param Connector $connector
    63      * @return ImplementationInterface
     74     * @return UpdateToken
    6475     */
    6576    public static function returnUpdateTokenClass(Connector $connector)
     
    7081    /**
    7182     * @param Connector $connector
    72      * @return ImplementationInterface
     83     * @return UpdateOrder
    7384     */
    7485    public static function returnUpdateOrderClass(Connector $connector)
     
    7990    /**
    8091     * @param Connector $connector
    81      * @return ImplementationInterface
     92     * @return GetAvailablePartPaymentCampaigns
    8293     */
    8394    public static function returnGetAvailablePartPaymentCampaignsClass(Connector $connector)
  • svea-webpay-for-woocommerce/tags/4.0.2/vendor/sveaekonomi/webpay/composer.json

    r3319942 r3327589  
    11{
    22  "name": "sveaekonomi/webpay",
    3   "version": "3.16.0",
     3  "version": "3.16.1",
    44  "description": "Php integration library for Svea payment methods",
    55  "license": "Apache-2.0",
  • svea-webpay-for-woocommerce/tags/4.0.2/vendor/sveaekonomi/webpay/src/BuildOrder/RowBuilders/FixedDiscount.php

    r3319942 r3327589  
    3030    public $description;
    3131
     32    /**
     33     * @var float $amount
     34     */
     35    public $amount;
     36
    3237    /**
    3338     * @var float $amountIncVat
     
    5156
    5257    /**
    53      * @var string $rowType - The type of row to be created.
    54      */
    55     public $rowType = 'Row';
     58     * @var string|null $rowType - The type of row to be created.
     59     */
     60    public $rowType = null;
    5661
    5762    /**
  • svea-webpay-for-woocommerce/tags/4.0.2/vendor/sveaekonomi/webpay/src/BuildOrder/RowBuilders/InvoiceFee.php

    r3319942 r3327589  
    5151
    5252    /**
    53      * @var string $rowType - Optional type of row name
     53     * @var string|null $rowType - Optional type of row name
    5454     */
    5555    public $rowType = "InvoiceFee";
     56
     57    /**
     58     * @var string $name
     59     */
     60    public $name;
    5661
    5762    /**
  • svea-webpay-for-woocommerce/tags/4.0.2/vendor/sveaekonomi/webpay/src/BuildOrder/RowBuilders/OrderRow.php

    r3319942 r3327589  
    7171
    7272    /**
    73      * @var string $rowType - Optional type of row name
    74      */
    75     public $rowType = "Row";
     73     * @var string|null $rowType - Optional type of row name
     74     */
     75    public $rowType = null;
    7676
    7777    /**
  • svea-webpay-for-woocommerce/tags/4.0.2/vendor/sveaekonomi/webpay/src/BuildOrder/RowBuilders/RelativeDiscount.php

    r3319942 r3327589  
    3434
    3535    /**
    36      * @var string $rowType - Optional type of row name
     36     * @var string|null $rowType - Optional type of row name
    3737     */
    38     public $rowType = "Row";
     38    public $rowType = null;
    3939
    4040    /**
  • svea-webpay-for-woocommerce/tags/4.0.2/vendor/sveaekonomi/webpay/src/BuildOrder/RowBuilders/ShippingFee.php

    r3319942 r3327589  
    6262
    6363    /**
    64      * @var string $rowType - Optional type of row name
    65      */
    66     public $rowType = "Row";
     64     * @var string|null $rowType - Optional type of row name
     65     */
     66    public $rowType = null;
    6767
    6868    /**
  • svea-webpay-for-woocommerce/tags/4.0.2/vendor/sveaekonomi/webpay/version.json

    r3319942 r3327589  
    11{
    2     "version": "3.16.0"
     2    "version": "3.16.1"
    33}
  • svea-webpay-for-woocommerce/trunk/inc/Scripts.php

    r3319942 r3327589  
    128128        ];
    129129
    130         $svea_data['isPayPage'] = is_checkout() ? true : false;
     130        $svea_data['isPayPage'] = is_checkout_pay_page() ? true : false;
    131131
    132132        if ( is_checkout_pay_page() ) {
  • svea-webpay-for-woocommerce/trunk/readme.txt

    r3324086 r3327589  
    1010License: Apache 2.0
    1111License URI: https://www.apache.org/licenses/LICENSE-2.0
    12 Stable tag: 4.0.1
     12Stable tag: 4.0.2
    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.2 =
     424.0.2 is a patch release.
     43
    4144= 4.0.1 =
    42454.0.1 is a patch release.
     
    5457
    5558== Changelog ==
     59
     60= 4.0.2 2025-07-09 =
     61* Correct pay page logic, fixing issues with get address.
    5662
    5763= 4.0.1 2025-07-08 =
  • svea-webpay-for-woocommerce/trunk/svea-webpay-for-woocommerce.php

    r3324086 r3327589  
    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.1
     6 * Version: 4.0.2
    77 * Author: The Generation
    88 * Author URI: https://thegeneration.se/
     
    3737         * @var     string
    3838         */
    39         const VERSION = '4.0.1';
     39        const VERSION = '4.0.2';
    4040
    4141        /**
  • svea-webpay-for-woocommerce/trunk/vendor/autoload.php

    r3319942 r3327589  
    2020require_once __DIR__ . '/composer/autoload_real.php';
    2121
    22 return ComposerAutoloaderInit33686362a7e49595b5bc1ca0cfcfc4ae::getLoader();
     22return ComposerAutoloaderInitbc30d1434a3a88a158b0c9e929d8f6f0::getLoader();
  • svea-webpay-for-woocommerce/trunk/vendor/composer/autoload_classmap.php

    r3319942 r3327589  
    2828    'Svea\\Checkout\\Implementation\\Admin\\ReplaceOrderRows' => $vendorDir . '/sveaekonomi/checkout/src/Implementation/Admin/ReplaceOrderRows.php',
    2929    'Svea\\Checkout\\Implementation\\Admin\\UpdateOrderRow' => $vendorDir . '/sveaekonomi/checkout/src/Implementation/Admin/UpdateOrderRow.php',
     30    'Svea\\Checkout\\Implementation\\ChangePaymentMethod' => $vendorDir . '/sveaekonomi/checkout/src/Implementation/ChangePaymentMethod.php',
    3031    'Svea\\Checkout\\Implementation\\CreateOrder' => $vendorDir . '/sveaekonomi/checkout/src/Implementation/CreateOrder.php',
    3132    'Svea\\Checkout\\Implementation\\CreateTokenOrder' => $vendorDir . '/sveaekonomi/checkout/src/Implementation/CreateTokenOrder.php',
     
    5960    'Svea\\Checkout\\Validation\\Admin\\ValidateReplaceOrderRowsData' => $vendorDir . '/sveaekonomi/checkout/src/Validation/Admin/ValidateReplaceOrderRowsData.php',
    6061    'Svea\\Checkout\\Validation\\Admin\\ValidateUpdateOrderRowData' => $vendorDir . '/sveaekonomi/checkout/src/Validation/Admin/ValidateUpdateOrderRowData.php',
     62    'Svea\\Checkout\\Validation\\ValidateChangePaymentMethodData' => $vendorDir . '/sveaekonomi/checkout/src/Validation/ValidateChangePaymentMethodData.php',
    6163    'Svea\\Checkout\\Validation\\ValidateCreateOrderData' => $vendorDir . '/sveaekonomi/checkout/src/Validation/ValidateCreateOrderData.php',
    6264    'Svea\\Checkout\\Validation\\ValidateCreateTokenOrderData' => $vendorDir . '/sveaekonomi/checkout/src/Validation/ValidateCreateTokenOrderData.php',
  • svea-webpay-for-woocommerce/trunk/vendor/composer/autoload_real.php

    r3319942 r3327589  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderInit33686362a7e49595b5bc1ca0cfcfc4ae
     5class ComposerAutoloaderInitbc30d1434a3a88a158b0c9e929d8f6f0
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderInit33686362a7e49595b5bc1ca0cfcfc4ae', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInitbc30d1434a3a88a158b0c9e929d8f6f0', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderInit33686362a7e49595b5bc1ca0cfcfc4ae', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInitbc30d1434a3a88a158b0c9e929d8f6f0', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticInit33686362a7e49595b5bc1ca0cfcfc4ae::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInitbc30d1434a3a88a158b0c9e929d8f6f0::getInitializer($loader));
    3333
    3434        $loader->register(true);
  • svea-webpay-for-woocommerce/trunk/vendor/composer/autoload_static.php

    r3319942 r3327589  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticInit33686362a7e49595b5bc1ca0cfcfc4ae
     7class ComposerStaticInitbc30d1434a3a88a158b0c9e929d8f6f0
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    5353        'Svea\\Checkout\\Implementation\\Admin\\ReplaceOrderRows' => __DIR__ . '/..' . '/sveaekonomi/checkout/src/Implementation/Admin/ReplaceOrderRows.php',
    5454        'Svea\\Checkout\\Implementation\\Admin\\UpdateOrderRow' => __DIR__ . '/..' . '/sveaekonomi/checkout/src/Implementation/Admin/UpdateOrderRow.php',
     55        'Svea\\Checkout\\Implementation\\ChangePaymentMethod' => __DIR__ . '/..' . '/sveaekonomi/checkout/src/Implementation/ChangePaymentMethod.php',
    5556        'Svea\\Checkout\\Implementation\\CreateOrder' => __DIR__ . '/..' . '/sveaekonomi/checkout/src/Implementation/CreateOrder.php',
    5657        'Svea\\Checkout\\Implementation\\CreateTokenOrder' => __DIR__ . '/..' . '/sveaekonomi/checkout/src/Implementation/CreateTokenOrder.php',
     
    8485        'Svea\\Checkout\\Validation\\Admin\\ValidateReplaceOrderRowsData' => __DIR__ . '/..' . '/sveaekonomi/checkout/src/Validation/Admin/ValidateReplaceOrderRowsData.php',
    8586        'Svea\\Checkout\\Validation\\Admin\\ValidateUpdateOrderRowData' => __DIR__ . '/..' . '/sveaekonomi/checkout/src/Validation/Admin/ValidateUpdateOrderRowData.php',
     87        'Svea\\Checkout\\Validation\\ValidateChangePaymentMethodData' => __DIR__ . '/..' . '/sveaekonomi/checkout/src/Validation/ValidateChangePaymentMethodData.php',
    8688        'Svea\\Checkout\\Validation\\ValidateCreateOrderData' => __DIR__ . '/..' . '/sveaekonomi/checkout/src/Validation/ValidateCreateOrderData.php',
    8789        'Svea\\Checkout\\Validation\\ValidateCreateTokenOrderData' => __DIR__ . '/..' . '/sveaekonomi/checkout/src/Validation/ValidateCreateTokenOrderData.php',
     
    342344    {
    343345        return \Closure::bind(function () use ($loader) {
    344             $loader->prefixLengthsPsr4 = ComposerStaticInit33686362a7e49595b5bc1ca0cfcfc4ae::$prefixLengthsPsr4;
    345             $loader->prefixDirsPsr4 = ComposerStaticInit33686362a7e49595b5bc1ca0cfcfc4ae::$prefixDirsPsr4;
    346             $loader->classMap = ComposerStaticInit33686362a7e49595b5bc1ca0cfcfc4ae::$classMap;
     346            $loader->prefixLengthsPsr4 = ComposerStaticInitbc30d1434a3a88a158b0c9e929d8f6f0::$prefixLengthsPsr4;
     347            $loader->prefixDirsPsr4 = ComposerStaticInitbc30d1434a3a88a158b0c9e929d8f6f0::$prefixDirsPsr4;
     348            $loader->classMap = ComposerStaticInitbc30d1434a3a88a158b0c9e929d8f6f0::$classMap;
    347349
    348350        }, null, ClassLoader::class);
  • svea-webpay-for-woocommerce/trunk/vendor/composer/installed.json

    r3319942 r3327589  
    33        {
    44            "name": "sveaekonomi/checkout",
    5             "version": "1.5.3",
    6             "version_normalized": "1.5.3.0",
     5            "version": "1.6.0",
     6            "version_normalized": "1.6.0.0",
    77            "source": {
    88                "type": "git",
    99                "url": "https://github.com/sveawebpay/php-checkout.git",
    10                 "reference": "6241c3f894322775a8d574843f56bf1e2df884c1"
     10                "reference": "d184c949b60b96595cb786320bf049a5fbaf91df"
    1111            },
    1212            "dist": {
    1313                "type": "zip",
    14                 "url": "https://api.github.com/repos/sveawebpay/php-checkout/zipball/6241c3f894322775a8d574843f56bf1e2df884c1",
    15                 "reference": "6241c3f894322775a8d574843f56bf1e2df884c1",
     14                "url": "https://api.github.com/repos/sveawebpay/php-checkout/zipball/d184c949b60b96595cb786320bf049a5fbaf91df",
     15                "reference": "d184c949b60b96595cb786320bf049a5fbaf91df",
    1616                "shasum": ""
    1717            },
     
    2929                "symfony/dependency-injection": "^2.7.51 || ^2.8.50 || ^3.4.26 || ^4.1.12 || ^4.2.7"
    3030            },
    31             "time": "2024-11-13T10:20:09+00:00",
     31            "time": "2025-06-30T13:03:15+00:00",
    3232            "type": "library",
    3333            "installation-source": "dist",
     
    5050            "support": {
    5151                "issues": "https://github.com/sveawebpay/php-checkout/issues",
    52                 "source": "https://github.com/sveawebpay/php-checkout/tree/1.5.3"
     52                "source": "https://github.com/sveawebpay/php-checkout/tree/1.6.0"
    5353            },
    5454            "install-path": "../sveaekonomi/checkout"
     
    5656        {
    5757            "name": "sveaekonomi/webpay",
    58             "version": "3.16.0",
    59             "version_normalized": "3.16.0.0",
     58            "version": "3.16.1",
     59            "version_normalized": "3.16.1.0",
    6060            "source": {
    6161                "type": "git",
    6262                "url": "https://github.com/sveawebpay/php-integration.git",
    63                 "reference": "deda4e94e2558d8de02887425e8dc5fa241376b7"
     63                "reference": "277dccf36e9bc7c82530cdf8d3572ec5c2e98810"
    6464            },
    6565            "dist": {
    6666                "type": "zip",
    67                 "url": "https://api.github.com/repos/sveawebpay/php-integration/zipball/deda4e94e2558d8de02887425e8dc5fa241376b7",
    68                 "reference": "deda4e94e2558d8de02887425e8dc5fa241376b7",
     67                "url": "https://api.github.com/repos/sveawebpay/php-integration/zipball/277dccf36e9bc7c82530cdf8d3572ec5c2e98810",
     68                "reference": "277dccf36e9bc7c82530cdf8d3572ec5c2e98810",
    6969                "shasum": ""
    7070            },
     
    7878                "phpunit/phpunit": "^8"
    7979            },
    80             "time": "2025-06-26T08:40:15+00:00",
     80            "time": "2025-07-14T14:44:38+00:00",
    8181            "type": "library",
    8282            "installation-source": "dist",
     
    9999            "support": {
    100100                "issues": "https://github.com/sveawebpay/php-integration/issues",
    101                 "source": "https://github.com/sveawebpay/php-integration/tree/3.16.0"
     101                "source": "https://github.com/sveawebpay/php-integration/tree/3.16.1"
    102102            },
    103103            "install-path": "../sveaekonomi/webpay"
  • svea-webpay-for-woocommerce/trunk/vendor/composer/installed.php

    r3319942 r3327589  
    1212    'versions' => array(
    1313        'sveaekonomi/checkout' => array(
    14             'pretty_version' => '1.5.3',
    15             'version' => '1.5.3.0',
    16             'reference' => '6241c3f894322775a8d574843f56bf1e2df884c1',
     14            'pretty_version' => '1.6.0',
     15            'version' => '1.6.0.0',
     16            'reference' => 'd184c949b60b96595cb786320bf049a5fbaf91df',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../sveaekonomi/checkout',
     
    2121        ),
    2222        'sveaekonomi/webpay' => array(
    23             'pretty_version' => '3.16.0',
    24             'version' => '3.16.0.0',
    25             'reference' => 'deda4e94e2558d8de02887425e8dc5fa241376b7',
     23            'pretty_version' => '3.16.1',
     24            'version' => '3.16.1.0',
     25            'reference' => '277dccf36e9bc7c82530cdf8d3572ec5c2e98810',
    2626            'type' => 'library',
    2727            'install_path' => __DIR__ . '/../sveaekonomi/webpay',
  • svea-webpay-for-woocommerce/trunk/vendor/composer/platform_check.php

    r2981521 r3327589  
    2020        }
    2121    }
    22     trigger_error(
    23         'Composer detected issues in your platform: ' . implode(' ', $issues),
    24         E_USER_ERROR
     22    throw new \RuntimeException(
     23        'Composer detected issues in your platform: ' . implode(' ', $issues)
    2524    );
    2625}
  • svea-webpay-for-woocommerce/trunk/vendor/sveaekonomi/checkout/README.md

    r3065202 r3327589  
    99* [6. Create recurring order](#6-create-recurring-order)
    1010* [7. Get recurring order](#7-get-recurring-order)
    11 * [8. Response](#8-response)
    12 * [9. Additional requests](#9-additional-requests)
    13 * [10. Data structures](#10-data-structures)
    14 * [11. HttpStatusCodes](#11-httpstatuscodes)
    15 * [12. Order administration](#12-order-administration)
    16 * [13. Javascript API](#13-javascript-api)
     11* [8. Change payment method for recurring order](#8-change-payment-method-for-recurring-order)
     12* [9. Response](#9-response)
     13* [10. Additional requests](#10-additional-requests)
     14* [11. Data structures](#11-data-structures)
     15* [12. HttpStatusCodes](#12-httpstatuscodes)
     16* [13. Order administration](#13-order-administration)
     17* [14. Javascript API](#14-javascript-api)
    1718## Introduction
    1819The checkout offers a complete solution with a variety of payment methods. The payment methods that are currently available in the checkout are invoice, payment plan, account credit, card payments and payment by bank.
    1920
    2021
    21 The checkout supports both B2C and B2B payments, fast customer identification and caches customers behaviour.
     22The checkout supports both B2C and B2B payments, fast customer identification and caches customers behavior.
    2223
    2324
     
    135136| IdentityFlags                     |          | Array of [*IdentityFlags*](#1012-identityflags) | Array of [*IdentityFlags*](#812-identityflags) used to hide certain features of the iframe |
    136137| PartnerKey                        |          | Guid                                            | Optional, provided by Svea on request. Used to create statistics.                               |
    137 | Recurring                         |          | Boolean                                         | Optional, if set to true the order will be a recurring order. (Only avilable if the merchant account has this feature enabled)                                 |
     138| Recurring                         |          | Boolean                                         | Optional, if set to true the order will be a recurring order. (Only available if the merchant account has this feature enabled)                                 |
    138139| MerchantData                      |          | String                                          | Metadata visible in the checkout API, returned when the order is fetched through the API.     |
    139140 
     
    375376```
    376377
    377 ### 8. Response
     378### 8. Change payment method for recurring order
     379Svea Checkout allows you to let customers change the payment method for an existing recurring order.
     380This feature is useful if a customer's card expires.
     381
     382#### Prerequisites
     383- The recurring order must be created and active.
     384- You need a "token" associated with the subscription.
     385
     386#### How it works
     387You use the changePaymentMethod endpoint via the \Svea\Checkout\CheckoutClient.
     388This will generate a new checkout session where the customer can select a new payment method.
     389Once the customer completes the flow, the new payment method will be linked to the recurring order.
     390
     391#### Example
     392```php
     393// include the library
     394include 'vendor/autoload.php';
     395
     396// without composer
     397require_once 'include.php';
     398
     399$checkoutClient = new \Svea\Checkout\CheckoutClient($connector);
     400
     401$data = [
     402    'token' => '12345678-90ab-cdef-1234-567890abcdef',
     403    'termsUrl' => 'http://yourdomain.se/terms'
     404];
     405
     406$response = $checkoutClient->changePaymentMethod($data);
     407
     408// Show the customer this snippet that lets them select a new payment method.
     409$sveaCheckoutIframe = $response['Gui']['Snippet'] ?? null;
     410echo $sveaCheckoutIframe ?: '';
     411```
     412
     413After the customer has completed the payment method change, Svea will update the payment details on the current token. No change needed from your side.
     414
     415### 9. Response
    378416The response contains information about the order such as Cart, Status, PaymentType and much more.
    379417
     
    542580echo $response['Gui']['Snippet']
    543581```
    544 ### 9. Additional requests
    545 
    546 #### 9.1 GetAvailablePartPaymentCampaigns
     582### 10. Additional requests
     583
     584#### 10.1 GetAvailablePartPaymentCampaigns
    547585
    548586GetAvailablePartPaymentCampaigns can be used to fetch the details of all the campaigns that are available on the merchant
     
    635673If you are a finnish merchant you have to display ALL the values described [here](https://www.kkv.fi/sv/beslut-och-publikationer/publikationer/konsumentrombudsmannens-riktlinjer/enligt-substans/tillhandahallande-av-konsumentkrediter/#luottolinjausSVE5.1) to be compliant with finnish laws.
    636674
    637 ### 10. Data structures
    638 
    639 #### 10.1 MerchantSettings
     675### 11. Data structures
     676
     677#### 11.1 MerchantSettings
    640678
    641679| Parameters                | Required  | Type      | Description  | Limits  |
    642680|------------------------------|-----------|-----------|--------------|---------|
    643 | TermsUri                     |    *      | string    | URI to a page which contains terms of the webshop. | 1-500 characters, must be a valid Url |
    644 | CheckoutUri                  |    *      | string    | URI to the page in the webshop that loads the Checkout.  | 1-500 characters, must be a valid Url |
    645 | ConfirmationUri              |    *      | string    | URI to the page in the webshop displaying specific information to a customer after the order has been confirmed. | 1-500 characters, must be a valid Url |
     681| TermsUri                     |    *      | string    | URI to a page which contains terms of the web shop. | 1-500 characters, must be a valid Url |
     682| CheckoutUri                  |    *      | string    | URI to the page in the web shop that loads the Checkout.  | 1-500 characters, must be a valid Url |
     683| ConfirmationUri              |    *      | string    | URI to the page in the web shop displaying specific information to a customer after the order has been confirmed. | 1-500 characters, must be a valid Url |
    646684| PushUri                      |    *      | string    | URI to a location that is expecting callbacks when CheckoutOrderStatus is changed. Uri should use the {checkout.order.uri} placeholder.  | 1-500 characters, must be a valid Url |
    647685| CheckoutValidationCallBackUri|           | string    | An optional URl to a location that is expecting callbacks from the Checkout to validate order’s stock status, and also the possibility to update checkout with an updated ClientOrderNumber. Uri may have a {checkout.order.uri} placeholder which will be replaced with the CheckoutOrderId. Please refer below [*CheckoutValidationCallbackResponse*](#1013-checkoutvalidationcallbackresponse) to see the expected response. | 1-500 characters, must be a valid Url |
     
    649687| PromotedPartPaymentCampaign  |           | integer   | Valid CampaignID. If used then the chosen campaign will be shown as the first payment method in all payment method lists. | Must be valid CampaignID |
    650688
    651 #### 10.2 Items
     689#### 11.2 Items
    652690
    653691| Parameters                | Required  | Type                                 | Description         |
     
    655693| Items                        |    *      | List of [*OrderRows*](#103-orderrow)  | See structure below |
    656694
    657 #### 10.3 OrderRow
     695#### 11.3 OrderRow
    658696
    659697| Parameters                | Required   | Type      | Description  | Limits  |
    660698|------------------------------|------------|-----------|--------------|---------|
    661 | ArticleNumber                |            | String    | Articlenumber as a string, can contain letters and numbers. | Maximum 1000 characters |
     699| ArticleNumber                |            | String    | Article number as a string, can contain letters and numbers. | Maximum 1000 characters |
    662700| Name                         |    *       | String    | Article name | 1-40 characters |
    663701| Quantity                     |    *       | Integer       | Set as basis point (1/100) e.g  2 = 200      | 1-9 digits. Minor currency |
    664702| UnitPrice                    |    *       | Integer       | Set as basis point (1/100) e.g. 25.00 = 2500 | 1-13 digits, can be negative. Minor currency |
    665 | DiscountPercent              |            | Integer       | The discountpercent of the product. | 0-100 |
     703| DiscountPercent              |            | Integer       | The discount percent of the product. | 0-100 |
    666704| VatPercent                   |    *       | Integer       | The VAT percentage of the current product. | Valid vat percentage for that country. Minor currency.  |
    667705| Unit                         |            | String        | The unit type, e.g., “st”, “pc”, “kg” etc. | 0-4 characters|
    668 | TemporaryReference           |            | String        | Can be used when creating or updating an order. The returned rows will have their corresponding temporaryreference as they were given in the indata. It will not be stored and will not be returned in GetOrder.  | |
     706| TemporaryReference           |            | String        | Can be used when creating or updating an order. The returned rows will have their corresponding "temporaryreference" as they were given in the indata. It will not be stored and will not be returned in GetOrder.  | |
    669707| MerchantData                 |            | String        | Can be used to store data, the data is not displayed anywhere but in the API
    670708
    671 #### 10.4 PresetValue
     709#### 11.4 PresetValue
    672710
    673711| Parameters             | Required  | Type          | Description  |
     
    685723| PhoneNumber               | String        |              | 1-18 digits, can include “+”, “-“s and space |
    686724| PostalCode                | String        |              | Company specific validation |
    687 | IsCompany                 | Boolean       |              | Required if nationalid is set |
    688 
    689 #### 10.5 Gui
     725| IsCompany                 | Boolean       |              | Required if "nationalid" is set |
     726
     727#### 11.5 Gui
    690728
    691729| Parameters               |  Type      | Description  |
     
    694732| Snippet                      | String     | HTML-snippet including javascript to populate the iFrame. |
    695733
    696 #### 10.6 Customer
     734#### 11.6 Customer
    697735
    698736| Parameters               | Type      | Description  |
    699737|------------------------------|-----------|--------------|
    700 | NationalId                   | String    | Personal- or organizationnumber. |
    701 | IsCompany                    | Boolean   | True if nationalId is organisationnumber, false if nationalid is personalnumber.   |
     738| NationalId                   | String    | Personal- or organization number. |
     739| IsCompany                    | Boolean   | True if nationalId is organisation number, false if "nationalid" is personal number.   |
    702740| CountryCode                  | String    |  Defined by two-letter ISO 3166-1 alpha-2, i.e. SE, DE, FI etc.|
    703741| Id                           | Integer   | Customer-specific id |
    704742
    705 #### 10.7 Address
     743#### 11.7 Address
    706744
    707745| Parameters                | Type      | Description  |
     
    718756| AddressLines                 | Array of strings | Null unless international flow is used
    719757
    720 #### 10.8 CheckoutOrderStatus
     758#### 11.8 CheckoutOrderStatus
    721759
    722760The order can only be considered “ready to send to customer” when the CheckoutOrderStatus is Final. No other status can guarantee payment.
     
    728766| Final                        | The order is completed in the checkout and managed by WebPay’s subsystems. The order can now be administrated using either the library or browsing to the admin user interface|
    729767
    730 #### 10.9 Locale
     768#### 11.9 Locale
    731769| Parameter | Description     |
    732770|-----------|-----------------|
     
    739777
    740778
    741 #### 10.10 PaymentType
     779#### 11.10 PaymentType
    742780| Parameter   | Description     |
    743781|-------------|-----------------|
     
    755793| LEASINGUNAPPROVED | Leasing (Manual approve process by Sveas leasing department, check Store pay admin page) |
    756794| LEASINGAPPROVED | Leasing (Automatically approved leasing contract)
    757 | TRUSTLY            | The customer paied with Trustly |
     795| TRUSTLY            | The customer paid with Trustly |
    758796| Directbank (varies)  |    The customer paid the order with direct bank e.g. Nordea, SEB. See below for all available parameters |
    759797
     
    778816
    779817
    780 #### 10.11 CampaignCodeInfo
     818#### 11.11 CampaignCodeInfo
    781819| Parameter                 | Type      | Description |
    782820|---------------------------|-----------|-------------|
     
    794832| PaymentPlanType           | Integer   | Type of campaign |
    795833
    796 #### 10.12 IdentityFlags
     834#### 11.12 IdentityFlags
    797835| Parameter                 | Type      | Description |
    798836|---------------------------|-----------|-------------|
     
    801839| HideAnonymous           | Boolean   | Hides anonymous flow, forcing users to identify with their nationalId to perform a purchase |
    802840
    803 #### 10.13 CheckoutValidationCallbackResponse
     841#### 11.13 CheckoutValidationCallbackResponse
    804842If a CheckoutValidationCallbackUri is set on an order when it's created, Svea will send a HTTP GET request to the specified URI when a customer clicks on "Confirm Order".
    805843
     
    811849| ClientOrderNumber |          | String  | Max 32 characters. Set if you want the ClientOrderNumber to be updated. |
    812850
    813 ### 11. HttpStatusCodes
     851### 12. HttpStatusCodes
    814852| Parameter | Type          | Description |
    815853|-----------|---------------|-------------|
     
    827865If the returned ResultCode is not present in the above tables please contact Svea Ekonomi for further information.
    828866
    829 ## 12. Order administration
     867## 13. Order administration
    830868
    831869[See full examples](examples/admin)
     
    843881\Exception - For any other error
    844882
    845 ### 12.1 Get order
     883### 13.1 Get order
    846884This method is used to get the entire order with all its relevant information. Including its deliveries, rows, credits and addresses.
    847885
     
    856894| Parameters OUT                | Type      | Description  |
    857895|-------------------------------|-----------|--------------|
    858 | Order          | array     | An array containing all the order details. See [12.14 Data objects](#1215-data-objects) |
    859 
    860 
    861 
    862 ### 12.2 Get task
     896| Order          | array     | An array containing all the order details. See [13.14 Data objects](#1215-data-objects) |
     897
     898
     899
     900### 13.2 Get task
    863901A task will explain the status of a previously performed operation. When finished it will point towards the new resource with the Location.
    864902#### Parameters
     
    874912| Task                          | [Task](#12154-task)      | An object containing details regarding a queued task |
    875913
    876 ### 12.3 Deliver order
     914### 13.3 Deliver order
    877915Creates a delivery on a checkout order. Assuming the order got the **CanDeliverOrder** action.
    878916
     
    894932| HeaderLocation                | string    | URI to the created task. (Absolute URL) |
    895933
    896 ### 12.3.1 Row Delivery Options
     934### 13.3.1 Row Delivery Options
    897935
    898936| Parameter                     | Type       | Description  |
     
    901939| quantity                      | int        | Number of items to credit |
    902940
    903 ### 12.4 Deliver order with lower amount
     941### 13.4 Deliver order with lower amount
    904942Creates a delivery on a checkout order with a lower amount than the total, canceling the remaining amount. Assuming the order got **CanDeliverOrder** and **CanCancelAmount** action.
    905943
     
    918956| HeaderLocation       | string | URI to the created task (Absolute URL)  |
    919957
    920 ### 12.5 Cancel Order
     958### 13.5 Cancel Order
    921959Cancel an order before it has been delivered. Assuming the order has the action **CanCancelOrder**.
    922960
     
    930968If the order is successfully cancelled, Response is empty.
    931969
    932 ### 12.6 Cancel order amount
     970### 13.6 Cancel order amount
    933971By specifying a higher amount than the current order cancelled amount then the order cancelled amount will increase,
    934972assuming the order has the action **CanCancelOrderAmount**. The delta between the new *CancelledAmount* and the former *CancelledAmount* will be cancelled.
     
    946984If order amount is successfully cancelled, Response is empty.
    947985
    948 ### 12.7 Cancel order row
     986### 13.7 Cancel order row
    949987Changes the status of an order row to *Cancelled*, assuming the order has the action **CanCancelOrderRow** and the OrderRow has the action **CanCancelRow**.
    950988
     
    959997If order row is successfully cancelled, Response is empty.
    960998
    961 ### 12.8 Credit order rows
     999### 13.8 Credit order rows
    9621000Creates a new credit on the specified delivery with specified order rows. Assuming the delivery has action **CanCreditOrderRows** and the specified order rows also has action **CanCreditRow**
    9631001
     
    9771015On the returned URL can be checked status of the task.
    9781016
    979 ### 12.8.1 Row Crediting Options
     1017### 13.8.1 Row Crediting Options
    9801018
    9811019| Parameter                     | Type       | Description  |
     
    9841022| quantity                      | int        | Number of items to credit |
    9851023
    986 ### 12.9 Credit new order row
     1024### 13.9 Credit new order row
    9871025By specifying a new credit row, a new credit row will be created on the delivery, assuming the delivery has action **CanCreditNewRow**.
    9881026
     
    10011039On the returned URL can be checked status of the task.
    10021040
    1003 ### 12.10 Credit order rows with fee
     1041### 13.10 Credit order rows with fee
    10041042Creates a new credit on the specified delivery with specified order rows. Assuming the delivery has action **CanCreditOrderRows** and the specified order rows also has action **CanCreditRow**. Adds the ability to add a fee to the credit.
    10051043
     
    10191057
    10201058On the returned URL can be checked status of the task.
    1021 ### 12.11 Credit amount
     1059### 13.11 Credit amount
    10221060By specifying a credited amount larger than the current credited amount. A credit is being made on the specified delivery. The credited amount cannot be lower than the current credited amount or larger than the delivered amount.
    10231061
     
    10341072If order amount is successfully credited, Response is empty.
    10351073
    1036 ### 12.12 Add order row
     1074### 13.12 Add order row
    10371075This method is used to add order rows to an order, assuming the order has the action **CanAddOrderRow**.
    10381076If the new order amount will exceed the current order amount, a credit check will be performed.
     
    10521090On the returned URL (HeaderLocation) can be checked status of the task.
    10531091
    1054 ### 12.13 Update order row
     1092### 13.13 Update order row
    10551093This method is used to update an order row, assuming the order has action "CanUpdateOrderRow" and the order row has the action **CanUpdateRow**.
    10561094The method will update all fields set in the payload, if a field is not set the row will keep the current value.
     
    10671105If order row is successfully updated, Response is empty.
    10681106
    1069 ### 12.14 Replace order rows
     1107### 13.14 Replace order rows
    10701108This method is used to update an order row, assuming the order has action "CanUpdateOrderRow".
    10711109This method will delete all the present rows and replace with the ones set in the payload.
     
    10821120
    10831121
    1084 ### 12.15 Data objects
    1085 
    1086 #### 12.15.1 Order
     1122### 13.15 Data objects
     1123
     1124#### 13.15.1 Order
    10871125| Parameter             |   Type        | Description                                               |
    10881126|-----------------------|---------------|-----------------------------------------------------------|
     
    10951133| PaymentType           | string        | The final payment method for the order. Will only have a value when the order is locked, otherwise null. See list of possible PaymentType below.|
    10961134| CreationDate          | DateTime      | Date and time when the order was created|
    1097 | NationalId            | string        | Personal- or organizationnumber.|
    1098 | IsCompany             | boolean       | True if nationalid is organisationnumber, false if nationalid is personalnumber.| 
     1135| NationalId            | string        | Personal- or organization number.|
     1136| IsCompany             | boolean       | True if "nationalid" is organisation number, false if "nationalid" is personal number.| 
    10991137| OrderAmount           | int           | The total amount on the order. Minor unit|
    11001138| CancelledAmount       | int           | The total cancelled amount on the order. Minor uit|
     
    11051143| Actions               | List of String | A list of actions possible on the order.|
    11061144
    1107 #### 12.15.2 Delivery
     1145#### 13.15.2 Delivery
    11081146
    11091147| Parameter             |   Type        | Description                                               |
     
    11181156| Actions               | List of string | A list of actions possible on the delivery.|
    11191157
    1120 #### 12.15.3 Credit
     1158#### 13.15.3 Credit
    11211159
    11221160| Parameter             |   Type        | Description                                               |
     
    11261164| Actions               | List of String | A list of actions possible on the credit.|
    11271165
    1128 #### 12.15.4 Task
     1166#### 13.15.4 Task
    11291167
    11301168| Parameter             |   Type        | Description                                               |
     
    11331171| Status                | String        | Status of the task |
    11341172
    1135 #### 12.15.5 Order Row
     1173#### 13.15.5 Order Row
    11361174
    11371175|Parameter              |R  | RO | Type     | Description                   |   Limits|
    11381176|-----------------------|---|----|----------|-------------------------------|-------------------|
    11391177| OrderRowId            |   | *  |int      | Order row id from underlying system, unique on order. | Not possible to set through API, only get.|
    1140 | ArticleNumber         |   |    |string    | Articlenumber as a string, can contain letters and numbers. | Maximum 256 characters.   |
     1178| ArticleNumber         |   |    |string    | Article number as a string, can contain letters and numbers. | Maximum 256 characters.   |
    11411179| Name                  | * |    |string    | Article name. | 1-40 characters. |
    11421180| Quantity              | * |    |int      | Quantity of the product. | 1-9 digits. Minor unit.|
    11431181| UnitPrice             | * |    |int      | Price of the product including VAT. | 1-13 digits, can be negative. Minor currency.|
    1144 | DiscountPercent       |   |    |int      | The discountpercent of the product. | 0-9900. Minor unit|
     1182| DiscountPercent       |   |    |int      | The discount percent of the product. | 0-9900. Minor unit|
    11451183| VatPercent            | * |    |int      | The VAT percentage of the current product. | Valid vat percentage for that country . Minor unit.0-10000|
    11461184| Unit                  |   |    |string    | The unit type, e.g., “st”, “pc”, “kg” etc.  | 0-4 characters. |
     
    11481186| Actions               |   | *  |List of string | A list of actions possible on the order row. See list of OrderRow actions below. | Not possible to set through API, only get.|
    11491187
    1150 #### 12.15.6 Address
     1188#### 13.15.6 Address
    11511189
    11521190| Parameter             |   Type        | Description                                               |
     
    11591197| CountryCode           |   string      |   2-letter ISO country code |
    11601198
    1161 #### 12.15.7 Order Status
     1199#### 13.15.7 Order Status
    11621200
    11631201| Parameter             |  Description                                               |
     
    11681206| Failed                | The payment for this order has failed |
    11691207
    1170 #### 12.15.8 Order actions
     1208#### 13.15.8 Order actions
    11711209
    11721210| Parameter                 |  Description                                               |
     
    11801218| CanUpdateOrderRow         ||
    11811219
    1182 #### 12.15.9 Delivery actions
     1220#### 13.15.9 Delivery actions
    11831221
    11841222| Parameter             |  Description                                               |
     
    11881226| CanCreditAmount       ||     
    11891227
    1190 #### 12.15.10 Order Row actions
     1228#### 13.15.10 Order Row actions
    11911229
    11921230| Parameter             |  Description                                               |
     
    11971235| CanUpdateRow          ||
    11981236
    1199 ## 13. Javascript API
     1237## 14. Javascript API
    12001238
    12011239(Please note that the API is still considered a work in progress and might see significant changes.)
  • svea-webpay-for-woocommerce/trunk/vendor/sveaekonomi/checkout/VERSION

    r3319942 r3327589  
    1 1.5.2
     11.6.0
  • svea-webpay-for-woocommerce/trunk/vendor/sveaekonomi/checkout/composer.json

    r3319942 r3327589  
    11{
    22  "name": "sveaekonomi/checkout",
    3   "version": "1.5.3",
     3  "version": "1.6.0",
    44  "description": "Php integration library for Svea Checkout",
    55  "license": "Apache-2.0",
     
    2626    "phploc/phploc": "^2.0.1",
    2727    "sebastian/phpcpd": "^2.0.4",
    28     "symfony/dependency-injection": "^2.7.51 || ^2.8.50 || ^3.4.26 || ^4.1.12 || ^4.2.7"
     28      "symfony/dependency-injection": "^2.7.51 || ^2.8.50 || ^3.4.26 || ^4.1.12 || ^4.2.7"
    2929  },
    3030  "scripts": {
  • svea-webpay-for-woocommerce/trunk/vendor/sveaekonomi/checkout/src/CheckoutClient.php

    r3065202 r3327589  
    7070
    7171        return $this->executeAction($class, $data);
     72    }
     73
     74    /**
     75     * Change payment method for existing Svea Checkout order.
     76     *
     77     * @param array $data
     78     * @return mixed
     79     */
     80    public function changePaymentMethod( array $data )
     81    {
     82        return $this->executeAction(ImplementationFactory::returnChangePaymentMethodClass($this->connector), $data);
     83       
    7284    }
    7385
  • svea-webpay-for-woocommerce/trunk/vendor/sveaekonomi/checkout/src/Implementation/ImplementationFactory.php

    r3065202 r3327589  
    55use Svea\Checkout\Transport\Connector;
    66use Svea\Checkout\Validation\ValidateCreateOrderData;
     7use Svea\Checkout\Validation\ValidateChangePaymentMethodData;
    78use Svea\Checkout\Validation\ValidateCreateTokenOrderData;
    89use Svea\Checkout\Validation\ValidateGetOrderData;
     
    1718    /**
    1819     * @param Connector $connector
    19      * @return ImplementationInterface
     20     * @return CreateOrder
    2021     */
    2122    public static function returnCreateOrderClass(Connector $connector)
     
    2627    /**
    2728     * @param Connector $connector
    28      * @return ImplementationInterface
     29     * @return CreateTokenOrder
    2930     */
    30     public static function returnCreateTokenOrderClass(Connector $connector) {
     31    public static function returnCreateTokenOrderClass(Connector $connector)
     32    {
    3133        return new CreateTokenOrder($connector, new ValidateCreateTokenOrderData());
    3234    }
     
    3436    /**
    3537     * @param Connector $connector
    36      * @return ImplementationInterface
     38     * @return ChangePaymentMethod
     39     */
     40    public static function returnChangePaymentMethodClass(Connector $connector)
     41    {
     42        return new ChangePaymentMethod($connector, new ValidateChangePaymentMethodData());
     43    }
     44
     45    /**
     46     * @param Connector $connector
     47     * @return GetOrder
    3748     */
    3849    public static function returnGetOrderClass(Connector $connector)
     
    4354    /**
    4455     * @param Connector $connector
    45      * @return ImplementationInterface
     56     * @return GetTokenOrder
    4657     */
    4758    public static function returnGetTokenOrderClass(Connector $connector)
     
    5263    /**
    5364     * @param Connector $connector
    54      * @return ImplementationInterface
     65     * @return GetToken
    5566     */
    5667    public static function returnGetTokenClass(Connector $connector)
     
    6172    /**
    6273     * @param Connector $connector
    63      * @return ImplementationInterface
     74     * @return UpdateToken
    6475     */
    6576    public static function returnUpdateTokenClass(Connector $connector)
     
    7081    /**
    7182     * @param Connector $connector
    72      * @return ImplementationInterface
     83     * @return UpdateOrder
    7384     */
    7485    public static function returnUpdateOrderClass(Connector $connector)
     
    7990    /**
    8091     * @param Connector $connector
    81      * @return ImplementationInterface
     92     * @return GetAvailablePartPaymentCampaigns
    8293     */
    8394    public static function returnGetAvailablePartPaymentCampaignsClass(Connector $connector)
  • svea-webpay-for-woocommerce/trunk/vendor/sveaekonomi/webpay/composer.json

    r3319942 r3327589  
    11{
    22  "name": "sveaekonomi/webpay",
    3   "version": "3.16.0",
     3  "version": "3.16.1",
    44  "description": "Php integration library for Svea payment methods",
    55  "license": "Apache-2.0",
  • svea-webpay-for-woocommerce/trunk/vendor/sveaekonomi/webpay/src/BuildOrder/RowBuilders/FixedDiscount.php

    r3319942 r3327589  
    3030    public $description;
    3131
     32    /**
     33     * @var float $amount
     34     */
     35    public $amount;
     36
    3237    /**
    3338     * @var float $amountIncVat
     
    5156
    5257    /**
    53      * @var string $rowType - The type of row to be created.
    54      */
    55     public $rowType = 'Row';
     58     * @var string|null $rowType - The type of row to be created.
     59     */
     60    public $rowType = null;
    5661
    5762    /**
  • svea-webpay-for-woocommerce/trunk/vendor/sveaekonomi/webpay/src/BuildOrder/RowBuilders/InvoiceFee.php

    r3319942 r3327589  
    5151
    5252    /**
    53      * @var string $rowType - Optional type of row name
     53     * @var string|null $rowType - Optional type of row name
    5454     */
    5555    public $rowType = "InvoiceFee";
     56
     57    /**
     58     * @var string $name
     59     */
     60    public $name;
    5661
    5762    /**
  • svea-webpay-for-woocommerce/trunk/vendor/sveaekonomi/webpay/src/BuildOrder/RowBuilders/OrderRow.php

    r3319942 r3327589  
    7171
    7272    /**
    73      * @var string $rowType - Optional type of row name
    74      */
    75     public $rowType = "Row";
     73     * @var string|null $rowType - Optional type of row name
     74     */
     75    public $rowType = null;
    7676
    7777    /**
  • svea-webpay-for-woocommerce/trunk/vendor/sveaekonomi/webpay/src/BuildOrder/RowBuilders/RelativeDiscount.php

    r3319942 r3327589  
    3434
    3535    /**
    36      * @var string $rowType - Optional type of row name
     36     * @var string|null $rowType - Optional type of row name
    3737     */
    38     public $rowType = "Row";
     38    public $rowType = null;
    3939
    4040    /**
  • svea-webpay-for-woocommerce/trunk/vendor/sveaekonomi/webpay/src/BuildOrder/RowBuilders/ShippingFee.php

    r3319942 r3327589  
    6262
    6363    /**
    64      * @var string $rowType - Optional type of row name
    65      */
    66     public $rowType = "Row";
     64     * @var string|null $rowType - Optional type of row name
     65     */
     66    public $rowType = null;
    6767
    6868    /**
  • svea-webpay-for-woocommerce/trunk/vendor/sveaekonomi/webpay/version.json

    r3319942 r3327589  
    11{
    2     "version": "3.16.0"
     2    "version": "3.16.1"
    33}
Note: See TracChangeset for help on using the changeset viewer.