Plugin Directory

Changeset 3393028


Ignore:
Timestamp:
11/10/2025 03:17:40 PM (5 months ago)
Author:
multisafepayplugin
Message:

Update to version 6.10.0 from GitHub

Location:
multisafepay
Files:
10 added
62 edited
1 copied

Legend:

Unmodified
Added
Removed
  • multisafepay/tags/6.10.0/assets/admin/js/multisafepay-admin.js

    r3230524 r3393028  
    33        function (
    44        ) {
    5             function togglePaymentSettingsFields( direct, merchantInfo ) {
    6                 const formInput = $( merchantInfo ).closest( 'tr' );
     5            function togglePaymentSettingsFields(conditional, fieldToToggle) {
     6                const formInput = $(fieldToToggle).closest('tr');
     7                const validValues = ['1', 'qr', 'qr_only'];
     8                const selectedValue = $(conditional).find('option:selected').val();
     9                const isValidSelection = validValues.indexOf(selectedValue) !== -1;
    710
    8                 if ( $( direct ).find( 'option:selected' ).val() === '1' ) {
    9                     formInput.show();
    10                 } else {
    11                     formInput.hide();
    12                 }
     11                // Initial state
     12                formInput[isValidSelection ? 'show' : 'hide']();
    1313
    14                 $( direct ).on( 'change', function () {
    15                     if ( $( this ).find( 'option:selected' ).val() === '1' ) {
    16                         formInput.show();
    17                     } else {
    18                         formInput.hide();
    19                     }
     14                // Handle select changes
     15                $(conditional).on('change', function() {
     16                    const currentValue = $(this).find('option:selected').val();
     17                    formInput[validValues.indexOf(currentValue) !== -1 ? 'show' : 'hide']();
    2018                });
    2119            }
     
    2927                '#woocommerce_multisafepay_applepay_use_direct_button',
    3028                '#woocommerce_multisafepay_applepay_merchant_name'
     29            );
     30
     31            togglePaymentSettingsFields(
     32                '#woocommerce_multisafepay_bancontact_payment_component',
     33                '#woocommerce_multisafepay_bancontact_qr_width'
    3134            );
    3235
  • multisafepay/tags/6.10.0/assets/public/css/multisafepay-public.css

    r3264984 r3393028  
    5555    background-size: 84px 33px !important;
    5656}
    57 @supports (not (-moz-appearance:none)) {
    58     .msp-ui-qr-code {
    59         max-width: 55% !important;
    60         max-height: 55% !important;
    61     }
    62 }
    63 @supports (-moz-appearance:none) {
    64     .msp-ui-qr-code {
    65         width: 206px !important;
    66         height: 206px !important;
    67         max-width: 206px !important;
    68         max-height: 206px !important;
    69     }
    70 }
  • multisafepay/tags/6.10.0/assets/public/js/multisafepay-blocks/build/index.asset.php

    r3090804 r3393028  
    1 <?php return array('dependencies' => array(), 'version' => '3963884df3562cc5304a');
     1<?php return array('dependencies' => array(), 'version' => '4253c5748ae7a4b32641');
  • multisafepay/tags/6.10.0/assets/public/js/multisafepay-blocks/build/index.js

    r3090804 r3393028  
    1 (()=>{const e=e=>({name:e.id,label:e.title,paymentMethodId:e.id,edit:React.createElement("div",null,""),canMakePayment:()=>!0,ariaLabel:e.title,content:React.createElement("div",null,e.description)});document.addEventListener("DOMContentLoaded",(()=>{(({wc:t,multisafepay_gateways:a})=>{const{registerPaymentMethod:n}=t.wcBlocksRegistry;a.forEach((t=>{(t.is_admin||"multisafepay_applepay"!==t.id||window.ApplePaySession&&ApplePaySession.canMakePayments())&&n(e(t))}))})(window)}))})();
     1(()=>{const e=e=>({name:e.id,label:e.title,paymentMethodId:e.id,edit:React.createElement("div",null,""),canMakePayment:()=>!0,ariaLabel:e.title,content:React.createElement("div",null,e.description)});document.addEventListener("DOMContentLoaded",()=>{(({wc:t,multisafepay_gateways:a})=>{const{registerPaymentMethod:n}=t.wcBlocksRegistry;a.forEach(t=>{(t.is_admin||"multisafepay_applepay"!==t.id||window.ApplePaySession&&ApplePaySession.canMakePayments())&&n(e(t))})})(window)})})();
  • multisafepay/tags/6.10.0/assets/public/js/multisafepay-payment-component.js

    r3264984 r3393028  
    160160                    this.remove_payload_and_tokenize();
    161161                    this.logger( this.get_payment_component().getOrderData() );
    162                     var payload  = this.get_payment_component().getPaymentData().payload;
    163                     var tokenize = this.get_payment_component().getPaymentData().tokenize ? this.get_payment_component().getPaymentData().tokenize : '0';
     162                    const payload  = this.get_payment_component().getPaymentData().payload;
     163                    const tokenize = this.get_payment_component().getPaymentData().tokenize ? this.get_payment_component().getPaymentData().tokenize : '0';
    164164                    this.insert_payload_and_tokenize( payload, tokenize );
    165165                }
     
    335335
    336336        maybe_init_payment_component() {
    337             // There is no way to know if the payment component exist or not; except for checking the DOM elements
     337            // There is no way to know if the payment component exists or not; except for checking the DOM elements
    338338            if ( $( this.payment_component_container_selector + ' > .msp-container-ui' ).length > 0) {
    339339                return;
  • multisafepay/tags/6.10.0/assets/public/js/multisafepay-validator-wallets.js

    r3306839 r3393028  
    895895        const errorLink                = document.createElement( 'a' );
    896896        errorLink.href                 = '#' + error[0].field;
    897         errorLink.style.textDecoration = 'none'; // Don't show underline on the text
     897        errorLink.style.textDecoration = 'underline'; // Showing underline like WooCommerce
    898898
    899899        // Create a strong element for the field name/error
  • multisafepay/tags/6.10.0/multisafepay.php

    r3306839 r3393028  
    55 * Plugin URI:              https://docs.multisafepay.com/docs/woocommerce
    66 * Description:             MultiSafepay Payment Plugin
    7  * Version:                 6.9.0
     7 * Version:                 6.10.0
    88 * Author:                  MultiSafepay
    99 * Author URI:              https://www.multisafepay.com
     
    1212 * License URI:             http://www.gnu.org/licenses/gpl-3.0.html
    1313 * Requires at least:       6.0
    14  * Tested up to:            6.8.1
     14 * Tested up to:            6.8.3
    1515 * WC requires at least:    6.0.0
    16  * WC tested up to:         9.8.5
     16 * WC tested up to:         10.2.2
    1717 * Requires PHP:            7.3
    1818 * Text Domain:             multisafepay
     
    2727 * Plugin version
    2828 */
    29 define( 'MULTISAFEPAY_PLUGIN_VERSION', '6.9.0' );
     29define( 'MULTISAFEPAY_PLUGIN_VERSION', '6.10.0' );
    3030
    3131/**
    3232 * Plugin URL
    33  * Do not include a trailing slash. Should be include it in the string with which is concatenated
     33 * Do not include a trailing slash. Should be included it in the string with which is concatenated
    3434 */
    3535define( 'MULTISAFEPAY_PLUGIN_URL', plugins_url( '', __FILE__ ) );
     
    3737/**
    3838 * Plugin dir path
    39  * Include a trailing slash. Should not be include it in the string with which is concatenated
     39 * Include a trailing slash. Should not be included it in the string with which is concatenated
    4040 */
    4141define( 'MULTISAFEPAY_PLUGIN_DIR_PATH', plugin_dir_path( __FILE__ ) );
  • multisafepay/tags/6.10.0/readme.txt

    r3306839 r3393028  
    33Tags: multisafepay, payment gateway, credit cards, ideal, bnpl
    44Requires at least: 6.0
    5 Tested up to: 6.8.1
     5Tested up to: 6.8.3
    66Requires PHP: 7.3
    7 Stable tag: 6.9.0
     7Stable tag: 6.10.0
    88License: MIT
    99
     
    8080
    8181= Manual Installation =
    82 * Download the plugin from the Wordpress Plugin Directory
     82* Download the plugin from the WordPress Plugin Directory
    8383* Unzip the downloaded file to a local directory
    8484* Upload the directory 'multisafepay' to /wp-content/plugins/ on the remote server
     
    110110
    111111It is possible to generate a payment link when an order has been created at the backend in WooCommerce.
    112 The customer will receive the payment link in the email send by WooCommerce with the order details. Also the payment link will be added to the order notes.
     112The customer will receive the payment link in the email send by WooCommerce with the order details. Also, the payment link will be added to the order notes.
    113113
    114114Please follow these steps:
     
    139139
    140140== Changelog ==
     141= Release Notes - WooCommerce 6.10.0 (Nov 10th, 2025) =
     142
     143### Added
     144+ PLGWOOS-1010: Add contract type selection for Billink between B2C and B2B
     145+ PLGWOOS-1006: Add support custom image size for Bancontact QR codes
     146
     147### Fixed
     148+ PLGWOOS-956: MultiSafepay PostePay is being listed as only one payment method, but it should be two
     149
    141150= Release Notes - WooCommerce 6.9.0 (Jun 5th, 2025) =
    142151
    143152### Added
    144153+ PLGWOOS-1003: Add zip code and email format validation to QR code implementation
    145 + PLGWOOS-1001: Improvement over QR code implementation validating checkout when"ship to a different address" is checked.
     154+ PLGWOOS-1001: Improvement over QR code implementation validating checkout when "ship to a different address" is checked.
    146155
    147156### Fixed
     
    384393### Changed
    385394+ DAVAMS-547: AfterPay -> Riverty rebrand
    386 + PLGWOOS-837: Declare support for Wordpress version 6.1 and WooCommerce version 7.1
     395+ PLGWOOS-837: Declare support for WordPress version 6.1 and WooCommerce version 7.1
    387396
    388397= Release Notes - WooCommerce 5.1.0 (Sep 30th, 2022) =
     
    404413+ PLGWOOS-827: Drop support for PHP 7.2
    405414
    406 = Release Notes - WooCommerce 4.17.2 (Jul 22st, 2022) =
     415= Release Notes - WooCommerce 4.17.2 (Jul 22nd, 2022) =
    407416
    408417### Fixed
    409418+ PLGWOOS-825: Fix an issue in which some payment methods are not being shown in the checkout, because of the setting field country selector is assuming the wrong value in some cases
    410419
    411 = Release Notes - WooCommerce 4.17.1 (Jul 22st, 2022) =
     420= Release Notes - WooCommerce 4.17.1 (Jul 22nd, 2022) =
    412421
    413422### Changed
     
    445454
    446455### Changed
    447 + PLGWOOS-804: Use default locale if get_locale returns null to prevent third party plugin errors
     456+ PLGWOOS-804: Use default locale if 'get_locale' returns null to prevent third party plugin errors
    448457+ PHPSDK-93: Upgrade the [PHP-SDK](https://github.com/MultiSafepay/php-sdk) dependency to 5.5.0
    449458
    450 = Release Notes - WooCommerce 4.13.1 (Mar 23th, 2022) =
    451 
    452 ### Added
    453 + PLGWOOS-792: Declare support for Wordpress 5.9.2 and WooCommerce 6.3.1
     459= Release Notes - WooCommerce 4.13.1 (Mar 23rd, 2022) =
     460
     461### Added
     462+ PLGWOOS-792: Declare support for WordPress 5.9.2 and WooCommerce 6.3.1
    454463+ PLGWOOS-790: Improvement on debug mode, logging the body of the POST notification request
    455464
     
    483492
    484493### Fixed
    485 + PLGWOOS-763: Fix error on plugin list when application can not connect with wordpress network
     494+ PLGWOOS-763: Fix error on plugin list when application can not connect with WordPress network
    486495
    487496= Release Notes - WooCommerce 4.10.0 (Dec 13th, 2021) =
     
    505514### Added
    506515+ PLGWOOS-715: Add 2 "Generic Gateways" which include a flexible gateway code that allows any merchant to connect to almost every payment method we offer.
    507 + PLGWOOS-746: Declare support for Wordpress 5.8.1 and WooCommerce 5.8.0
     516+ PLGWOOS-746: Declare support for WordPress 5.8.1 and WooCommerce 5.8.0
    508517
    509518### Changed
     
    533542
    534543### Added
    535 + PLGWOOS-723: Declare support for WooCommerce 5.5.2 and Wordpress 5.8
     544+ PLGWOOS-723: Declare support for WooCommerce 5.5.2 and WordPress 5.8
    536545+ PLGWOOS-711: Add missing titles in setting pages
    537546
     
    539548+ PLGWOOS-718: Remove PSP ID string when register the transaction ID in WC_Order->payment_complete()
    540549
    541 = Release Notes - WooCommerce 4.7.0 (Jun 23th, 2021) =
     550= Release Notes - WooCommerce 4.7.0 (Jun 23rd, 2021) =
    542551
    543552### Added
     
    569578+ PLGWOOS-663: Fix stock decreasing error, in relation with Bank Transfer gateway and notification flows
    570579
    571 = Release Notes - WooCommerce 4.5.0 (Mar 31th, 2021) =
    572 
    573 ### Fixed
    574 + PLGWOOS-659: Fix initialization of the plugin on multisite environments in which WooCommerce has been activate network wide
     580= Release Notes - WooCommerce 4.5.0 (Mar 31st, 2021) =
     581
     582### Fixed
     583+ PLGWOOS-659: Fix initialization of the plugin on multisite environments in which WooCommerce has been activated network wide
    575584
    576585### Added
     
    582591+ PLGWOOS-653: Fix overwriting initial order status when transaction is initialized
    583592
    584 = Release Notes - WooCommerce 4.4.0 (Mar 23th, 2021) =
     593= Release Notes - WooCommerce 4.4.0 (Mar 23rd, 2021) =
    585594
    586595### Fixed
     
    602611+ PLGWOOS-629: Add shipping item to the order request, even if this one is free
    603612+ PLGWOOS-631: Add delivery address in order request even if the shipping amount is 0
    604 + PLGWOOS-634: Add settings field to redirect to checkout page or cart page on cancelling the order
     613+ PLGWOOS-634: Add settings field to redirect to check out page or cart page on cancelling the order
    605614+ PLGWOOS-635: Add suggestion to set default initial order status for bank transfer to wc-on-hold
    606615+ PLGWOOS-636: Add notification endpoint from version 3.8.0 to process deprecated notifications
     
    621630
    622631### Added
    623 + PLGWOOS-398: Add support to change the data in the OrderRequest using Wordpress filters
     632+ PLGWOOS-398: Add support to change the data in the OrderRequest using WordPress filters
    624633
    625634### Changed
     
    642651+ PLGWOOS-604: Add forwarded IP to the CustomerDetails object
    643652+ PLGWOOS-597: Support for orders with is_vat_exempt
    644 + PLGWOOS-606: Add chargedback transaction status in plugin settings
     653+ PLGWOOS-606: Add chargeback transaction status in plugin settings
    645654
    646655= Release Notes - WooCommerce 4.1.8 (Mar 5th, 2021) =
     
    653662+ PLGWOOS-594: Fix Credit Card payment method form, to show description if customer is not logged in
    654663
    655 = Release Notes - WooCommerce 4.1.7 (Mar 3th, 2021) =
     664= Release Notes - WooCommerce 4.1.7 (Mar 3rd, 2021) =
    656665
    657666### Changed
     
    681690
    682691
    683 = Release Notes - WooCommerce 4.1.4 (Feb 23th, 2021) =
     692= Release Notes - WooCommerce 4.1.4 (Feb 23rd, 2021) =
    684693
    685694### Fixed
     
    692701
    693702
    694 = Release Notes - WooCommerce 4.1.3 (Feb 21th, 2021) =
     703= Release Notes - WooCommerce 4.1.3 (Feb 21st, 2021) =
    695704
    696705### Fixed
     
    717726+ PLGWOOS-521: Change order status on callback even if merchant did not save the settings, using defaults.
    718727+ PLGWOOS-530: Process notification, even when the payment method returned by MultiSafepay is not registered as WooCommerce gateway.
    719 + PLGWOOS-531: Avoid process refund if amount submited in backend is 0
     728+ PLGWOOS-531: Avoid process refund if amount submitted in backend is 0
    720729
    721730### Fixed
  • multisafepay/tags/6.10.0/src/Main.php

    r3306839 r3393028  
    66use MultiSafepay\WooCommerce\PaymentMethods\PaymentMethodsController;
    77use MultiSafepay\WooCommerce\Services\PaymentComponentService;
     8use MultiSafepay\WooCommerce\Services\PostepayMigrationService;
    89use MultiSafepay\WooCommerce\Services\Qr\QrPaymentComponentService;
    910use MultiSafepay\WooCommerce\Services\Qr\QrPaymentWebhook;
     
    112113            // Filter and return ordered the results of the fields
    113114            $this->loader->add_filter( 'multisafepay_common_settings_fields', $plugin_settings, 'filter_multisafepay_common_settings_fields', 10, 1 );
     115
     116            // Handle PostePay migration in the admin area
     117            $postepay_migration = new PostepayMigrationService();
     118            $this->loader->add_action( 'admin_init', $postepay_migration, 'postepay_migration', 5 );
    114119        }
    115120    }
     
    135140        // Filter per user role
    136141        $this->loader->add_filter( 'woocommerce_available_payment_gateways', $payment_methods, 'filter_gateway_per_user_roles', 13 );
     142        // Filter duplicated branded payment methods
     143        $this->loader->add_filter( 'woocommerce_available_payment_gateways', $payment_methods, 'filter_non_duplicated_branded_names', 14 );
    137144        // Set MultiSafepay transaction as shipped
    138145        $this->loader->add_action( 'woocommerce_order_status_' . str_replace( 'wc-', '', get_option( 'multisafepay_trigger_transaction_to_shipped', 'wc-completed' ) ), $payment_methods, 'set_multisafepay_transaction_as_shipped', 10, 1 );
  • multisafepay/tags/6.10.0/src/PaymentMethods/Base/BasePaymentMethod.php

    r3306839 r3393028  
    425425
    426426    /**
     427     * Return the custom QR width in pixels
     428     *
     429     * @return string
     430     */
     431    public function get_qr_width(): string {
     432        return $this->get_option( 'qr_width', '' );
     433    }
     434
     435    /**
    427436     * Enqueue Javascript related with Payment Component.
    428437     *
     
    439448            $route = MULTISAFEPAY_PLUGIN_URL . '/assets/public/js/multisafepay-payment-component.js';
    440449            wp_enqueue_script( 'multisafepay-payment-component-js', $route, array( 'jquery' ), MULTISAFEPAY_PLUGIN_VERSION, true );
     450
     451            static $enabled_gateways_added = false;
     452            if ( ! $enabled_gateways_added ) {
     453                wp_localize_script( 'multisafepay-payment-component-js', 'multisafepay_payment_component_gateways', $gateways_with_payment_component );
     454                $enabled_gateways_added = true;
     455            }
    441456            wp_localize_script( 'multisafepay-payment-component-js', 'payment_component_config_' . $this->id, $multisafepay_payment_component_config );
    442             wp_localize_script( 'multisafepay-payment-component-js', 'multisafepay_payment_component_gateways', $gateways_with_payment_component );
    443457            wp_enqueue_script( 'multisafepay-payment-component-js' );
    444 
    445458        }
    446459    }
     
    654667                'value'       => $this->get_option( 'payment_component', $this->payment_method->supportsPaymentComponent() ? 'yes' : 'no' ),
    655668            );
     669
     670            if ( 'BILLINK' === $this->get_payment_method_gateway_code() ) {
     671                $form_fields['payment_component']['options']['P'] = __( 'B2C Only', 'multisafepay' );
     672                $form_fields['payment_component']['options']['B'] = __( 'B2B Only', 'multisafepay' );
     673                $form_fields['payment_component']['description'] .= __( '<br /><br /> B2C Only - For individual customers. <br /> B2B Only - For business customers. <br /><br /> Select the appropriate contract type based on your target customer base.', 'multisafepay' );
     674            }
    656675        }
    657676
     
    670689                'value'       => $this->get_option( 'payment_component', $this->payment_method->supportsPaymentComponent() ? 'yes' : 'no' ),
    671690            );
     691            $form_fields['qr_width']          = array(
     692                'title'       => __( 'QR image width', 'multisafepay' ),
     693                'type'        => 'text',
     694                'desc_tip'    => __( 'Defines the width of the QR code in pixels. An appropriate size improves user experience and makes scanning easier.', 'multisafepay' ),
     695                'description' => __( 'The numeric value represents the width in pixels. If left blank, the default size will be used.', 'multisafepay' ),
     696                'default'     => '',
     697            );
    672698        }
    673699
  • multisafepay/tags/6.10.0/src/PaymentMethods/Base/BasePaymentMethodBlocks.php

    r3114383 r3393028  
    5151                    $woocommerce_payment_gateways[] = new BasePaymentMethod( new PaymentMethod( $multisafepay_payment_method ) );
    5252                    foreach ( $multisafepay_payment_method['brands'] as $brand ) {
    53                         if ( ! empty( $brand['allowed_countries'] ) ) {
     53                        if ( ! empty( $brand['allowed_countries'] ) && ! get_option( 'multisafepay_group_credit_cards', false ) ) {
     54                            $brand['id']                   .= '_' . $multisafepay_payment_method['id'];
     55                            $brand['name']                 .= ' - ' . $multisafepay_payment_method['name'];
    5456                            $woocommerce_payment_gateways[] = new BaseBrandedPaymentMethod( new PaymentMethod( $multisafepay_payment_method ), $brand );
    5557                        }
  • multisafepay/tags/6.10.0/src/PaymentMethods/PaymentMethodsController.php

    r3269746 r3393028  
    99use MultiSafepay\Exception\ApiException;
    1010use MultiSafepay\Util\Notification;
     11use MultiSafepay\WooCommerce\PaymentMethods\Base\BasePaymentMethod;
    1112use MultiSafepay\WooCommerce\Services\OrderService;
    1213use MultiSafepay\WooCommerce\Services\PaymentMethodService;
     
    477478        );
    478479    }
     480
     481    /**
     482     * Filter the payment methods to handle duplicated branded names
     483     *
     484     * @param array $payment_gateways
     485     * @return array
     486     */
     487    public function filter_non_duplicated_branded_names( array $payment_gateways ): array {
     488        if ( is_admin() ) {
     489            return $payment_gateways;
     490        }
     491
     492        $valid_gateways = array();
     493        $title_count    = $this->collect_and_count_branded_gateways( $payment_gateways, $valid_gateways );
     494
     495        // Create a reference association between the valid
     496        // gateways and the original payment gateways
     497        $gateway_map = array();
     498        foreach ( $valid_gateways as $valid_gateway ) {
     499            $gateway_map[ $valid_gateway->id ] = $valid_gateway;
     500        }
     501
     502        // Apply title processing
     503        $this->process_gateway_titles( $valid_gateways, $title_count );
     504
     505        // Use the original payment gateways but modify their titles
     506        $result = array();
     507        foreach ( $payment_gateways as $key => $gateway ) {
     508            if ( $gateway instanceof BasePaymentMethod && isset( $gateway_map[ $gateway->id ] ) ) {
     509                $gateway->title = $gateway_map[ $gateway->id ]->title;
     510            }
     511            $result[ $key ] = $gateway;
     512        }
     513
     514        return $result;
     515    }
     516
     517    /**
     518     * Collect all branded gateway codes and count their occurrences
     519     *
     520     * @param array $payment_gateways
     521     * @param array &$valid_gateways Reference to store valid gateways
     522     * @return array
     523     */
     524    private function collect_and_count_branded_gateways( array $payment_gateways, array &$valid_gateways ): array {
     525        $gateway_codes = array();
     526
     527        foreach ( $payment_gateways as $gateway ) {
     528            if ( ! ( $gateway instanceof BasePaymentMethod ) ) {
     529                continue;
     530            }
     531
     532            $valid_gateways[] = $gateway;
     533            $gateway_code     = str_replace( 'multisafepay_', '', $gateway->id );
     534            $gateway_codes[]  = trim( explode( '_', $gateway_code )[0] );
     535        }
     536
     537        return array_count_values( $gateway_codes );
     538    }
     539
     540    /**
     541     * Process gateways and modify titles based on occurrence count
     542     *
     543     * @param array $valid_gateways
     544     * @param array $title_count
     545     * @return void
     546     */
     547    private function process_gateway_titles( array $valid_gateways, array $title_count ): void {
     548        foreach ( $valid_gateways as $gateway ) {
     549            $gateway_code = str_replace( 'multisafepay_', '', $gateway->id );
     550            $base_code    = explode( '_', $gateway_code )[0];
     551
     552            $gateway->title = $gateway->get_title();
     553            if ( isset( $title_count[ $base_code ] ) && ( 1 === $title_count[ $base_code ] ) ) {
     554                $gateway->title = explode( ' - ', $gateway->title )[0];
     555            }
     556        }
     557    }
    479558}
  • multisafepay/tags/6.10.0/src/Services/CustomerService.php

    r3269746 r3393028  
    124124        string $ip_address,
    125125        string $user_agent,
    126         string $company_name = null,
    127         string $customer_id = null,
     126        ?string $company_name = null,
     127        ?string $customer_id = null,
    128128        ?array $browser = null
    129129    ): CustomerDetails {
  • multisafepay/tags/6.10.0/src/Services/OrderService.php

    r3264984 r3393028  
    1111use MultiSafepay\Api\Transactions\OrderRequest\Arguments\TaxTable\TaxRate;
    1212use MultiSafepay\Api\Transactions\OrderRequest\Arguments\TaxTable\TaxRule;
     13use MultiSafepay\Exception\InvalidArgumentException;
    1314use MultiSafepay\WooCommerce\Utils\MoneyUtil;
    1415use WC_Order;
     
    5051     * @param string   $type
    5152     * @return OrderRequest
     53     * @throws InvalidArgumentException
    5254     */
    5355    public function create_order_request( WC_Order $order, string $gateway_code, string $type ): OrderRequest {
     
    9698        }
    9799
     100        // Force BILLINK B2B and B2C transactions to be direct
     101        if ( 'BILLINK' === $gateway_code ) {
     102            $payment_method_id = $order->get_payment_method();
     103            $payment_method    = $this->payment_method_service->get_woocommerce_payment_gateway_by_id( $payment_method_id );
     104
     105            if ( $payment_method ) {
     106                $payment_component_option = $payment_method->get_option( 'payment_component', 'no' );
     107
     108                if ( 'P' === $payment_component_option || 'B' === $payment_component_option ) {
     109                    $order_request->addType( 'direct' );
     110                }
     111            }
     112        }
     113
    98114        $order_request = $this->add_none_tax_rate( $order_request );
    99115
     
    115131
    116132    /**
    117      * @param  WC_Order $order
     133     * @param WC_Order $order
    118134     * @return PaymentOptions
     135     * @throws InvalidArgumentException
    119136     */
    120137    private function create_payment_options( WC_Order $order ): PaymentOptions {
     
    135152            $payment_options->addNotificationMethod( 'GET' );
    136153        }
     154
     155        // Add BILLINK specific settings
     156        $payment_method_id = $order->get_payment_method();
     157        $payment_method    = $this->payment_method_service->get_woocommerce_payment_gateway_by_id( $payment_method_id );
     158
     159        if ( $payment_method && 'BILLINK' === $payment_method->get_payment_method_gateway_code() ) {
     160            $payment_component_option = $payment_method->get_option( 'payment_component', 'no' );
     161
     162            if ( 'P' === $payment_component_option || 'B' === $payment_component_option ) {
     163                $payment_options->addSettings( array( 'gateways' => array( 'BILLINK' => array( 'type' => $payment_component_option ) ) ) );
     164            }
     165        }
     166
    137167        return $payment_options;
    138168    }
  • multisafepay/tags/6.10.0/src/Services/PaymentComponentService.php

    r3306839 r3393028  
    3838
    3939    /**
    40      * Return the arguments required when payment component needs to be initialized
     40     * Return the arguments required when the payment component needs to be initialized
    4141     *
    4242     * @param BasePaymentMethod $woocommerce_payment_gateway
     
    5858                    'country' => ( WC()->customer )->get_billing_country(),
    5959                ),
    60                 'payment_options' => array(
    61                     'template' => array(
    62                         'settings' => array(
    63                             'embed_mode' => 1,
    64                         ),
    65                         'merge'    => true,
    66                     ),
    67                     'settings' => array(
    68                         'connect' => array(
    69                             'issuers_display_mode' => 'select',
    70                         ),
    71                     ),
    72                 ),
     60                'payment_options' => $this->build_payment_options(),
    7361            ),
    7462            'gateway'      => $woocommerce_payment_gateway->get_payment_method_gateway_code(),
     
    9583        // Payment Component QR
    9684        if ( $validate_checkout ) {
    97             $qr_checkout_manager = new QrCheckoutManager();
    98             if ( $qr_checkout_manager->validate_checkout_fields() ) {
    99                 if ( $woocommerce_payment_gateway->is_qr_enabled() ) {
    100                     $payment_component_arguments['orderData']['payment_options']['settings']['connect']['qr'] = array( 'enabled' => 1 );
    101                 }
    102                 if ( $woocommerce_payment_gateway->is_qr_only_enabled() ) {
    103                     $payment_component_arguments['orderData']['payment_options']['settings']['connect']['qr'] = array(
    104                         'enabled' => 1,
    105                         'qr_only' => 1,
    106                     );
    107                 }
    108             }
     85            $this->add_qr_configuration( $payment_component_arguments, $woocommerce_payment_gateway );
    10986        }
    11087
     
    11390
    11491    /**
    115      * Return the arguments required when payment component needs to be initialized via a WP AJAX request
     92     * Build payment options array
     93     *
     94     * @return array
     95     */
     96    private function build_payment_options(): array {
     97        return array(
     98            'template' => array(
     99                'settings' => array(
     100                    'embed_mode' => 1,
     101                ),
     102                'merge'    => true,
     103            ),
     104            'settings' => array(
     105                'connect' => array(
     106                    'issuers_display_mode' => 'select',
     107                ),
     108            ),
     109        );
     110    }
     111
     112    /**
     113     * Add QR configuration to payment component arguments
     114     *
     115     * @param array             $payment_component_arguments
     116     * @param BasePaymentMethod $woocommerce_payment_gateway
     117     * @return void
     118     */
     119    private function add_qr_configuration( array &$payment_component_arguments, BasePaymentMethod $woocommerce_payment_gateway ): void {
     120        $qr_checkout_manager = new QrCheckoutManager();
     121        if ( ! $qr_checkout_manager->validate_checkout_fields() ) {
     122            return;
     123        }
     124
     125        $is_qr_only_enabled = $woocommerce_payment_gateway->is_qr_only_enabled();
     126
     127        if ( $woocommerce_payment_gateway->is_qr_enabled() || $is_qr_only_enabled ) {
     128            $qr_config = array(
     129                'enabled' => 1,
     130                'size'    => 206,
     131            );
     132
     133            if ( $is_qr_only_enabled ) {
     134                $qr_config['qr_only'] = 1;
     135            }
     136            $this->add_qr_width_to_config( $qr_config, $woocommerce_payment_gateway );
     137            $payment_component_arguments['orderData']['payment_options']['settings']['connect']['qr'] = $qr_config;
     138        }
     139    }
     140
     141    /**
     142     * Add QR width to the configuration if specified
     143     *
     144     * @param array             $qr_config
     145     * @param BasePaymentMethod $woocommerce_payment_gateway
     146     * @return void
     147     */
     148    private function add_qr_width_to_config( array &$qr_config, BasePaymentMethod $woocommerce_payment_gateway ): void {
     149        $qr_width = $woocommerce_payment_gateway->get_qr_width();
     150        if ( ! empty( $qr_width ) && is_numeric( $qr_width ) ) {
     151            $qr_config['size'] = (int) $qr_width;
     152        }
     153    }
     154
     155    /**
     156     * Return the arguments required when the payment component needs to be initialized via a WP AJAX request
    116157     *
    117158     * @return void
  • multisafepay/tags/6.10.0/src/Services/PaymentMethodService.php

    r3267803 r3393028  
    161161    public function create_branded_woocommerce_payment_gateways( array $multisafepay_payment_method, array $woocommerce_payment_gateways, PaymentMethod $payment_method ) : array {
    162162        foreach ( $multisafepay_payment_method['brands'] as $brand ) {
    163             if ( ! empty( $brand['allowed_countries'] ) ) {
     163            if ( ! empty( $brand['allowed_countries'] ) && ! get_option( 'multisafepay_group_credit_cards', false ) ) {
     164                $brand['id']                                       .= '_' . $multisafepay_payment_method['id'];
     165                $brand['name']                                     .= ' - ' . $multisafepay_payment_method['name'];
    164166                $payment_method_id                                  = self::get_legacy_woocommerce_payment_gateway_ids( $brand['id'] );
    165167                $woocommerce_payment_gateways[ $payment_method_id ] = new BaseBrandedPaymentMethod( $payment_method, $brand );
  • multisafepay/tags/6.10.0/src/Services/SdkService.php

    r3114383 r3393028  
    5555     * @param Logger|null $logger
    5656     */
    57     public function __construct( string $api_key = null, bool $test_mode = null, ?Logger $logger = null ) {
     57    public function __construct( ?string $api_key = null, ?bool $test_mode = null, ?Logger $logger = null ) {
    5858        $this->api_key   = $api_key ?? $this->get_api_key();
    5959        $this->test_mode = $test_mode ?? $this->get_test_mode();
  • multisafepay/tags/6.10.0/src/Settings/SettingsController.php

    r3048898 r3393028  
    5252            wp_enqueue_style( 'multisafepay-admin-css', MULTISAFEPAY_PLUGIN_URL . '/assets/admin/css/multisafepay-admin.css', array(), MULTISAFEPAY_PLUGIN_VERSION, 'all' );
    5353        }
    54         $sections = array( 'multisafepay_applepay', 'multisafepay_googlepay' );
     54        $sections = array( 'multisafepay_applepay', 'multisafepay_googlepay', 'multisafepay_bancontact' );
    5555        if ( isset( $_GET['section'] ) && in_array( $_GET['section'], $sections, true ) ) {
    5656            wp_enqueue_script( 'multisafepay-admin-js', MULTISAFEPAY_PLUGIN_URL . '/assets/admin/js/multisafepay-admin.js', array(), MULTISAFEPAY_PLUGIN_VERSION, true );
  • multisafepay/tags/6.10.0/vendor/autoload.php

    r3306839 r3393028  
    2020require_once __DIR__ . '/composer/autoload_real.php';
    2121
    22 return ComposerAutoloaderIniteb5be672a765e05cf872148d946d1d0b::getLoader();
     22return ComposerAutoloaderInit431ee68f29f658207118bb5cd3435acb::getLoader();
  • multisafepay/tags/6.10.0/vendor/composer/autoload_real.php

    r3306839 r3393028  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderIniteb5be672a765e05cf872148d946d1d0b
     5class ComposerAutoloaderInit431ee68f29f658207118bb5cd3435acb
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderIniteb5be672a765e05cf872148d946d1d0b', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInit431ee68f29f658207118bb5cd3435acb', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderIniteb5be672a765e05cf872148d946d1d0b', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInit431ee68f29f658207118bb5cd3435acb', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticIniteb5be672a765e05cf872148d946d1d0b::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInit431ee68f29f658207118bb5cd3435acb::getInitializer($loader));
    3333
    3434        $loader->register(true);
  • multisafepay/tags/6.10.0/vendor/composer/autoload_static.php

    r3306839 r3393028  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticIniteb5be672a765e05cf872148d946d1d0b
     7class ComposerStaticInit431ee68f29f658207118bb5cd3435acb
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    6363    {
    6464        return \Closure::bind(function () use ($loader) {
    65             $loader->prefixLengthsPsr4 = ComposerStaticIniteb5be672a765e05cf872148d946d1d0b::$prefixLengthsPsr4;
    66             $loader->prefixDirsPsr4 = ComposerStaticIniteb5be672a765e05cf872148d946d1d0b::$prefixDirsPsr4;
    67             $loader->classMap = ComposerStaticIniteb5be672a765e05cf872148d946d1d0b::$classMap;
     65            $loader->prefixLengthsPsr4 = ComposerStaticInit431ee68f29f658207118bb5cd3435acb::$prefixLengthsPsr4;
     66            $loader->prefixDirsPsr4 = ComposerStaticInit431ee68f29f658207118bb5cd3435acb::$prefixDirsPsr4;
     67            $loader->classMap = ComposerStaticInit431ee68f29f658207118bb5cd3435acb::$classMap;
    6868
    6969        }, null, ClassLoader::class);
  • multisafepay/tags/6.10.0/vendor/composer/installed.json

    r3306839 r3393028  
    33        {
    44            "name": "multisafepay/php-sdk",
    5             "version": "5.17.0",
    6             "version_normalized": "5.17.0.0",
     5            "version": "5.18.0",
     6            "version_normalized": "5.18.0.0",
    77            "source": {
    88                "type": "git",
    99                "url": "https://github.com/MultiSafepay/php-sdk.git",
    10                 "reference": "4c46227cf3139d76ff08bc4191f06445c867798b"
    11             },
    12             "dist": {
    13                 "type": "zip",
    14                 "url": "https://api.github.com/repos/MultiSafepay/php-sdk/zipball/4c46227cf3139d76ff08bc4191f06445c867798b",
    15                 "reference": "4c46227cf3139d76ff08bc4191f06445c867798b",
     10                "reference": "837555d3d4699761ab34387605b192be5421ed63"
     11            },
     12            "dist": {
     13                "type": "zip",
     14                "url": "https://api.github.com/repos/MultiSafepay/php-sdk/zipball/837555d3d4699761ab34387605b192be5421ed63",
     15                "reference": "837555d3d4699761ab34387605b192be5421ed63",
    1616                "shasum": ""
    1717            },
     
    3838                "jschaedl/iban-validation": "Adds additional IBAN validation for \\MultiSafepay\\ValueObject\\IbanNumber"
    3939            },
    40             "time": "2025-06-04T13:12:21+00:00",
     40            "time": "2025-10-15T10:31:17+00:00",
    4141            "type": "library",
    4242            "installation-source": "dist",
     
    4848            "notification-url": "https://packagist.org/downloads/",
    4949            "license": [
    50                 "MIT"
     50                "OSL-3.0"
    5151            ],
    5252            "description": "MultiSafepay PHP SDK",
    5353            "support": {
    5454                "issues": "https://github.com/MultiSafepay/php-sdk/issues",
    55                 "source": "https://github.com/MultiSafepay/php-sdk/tree/5.17.0"
     55                "source": "https://github.com/MultiSafepay/php-sdk/tree/5.18.0"
    5656            },
    5757            "install-path": "../multisafepay/php-sdk"
  • multisafepay/tags/6.10.0/vendor/composer/installed.php

    r3306839 r3393028  
    22    'root' => array(
    33        'name' => 'multisafepay/woocommerce',
    4         'pretty_version' => '6.9.0',
    5         'version' => '6.9.0.0',
     4        'pretty_version' => '6.10.0',
     5        'version' => '6.10.0.0',
    66        'reference' => null,
    77        'type' => 'wordpress-plugin',
     
    1212    'versions' => array(
    1313        'multisafepay/php-sdk' => array(
    14             'pretty_version' => '5.17.0',
    15             'version' => '5.17.0.0',
    16             'reference' => '4c46227cf3139d76ff08bc4191f06445c867798b',
     14            'pretty_version' => '5.18.0',
     15            'version' => '5.18.0.0',
     16            'reference' => '837555d3d4699761ab34387605b192be5421ed63',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../multisafepay/php-sdk',
     
    2121        ),
    2222        'multisafepay/woocommerce' => array(
    23             'pretty_version' => '6.9.0',
    24             'version' => '6.9.0.0',
     23            'pretty_version' => '6.10.0',
     24            'version' => '6.10.0.0',
    2525            'reference' => null,
    2626            'type' => 'wordpress-plugin',
  • multisafepay/tags/6.10.0/vendor/composer/platform_check.php

    r2643314 r3393028  
    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}
  • multisafepay/tags/6.10.0/vendor/multisafepay/php-sdk/CHANGELOG.md

    r3306839 r3393028  
    66
    77## [Unreleased]
     8
     9## [5.18.0] - 2025-10-15
     10### Added
     11- PHPSDK-178: Extend PaymentDetails object, including Card Payment related information
     12
     13## [5.17.2] - 2025-09-17
     14### Added
     15- PHPSDK-181: Add an auxiliary non-static method for verifyNotification()
     16
     17## [5.17.1] - 2025-08-21
     18### Added
     19- PLGMAG2V2-859: Add CODE_OF_CONDUCT.md
     20- PHPSDK-176: Add badges to the README.md document
     21
     22### Changed
     23- PHPSDK-180: Use constant-time string comparison in Notification::verifyNotification, thanks to @CasEbb
    824
    925## [5.17.0] - 2025-06-04
  • multisafepay/tags/6.10.0/vendor/multisafepay/php-sdk/README.md

    r3230524 r3393028  
    55# MultiSafepay PHP SDK
    66
    7 [![Latest stable version](https://img.shields.io/packagist/v/multisafepay/php-sdk)](https://packagist.org/packages/multisafepay/php-sdk)
     7[![Build](https://img.shields.io/github/actions/workflow/status/multisafepay/php-sdk/build.yml?style=for-the-badge)](https://github.com/MultiSafepay/php-sdk/actions)
     8[![Codecov](https://img.shields.io/codecov/c/github/multisafepay/php-sdk?style=for-the-badge)](https://app.codecov.io/gh/MultiSafepay/php-sdk)
     9[![Latest stable version](https://img.shields.io/github/v/release/multisafepay/php-sdk?style=for-the-badge)](https://packagist.org/packages/multisafepay/php-sdk)
     10[![Total downloads](https://img.shields.io/packagist/dt/multisafepay/php-sdk?style=for-the-badge)](https://packagist.org/packages/multisafepay/php-sdk/stats)
     11[![License](https://img.shields.io/github/license/multisafepay/php-sdk?style=for-the-badge)](https://github.com/MultiSafepay/php-sdk/blob/master/LICENSE.md)
     12
    813
    914## About MultiSafepay
  • multisafepay/tags/6.10.0/vendor/multisafepay/php-sdk/composer.json

    r3306839 r3393028  
    33  "description": "MultiSafepay PHP SDK",
    44  "type": "library",
    5   "license": "MIT",
    6   "version": "5.17.0",
     5  "license": "OSL-3.0",
     6  "version": "5.18.0",
    77  "require": {
    88    "php": "^7.2|^8.0",
  • multisafepay/tags/6.10.0/vendor/multisafepay/php-sdk/src/Api/Transactions/TransactionResponse/PaymentDetails.php

    r2927749 r3393028  
    88
    99use MultiSafepay\Api\Base\DataObject;
     10use MultiSafepay\Api\Transactions\TransactionResponse\PaymentDetails\CardAuthenticationDetails;
     11use MultiSafepay\Api\Transactions\TransactionResponse\PaymentDetails\CardAuthenticationResult;
    1012
    1113/**
     
    119121        return (int)$this->get('capture_remain');
    120122    }
     123
     124    /**
     125     * @return string
     126     */
     127    public function getRecurringFlow(): string
     128    {
     129        return (string)$this->get('recurring_flow');
     130    }
     131
     132    /**
     133     * @return string
     134     */
     135    public function getRecurringModel(): string
     136    {
     137        return (string)$this->get('recurring_model');
     138    }
     139
     140    /**
     141     * @return string
     142     */
     143    public function getResponseCode(): string
     144    {
     145        return (string)$this->get('response_code');
     146    }
     147
     148    /**
     149     * @return string
     150     */
     151    public function getAuthorizationCode(): string
     152    {
     153        return (string)$this->get('authorization_code');
     154    }
     155
     156    /**
     157     * @return string
     158     */
     159    public function getCardAcceptorId(): string
     160    {
     161        return (string)$this->get('card_acceptor_id');
     162    }
     163
     164    /**
     165     * @return string
     166     */
     167    public function getCardAcceptorLocation(): string
     168    {
     169        return (string)$this->get('card_acceptor_location');
     170    }
     171
     172    /**
     173     * @return string
     174     */
     175    public function getCardAcceptorName(): string
     176    {
     177        return (string)$this->get('card_acceptor_name');
     178    }
     179
     180    /**
     181     * @return string
     182     */
     183    public function getCardEntryMode(): string
     184    {
     185        return (string)$this->get('card_entry_mode');
     186    }
     187
     188    /**
     189     * @return string
     190     */
     191    public function getCardVerificationResult(): string
     192    {
     193        return (string)$this->get('card_verification_result');
     194    }
     195
     196    /**
     197     * @return string
     198     */
     199    public function getMcc(): string
     200    {
     201        return (string)$this->get('mcc');
     202    }
     203
     204    /**
     205     * @return string
     206     */
     207    public function getSchemeReferenceId(): string
     208    {
     209        return (string)$this->get('scheme_reference_id');
     210    }
     211
     212    /**
     213     * @return CardAuthenticationDetails
     214     */
     215    public function getCardAuthenticationDetails(): CardAuthenticationDetails
     216    {
     217        return new CardAuthenticationDetails((array)$this->get('card_authentication_details'));
     218    }
     219
     220    /**
     221     * @return CardAuthenticationResult
     222     */
     223    public function getCardAuthenticationResult(): CardAuthenticationResult
     224    {
     225        return new CardAuthenticationResult((array)$this->get('card_authentication_result'));
     226    }
    121227}
  • multisafepay/tags/6.10.0/vendor/multisafepay/php-sdk/src/Api/Transactions/TransactionResponse/RelatedTransaction.php

    r3050467 r3393028  
    8787        return (string)$this->get('transaction_id');
    8888    }
     89
     90    /**
     91     * @return string
     92     */
     93    public function getType(): string
     94    {
     95        return (string)$this->get('type');
     96    }
     97
     98    /**
     99     * @return string
     100     */
     101    public function getOrderId(): string
     102    {
     103        return (string)$this->get('order_id');
     104    }
    89105}
  • multisafepay/tags/6.10.0/vendor/multisafepay/php-sdk/src/Util/Notification.php

    r3050467 r3393028  
    1212class Notification
    1313{
     14    /**
     15     * Method for scenarios where instance-based calls are required
     16     *
     17     * @param TransactionResponse|string $request
     18     * @param string $auth
     19     * @param string $apiKey
     20     * @param int $validationTimeInSeconds
     21     * @return bool
     22     * @throws InvalidArgumentException
     23     */
     24    public function verify(
     25        $request,
     26        string $auth,
     27        string $apiKey,
     28        int $validationTimeInSeconds = 600
     29    ): bool {
     30        return self::verifyNotification($request, $auth, $apiKey, $validationTimeInSeconds);
     31    }
     32
    1433    /**
    1534     * @param TransactionResponse|string $request
     
    5170        $hash = hash_hmac('sha512', $payload, trim($apiKey));
    5271
    53         return $hash === $sha512hexPayload;
     72        return hash_equals($hash, $sha512hexPayload);
    5473    }
    5574}
  • multisafepay/tags/6.10.0/vendor/multisafepay/php-sdk/src/Util/Version.php

    r3306839 r3393028  
    1818class Version
    1919{
    20     public const SDK_VERSION = '5.17.0';
     20    public const SDK_VERSION = '5.18.0';
    2121
    2222    /**
  • multisafepay/trunk/assets/admin/js/multisafepay-admin.js

    r3230524 r3393028  
    33        function (
    44        ) {
    5             function togglePaymentSettingsFields( direct, merchantInfo ) {
    6                 const formInput = $( merchantInfo ).closest( 'tr' );
     5            function togglePaymentSettingsFields(conditional, fieldToToggle) {
     6                const formInput = $(fieldToToggle).closest('tr');
     7                const validValues = ['1', 'qr', 'qr_only'];
     8                const selectedValue = $(conditional).find('option:selected').val();
     9                const isValidSelection = validValues.indexOf(selectedValue) !== -1;
    710
    8                 if ( $( direct ).find( 'option:selected' ).val() === '1' ) {
    9                     formInput.show();
    10                 } else {
    11                     formInput.hide();
    12                 }
     11                // Initial state
     12                formInput[isValidSelection ? 'show' : 'hide']();
    1313
    14                 $( direct ).on( 'change', function () {
    15                     if ( $( this ).find( 'option:selected' ).val() === '1' ) {
    16                         formInput.show();
    17                     } else {
    18                         formInput.hide();
    19                     }
     14                // Handle select changes
     15                $(conditional).on('change', function() {
     16                    const currentValue = $(this).find('option:selected').val();
     17                    formInput[validValues.indexOf(currentValue) !== -1 ? 'show' : 'hide']();
    2018                });
    2119            }
     
    2927                '#woocommerce_multisafepay_applepay_use_direct_button',
    3028                '#woocommerce_multisafepay_applepay_merchant_name'
     29            );
     30
     31            togglePaymentSettingsFields(
     32                '#woocommerce_multisafepay_bancontact_payment_component',
     33                '#woocommerce_multisafepay_bancontact_qr_width'
    3134            );
    3235
  • multisafepay/trunk/assets/public/css/multisafepay-public.css

    r3264984 r3393028  
    5555    background-size: 84px 33px !important;
    5656}
    57 @supports (not (-moz-appearance:none)) {
    58     .msp-ui-qr-code {
    59         max-width: 55% !important;
    60         max-height: 55% !important;
    61     }
    62 }
    63 @supports (-moz-appearance:none) {
    64     .msp-ui-qr-code {
    65         width: 206px !important;
    66         height: 206px !important;
    67         max-width: 206px !important;
    68         max-height: 206px !important;
    69     }
    70 }
  • multisafepay/trunk/assets/public/js/multisafepay-blocks/build/index.asset.php

    r3090804 r3393028  
    1 <?php return array('dependencies' => array(), 'version' => '3963884df3562cc5304a');
     1<?php return array('dependencies' => array(), 'version' => '4253c5748ae7a4b32641');
  • multisafepay/trunk/assets/public/js/multisafepay-blocks/build/index.js

    r3090804 r3393028  
    1 (()=>{const e=e=>({name:e.id,label:e.title,paymentMethodId:e.id,edit:React.createElement("div",null,""),canMakePayment:()=>!0,ariaLabel:e.title,content:React.createElement("div",null,e.description)});document.addEventListener("DOMContentLoaded",(()=>{(({wc:t,multisafepay_gateways:a})=>{const{registerPaymentMethod:n}=t.wcBlocksRegistry;a.forEach((t=>{(t.is_admin||"multisafepay_applepay"!==t.id||window.ApplePaySession&&ApplePaySession.canMakePayments())&&n(e(t))}))})(window)}))})();
     1(()=>{const e=e=>({name:e.id,label:e.title,paymentMethodId:e.id,edit:React.createElement("div",null,""),canMakePayment:()=>!0,ariaLabel:e.title,content:React.createElement("div",null,e.description)});document.addEventListener("DOMContentLoaded",()=>{(({wc:t,multisafepay_gateways:a})=>{const{registerPaymentMethod:n}=t.wcBlocksRegistry;a.forEach(t=>{(t.is_admin||"multisafepay_applepay"!==t.id||window.ApplePaySession&&ApplePaySession.canMakePayments())&&n(e(t))})})(window)})})();
  • multisafepay/trunk/assets/public/js/multisafepay-payment-component.js

    r3264984 r3393028  
    160160                    this.remove_payload_and_tokenize();
    161161                    this.logger( this.get_payment_component().getOrderData() );
    162                     var payload  = this.get_payment_component().getPaymentData().payload;
    163                     var tokenize = this.get_payment_component().getPaymentData().tokenize ? this.get_payment_component().getPaymentData().tokenize : '0';
     162                    const payload  = this.get_payment_component().getPaymentData().payload;
     163                    const tokenize = this.get_payment_component().getPaymentData().tokenize ? this.get_payment_component().getPaymentData().tokenize : '0';
    164164                    this.insert_payload_and_tokenize( payload, tokenize );
    165165                }
     
    335335
    336336        maybe_init_payment_component() {
    337             // There is no way to know if the payment component exist or not; except for checking the DOM elements
     337            // There is no way to know if the payment component exists or not; except for checking the DOM elements
    338338            if ( $( this.payment_component_container_selector + ' > .msp-container-ui' ).length > 0) {
    339339                return;
  • multisafepay/trunk/assets/public/js/multisafepay-validator-wallets.js

    r3306839 r3393028  
    895895        const errorLink                = document.createElement( 'a' );
    896896        errorLink.href                 = '#' + error[0].field;
    897         errorLink.style.textDecoration = 'none'; // Don't show underline on the text
     897        errorLink.style.textDecoration = 'underline'; // Showing underline like WooCommerce
    898898
    899899        // Create a strong element for the field name/error
  • multisafepay/trunk/multisafepay.php

    r3306839 r3393028  
    55 * Plugin URI:              https://docs.multisafepay.com/docs/woocommerce
    66 * Description:             MultiSafepay Payment Plugin
    7  * Version:                 6.9.0
     7 * Version:                 6.10.0
    88 * Author:                  MultiSafepay
    99 * Author URI:              https://www.multisafepay.com
     
    1212 * License URI:             http://www.gnu.org/licenses/gpl-3.0.html
    1313 * Requires at least:       6.0
    14  * Tested up to:            6.8.1
     14 * Tested up to:            6.8.3
    1515 * WC requires at least:    6.0.0
    16  * WC tested up to:         9.8.5
     16 * WC tested up to:         10.2.2
    1717 * Requires PHP:            7.3
    1818 * Text Domain:             multisafepay
     
    2727 * Plugin version
    2828 */
    29 define( 'MULTISAFEPAY_PLUGIN_VERSION', '6.9.0' );
     29define( 'MULTISAFEPAY_PLUGIN_VERSION', '6.10.0' );
    3030
    3131/**
    3232 * Plugin URL
    33  * Do not include a trailing slash. Should be include it in the string with which is concatenated
     33 * Do not include a trailing slash. Should be included it in the string with which is concatenated
    3434 */
    3535define( 'MULTISAFEPAY_PLUGIN_URL', plugins_url( '', __FILE__ ) );
     
    3737/**
    3838 * Plugin dir path
    39  * Include a trailing slash. Should not be include it in the string with which is concatenated
     39 * Include a trailing slash. Should not be included it in the string with which is concatenated
    4040 */
    4141define( 'MULTISAFEPAY_PLUGIN_DIR_PATH', plugin_dir_path( __FILE__ ) );
  • multisafepay/trunk/readme.txt

    r3306839 r3393028  
    33Tags: multisafepay, payment gateway, credit cards, ideal, bnpl
    44Requires at least: 6.0
    5 Tested up to: 6.8.1
     5Tested up to: 6.8.3
    66Requires PHP: 7.3
    7 Stable tag: 6.9.0
     7Stable tag: 6.10.0
    88License: MIT
    99
     
    8080
    8181= Manual Installation =
    82 * Download the plugin from the Wordpress Plugin Directory
     82* Download the plugin from the WordPress Plugin Directory
    8383* Unzip the downloaded file to a local directory
    8484* Upload the directory 'multisafepay' to /wp-content/plugins/ on the remote server
     
    110110
    111111It is possible to generate a payment link when an order has been created at the backend in WooCommerce.
    112 The customer will receive the payment link in the email send by WooCommerce with the order details. Also the payment link will be added to the order notes.
     112The customer will receive the payment link in the email send by WooCommerce with the order details. Also, the payment link will be added to the order notes.
    113113
    114114Please follow these steps:
     
    139139
    140140== Changelog ==
     141= Release Notes - WooCommerce 6.10.0 (Nov 10th, 2025) =
     142
     143### Added
     144+ PLGWOOS-1010: Add contract type selection for Billink between B2C and B2B
     145+ PLGWOOS-1006: Add support custom image size for Bancontact QR codes
     146
     147### Fixed
     148+ PLGWOOS-956: MultiSafepay PostePay is being listed as only one payment method, but it should be two
     149
    141150= Release Notes - WooCommerce 6.9.0 (Jun 5th, 2025) =
    142151
    143152### Added
    144153+ PLGWOOS-1003: Add zip code and email format validation to QR code implementation
    145 + PLGWOOS-1001: Improvement over QR code implementation validating checkout when"ship to a different address" is checked.
     154+ PLGWOOS-1001: Improvement over QR code implementation validating checkout when "ship to a different address" is checked.
    146155
    147156### Fixed
     
    384393### Changed
    385394+ DAVAMS-547: AfterPay -> Riverty rebrand
    386 + PLGWOOS-837: Declare support for Wordpress version 6.1 and WooCommerce version 7.1
     395+ PLGWOOS-837: Declare support for WordPress version 6.1 and WooCommerce version 7.1
    387396
    388397= Release Notes - WooCommerce 5.1.0 (Sep 30th, 2022) =
     
    404413+ PLGWOOS-827: Drop support for PHP 7.2
    405414
    406 = Release Notes - WooCommerce 4.17.2 (Jul 22st, 2022) =
     415= Release Notes - WooCommerce 4.17.2 (Jul 22nd, 2022) =
    407416
    408417### Fixed
    409418+ PLGWOOS-825: Fix an issue in which some payment methods are not being shown in the checkout, because of the setting field country selector is assuming the wrong value in some cases
    410419
    411 = Release Notes - WooCommerce 4.17.1 (Jul 22st, 2022) =
     420= Release Notes - WooCommerce 4.17.1 (Jul 22nd, 2022) =
    412421
    413422### Changed
     
    445454
    446455### Changed
    447 + PLGWOOS-804: Use default locale if get_locale returns null to prevent third party plugin errors
     456+ PLGWOOS-804: Use default locale if 'get_locale' returns null to prevent third party plugin errors
    448457+ PHPSDK-93: Upgrade the [PHP-SDK](https://github.com/MultiSafepay/php-sdk) dependency to 5.5.0
    449458
    450 = Release Notes - WooCommerce 4.13.1 (Mar 23th, 2022) =
    451 
    452 ### Added
    453 + PLGWOOS-792: Declare support for Wordpress 5.9.2 and WooCommerce 6.3.1
     459= Release Notes - WooCommerce 4.13.1 (Mar 23rd, 2022) =
     460
     461### Added
     462+ PLGWOOS-792: Declare support for WordPress 5.9.2 and WooCommerce 6.3.1
    454463+ PLGWOOS-790: Improvement on debug mode, logging the body of the POST notification request
    455464
     
    483492
    484493### Fixed
    485 + PLGWOOS-763: Fix error on plugin list when application can not connect with wordpress network
     494+ PLGWOOS-763: Fix error on plugin list when application can not connect with WordPress network
    486495
    487496= Release Notes - WooCommerce 4.10.0 (Dec 13th, 2021) =
     
    505514### Added
    506515+ PLGWOOS-715: Add 2 "Generic Gateways" which include a flexible gateway code that allows any merchant to connect to almost every payment method we offer.
    507 + PLGWOOS-746: Declare support for Wordpress 5.8.1 and WooCommerce 5.8.0
     516+ PLGWOOS-746: Declare support for WordPress 5.8.1 and WooCommerce 5.8.0
    508517
    509518### Changed
     
    533542
    534543### Added
    535 + PLGWOOS-723: Declare support for WooCommerce 5.5.2 and Wordpress 5.8
     544+ PLGWOOS-723: Declare support for WooCommerce 5.5.2 and WordPress 5.8
    536545+ PLGWOOS-711: Add missing titles in setting pages
    537546
     
    539548+ PLGWOOS-718: Remove PSP ID string when register the transaction ID in WC_Order->payment_complete()
    540549
    541 = Release Notes - WooCommerce 4.7.0 (Jun 23th, 2021) =
     550= Release Notes - WooCommerce 4.7.0 (Jun 23rd, 2021) =
    542551
    543552### Added
     
    569578+ PLGWOOS-663: Fix stock decreasing error, in relation with Bank Transfer gateway and notification flows
    570579
    571 = Release Notes - WooCommerce 4.5.0 (Mar 31th, 2021) =
    572 
    573 ### Fixed
    574 + PLGWOOS-659: Fix initialization of the plugin on multisite environments in which WooCommerce has been activate network wide
     580= Release Notes - WooCommerce 4.5.0 (Mar 31st, 2021) =
     581
     582### Fixed
     583+ PLGWOOS-659: Fix initialization of the plugin on multisite environments in which WooCommerce has been activated network wide
    575584
    576585### Added
     
    582591+ PLGWOOS-653: Fix overwriting initial order status when transaction is initialized
    583592
    584 = Release Notes - WooCommerce 4.4.0 (Mar 23th, 2021) =
     593= Release Notes - WooCommerce 4.4.0 (Mar 23rd, 2021) =
    585594
    586595### Fixed
     
    602611+ PLGWOOS-629: Add shipping item to the order request, even if this one is free
    603612+ PLGWOOS-631: Add delivery address in order request even if the shipping amount is 0
    604 + PLGWOOS-634: Add settings field to redirect to checkout page or cart page on cancelling the order
     613+ PLGWOOS-634: Add settings field to redirect to check out page or cart page on cancelling the order
    605614+ PLGWOOS-635: Add suggestion to set default initial order status for bank transfer to wc-on-hold
    606615+ PLGWOOS-636: Add notification endpoint from version 3.8.0 to process deprecated notifications
     
    621630
    622631### Added
    623 + PLGWOOS-398: Add support to change the data in the OrderRequest using Wordpress filters
     632+ PLGWOOS-398: Add support to change the data in the OrderRequest using WordPress filters
    624633
    625634### Changed
     
    642651+ PLGWOOS-604: Add forwarded IP to the CustomerDetails object
    643652+ PLGWOOS-597: Support for orders with is_vat_exempt
    644 + PLGWOOS-606: Add chargedback transaction status in plugin settings
     653+ PLGWOOS-606: Add chargeback transaction status in plugin settings
    645654
    646655= Release Notes - WooCommerce 4.1.8 (Mar 5th, 2021) =
     
    653662+ PLGWOOS-594: Fix Credit Card payment method form, to show description if customer is not logged in
    654663
    655 = Release Notes - WooCommerce 4.1.7 (Mar 3th, 2021) =
     664= Release Notes - WooCommerce 4.1.7 (Mar 3rd, 2021) =
    656665
    657666### Changed
     
    681690
    682691
    683 = Release Notes - WooCommerce 4.1.4 (Feb 23th, 2021) =
     692= Release Notes - WooCommerce 4.1.4 (Feb 23rd, 2021) =
    684693
    685694### Fixed
     
    692701
    693702
    694 = Release Notes - WooCommerce 4.1.3 (Feb 21th, 2021) =
     703= Release Notes - WooCommerce 4.1.3 (Feb 21st, 2021) =
    695704
    696705### Fixed
     
    717726+ PLGWOOS-521: Change order status on callback even if merchant did not save the settings, using defaults.
    718727+ PLGWOOS-530: Process notification, even when the payment method returned by MultiSafepay is not registered as WooCommerce gateway.
    719 + PLGWOOS-531: Avoid process refund if amount submited in backend is 0
     728+ PLGWOOS-531: Avoid process refund if amount submitted in backend is 0
    720729
    721730### Fixed
  • multisafepay/trunk/src/Main.php

    r3306839 r3393028  
    66use MultiSafepay\WooCommerce\PaymentMethods\PaymentMethodsController;
    77use MultiSafepay\WooCommerce\Services\PaymentComponentService;
     8use MultiSafepay\WooCommerce\Services\PostepayMigrationService;
    89use MultiSafepay\WooCommerce\Services\Qr\QrPaymentComponentService;
    910use MultiSafepay\WooCommerce\Services\Qr\QrPaymentWebhook;
     
    112113            // Filter and return ordered the results of the fields
    113114            $this->loader->add_filter( 'multisafepay_common_settings_fields', $plugin_settings, 'filter_multisafepay_common_settings_fields', 10, 1 );
     115
     116            // Handle PostePay migration in the admin area
     117            $postepay_migration = new PostepayMigrationService();
     118            $this->loader->add_action( 'admin_init', $postepay_migration, 'postepay_migration', 5 );
    114119        }
    115120    }
     
    135140        // Filter per user role
    136141        $this->loader->add_filter( 'woocommerce_available_payment_gateways', $payment_methods, 'filter_gateway_per_user_roles', 13 );
     142        // Filter duplicated branded payment methods
     143        $this->loader->add_filter( 'woocommerce_available_payment_gateways', $payment_methods, 'filter_non_duplicated_branded_names', 14 );
    137144        // Set MultiSafepay transaction as shipped
    138145        $this->loader->add_action( 'woocommerce_order_status_' . str_replace( 'wc-', '', get_option( 'multisafepay_trigger_transaction_to_shipped', 'wc-completed' ) ), $payment_methods, 'set_multisafepay_transaction_as_shipped', 10, 1 );
  • multisafepay/trunk/src/PaymentMethods/Base/BasePaymentMethod.php

    r3306839 r3393028  
    425425
    426426    /**
     427     * Return the custom QR width in pixels
     428     *
     429     * @return string
     430     */
     431    public function get_qr_width(): string {
     432        return $this->get_option( 'qr_width', '' );
     433    }
     434
     435    /**
    427436     * Enqueue Javascript related with Payment Component.
    428437     *
     
    439448            $route = MULTISAFEPAY_PLUGIN_URL . '/assets/public/js/multisafepay-payment-component.js';
    440449            wp_enqueue_script( 'multisafepay-payment-component-js', $route, array( 'jquery' ), MULTISAFEPAY_PLUGIN_VERSION, true );
     450
     451            static $enabled_gateways_added = false;
     452            if ( ! $enabled_gateways_added ) {
     453                wp_localize_script( 'multisafepay-payment-component-js', 'multisafepay_payment_component_gateways', $gateways_with_payment_component );
     454                $enabled_gateways_added = true;
     455            }
    441456            wp_localize_script( 'multisafepay-payment-component-js', 'payment_component_config_' . $this->id, $multisafepay_payment_component_config );
    442             wp_localize_script( 'multisafepay-payment-component-js', 'multisafepay_payment_component_gateways', $gateways_with_payment_component );
    443457            wp_enqueue_script( 'multisafepay-payment-component-js' );
    444 
    445458        }
    446459    }
     
    654667                'value'       => $this->get_option( 'payment_component', $this->payment_method->supportsPaymentComponent() ? 'yes' : 'no' ),
    655668            );
     669
     670            if ( 'BILLINK' === $this->get_payment_method_gateway_code() ) {
     671                $form_fields['payment_component']['options']['P'] = __( 'B2C Only', 'multisafepay' );
     672                $form_fields['payment_component']['options']['B'] = __( 'B2B Only', 'multisafepay' );
     673                $form_fields['payment_component']['description'] .= __( '<br /><br /> B2C Only - For individual customers. <br /> B2B Only - For business customers. <br /><br /> Select the appropriate contract type based on your target customer base.', 'multisafepay' );
     674            }
    656675        }
    657676
     
    670689                'value'       => $this->get_option( 'payment_component', $this->payment_method->supportsPaymentComponent() ? 'yes' : 'no' ),
    671690            );
     691            $form_fields['qr_width']          = array(
     692                'title'       => __( 'QR image width', 'multisafepay' ),
     693                'type'        => 'text',
     694                'desc_tip'    => __( 'Defines the width of the QR code in pixels. An appropriate size improves user experience and makes scanning easier.', 'multisafepay' ),
     695                'description' => __( 'The numeric value represents the width in pixels. If left blank, the default size will be used.', 'multisafepay' ),
     696                'default'     => '',
     697            );
    672698        }
    673699
  • multisafepay/trunk/src/PaymentMethods/Base/BasePaymentMethodBlocks.php

    r3114383 r3393028  
    5151                    $woocommerce_payment_gateways[] = new BasePaymentMethod( new PaymentMethod( $multisafepay_payment_method ) );
    5252                    foreach ( $multisafepay_payment_method['brands'] as $brand ) {
    53                         if ( ! empty( $brand['allowed_countries'] ) ) {
     53                        if ( ! empty( $brand['allowed_countries'] ) && ! get_option( 'multisafepay_group_credit_cards', false ) ) {
     54                            $brand['id']                   .= '_' . $multisafepay_payment_method['id'];
     55                            $brand['name']                 .= ' - ' . $multisafepay_payment_method['name'];
    5456                            $woocommerce_payment_gateways[] = new BaseBrandedPaymentMethod( new PaymentMethod( $multisafepay_payment_method ), $brand );
    5557                        }
  • multisafepay/trunk/src/PaymentMethods/PaymentMethodsController.php

    r3269746 r3393028  
    99use MultiSafepay\Exception\ApiException;
    1010use MultiSafepay\Util\Notification;
     11use MultiSafepay\WooCommerce\PaymentMethods\Base\BasePaymentMethod;
    1112use MultiSafepay\WooCommerce\Services\OrderService;
    1213use MultiSafepay\WooCommerce\Services\PaymentMethodService;
     
    477478        );
    478479    }
     480
     481    /**
     482     * Filter the payment methods to handle duplicated branded names
     483     *
     484     * @param array $payment_gateways
     485     * @return array
     486     */
     487    public function filter_non_duplicated_branded_names( array $payment_gateways ): array {
     488        if ( is_admin() ) {
     489            return $payment_gateways;
     490        }
     491
     492        $valid_gateways = array();
     493        $title_count    = $this->collect_and_count_branded_gateways( $payment_gateways, $valid_gateways );
     494
     495        // Create a reference association between the valid
     496        // gateways and the original payment gateways
     497        $gateway_map = array();
     498        foreach ( $valid_gateways as $valid_gateway ) {
     499            $gateway_map[ $valid_gateway->id ] = $valid_gateway;
     500        }
     501
     502        // Apply title processing
     503        $this->process_gateway_titles( $valid_gateways, $title_count );
     504
     505        // Use the original payment gateways but modify their titles
     506        $result = array();
     507        foreach ( $payment_gateways as $key => $gateway ) {
     508            if ( $gateway instanceof BasePaymentMethod && isset( $gateway_map[ $gateway->id ] ) ) {
     509                $gateway->title = $gateway_map[ $gateway->id ]->title;
     510            }
     511            $result[ $key ] = $gateway;
     512        }
     513
     514        return $result;
     515    }
     516
     517    /**
     518     * Collect all branded gateway codes and count their occurrences
     519     *
     520     * @param array $payment_gateways
     521     * @param array &$valid_gateways Reference to store valid gateways
     522     * @return array
     523     */
     524    private function collect_and_count_branded_gateways( array $payment_gateways, array &$valid_gateways ): array {
     525        $gateway_codes = array();
     526
     527        foreach ( $payment_gateways as $gateway ) {
     528            if ( ! ( $gateway instanceof BasePaymentMethod ) ) {
     529                continue;
     530            }
     531
     532            $valid_gateways[] = $gateway;
     533            $gateway_code     = str_replace( 'multisafepay_', '', $gateway->id );
     534            $gateway_codes[]  = trim( explode( '_', $gateway_code )[0] );
     535        }
     536
     537        return array_count_values( $gateway_codes );
     538    }
     539
     540    /**
     541     * Process gateways and modify titles based on occurrence count
     542     *
     543     * @param array $valid_gateways
     544     * @param array $title_count
     545     * @return void
     546     */
     547    private function process_gateway_titles( array $valid_gateways, array $title_count ): void {
     548        foreach ( $valid_gateways as $gateway ) {
     549            $gateway_code = str_replace( 'multisafepay_', '', $gateway->id );
     550            $base_code    = explode( '_', $gateway_code )[0];
     551
     552            $gateway->title = $gateway->get_title();
     553            if ( isset( $title_count[ $base_code ] ) && ( 1 === $title_count[ $base_code ] ) ) {
     554                $gateway->title = explode( ' - ', $gateway->title )[0];
     555            }
     556        }
     557    }
    479558}
  • multisafepay/trunk/src/Services/CustomerService.php

    r3269746 r3393028  
    124124        string $ip_address,
    125125        string $user_agent,
    126         string $company_name = null,
    127         string $customer_id = null,
     126        ?string $company_name = null,
     127        ?string $customer_id = null,
    128128        ?array $browser = null
    129129    ): CustomerDetails {
  • multisafepay/trunk/src/Services/OrderService.php

    r3264984 r3393028  
    1111use MultiSafepay\Api\Transactions\OrderRequest\Arguments\TaxTable\TaxRate;
    1212use MultiSafepay\Api\Transactions\OrderRequest\Arguments\TaxTable\TaxRule;
     13use MultiSafepay\Exception\InvalidArgumentException;
    1314use MultiSafepay\WooCommerce\Utils\MoneyUtil;
    1415use WC_Order;
     
    5051     * @param string   $type
    5152     * @return OrderRequest
     53     * @throws InvalidArgumentException
    5254     */
    5355    public function create_order_request( WC_Order $order, string $gateway_code, string $type ): OrderRequest {
     
    9698        }
    9799
     100        // Force BILLINK B2B and B2C transactions to be direct
     101        if ( 'BILLINK' === $gateway_code ) {
     102            $payment_method_id = $order->get_payment_method();
     103            $payment_method    = $this->payment_method_service->get_woocommerce_payment_gateway_by_id( $payment_method_id );
     104
     105            if ( $payment_method ) {
     106                $payment_component_option = $payment_method->get_option( 'payment_component', 'no' );
     107
     108                if ( 'P' === $payment_component_option || 'B' === $payment_component_option ) {
     109                    $order_request->addType( 'direct' );
     110                }
     111            }
     112        }
     113
    98114        $order_request = $this->add_none_tax_rate( $order_request );
    99115
     
    115131
    116132    /**
    117      * @param  WC_Order $order
     133     * @param WC_Order $order
    118134     * @return PaymentOptions
     135     * @throws InvalidArgumentException
    119136     */
    120137    private function create_payment_options( WC_Order $order ): PaymentOptions {
     
    135152            $payment_options->addNotificationMethod( 'GET' );
    136153        }
     154
     155        // Add BILLINK specific settings
     156        $payment_method_id = $order->get_payment_method();
     157        $payment_method    = $this->payment_method_service->get_woocommerce_payment_gateway_by_id( $payment_method_id );
     158
     159        if ( $payment_method && 'BILLINK' === $payment_method->get_payment_method_gateway_code() ) {
     160            $payment_component_option = $payment_method->get_option( 'payment_component', 'no' );
     161
     162            if ( 'P' === $payment_component_option || 'B' === $payment_component_option ) {
     163                $payment_options->addSettings( array( 'gateways' => array( 'BILLINK' => array( 'type' => $payment_component_option ) ) ) );
     164            }
     165        }
     166
    137167        return $payment_options;
    138168    }
  • multisafepay/trunk/src/Services/PaymentComponentService.php

    r3306839 r3393028  
    3838
    3939    /**
    40      * Return the arguments required when payment component needs to be initialized
     40     * Return the arguments required when the payment component needs to be initialized
    4141     *
    4242     * @param BasePaymentMethod $woocommerce_payment_gateway
     
    5858                    'country' => ( WC()->customer )->get_billing_country(),
    5959                ),
    60                 'payment_options' => array(
    61                     'template' => array(
    62                         'settings' => array(
    63                             'embed_mode' => 1,
    64                         ),
    65                         'merge'    => true,
    66                     ),
    67                     'settings' => array(
    68                         'connect' => array(
    69                             'issuers_display_mode' => 'select',
    70                         ),
    71                     ),
    72                 ),
     60                'payment_options' => $this->build_payment_options(),
    7361            ),
    7462            'gateway'      => $woocommerce_payment_gateway->get_payment_method_gateway_code(),
     
    9583        // Payment Component QR
    9684        if ( $validate_checkout ) {
    97             $qr_checkout_manager = new QrCheckoutManager();
    98             if ( $qr_checkout_manager->validate_checkout_fields() ) {
    99                 if ( $woocommerce_payment_gateway->is_qr_enabled() ) {
    100                     $payment_component_arguments['orderData']['payment_options']['settings']['connect']['qr'] = array( 'enabled' => 1 );
    101                 }
    102                 if ( $woocommerce_payment_gateway->is_qr_only_enabled() ) {
    103                     $payment_component_arguments['orderData']['payment_options']['settings']['connect']['qr'] = array(
    104                         'enabled' => 1,
    105                         'qr_only' => 1,
    106                     );
    107                 }
    108             }
     85            $this->add_qr_configuration( $payment_component_arguments, $woocommerce_payment_gateway );
    10986        }
    11087
     
    11390
    11491    /**
    115      * Return the arguments required when payment component needs to be initialized via a WP AJAX request
     92     * Build payment options array
     93     *
     94     * @return array
     95     */
     96    private function build_payment_options(): array {
     97        return array(
     98            'template' => array(
     99                'settings' => array(
     100                    'embed_mode' => 1,
     101                ),
     102                'merge'    => true,
     103            ),
     104            'settings' => array(
     105                'connect' => array(
     106                    'issuers_display_mode' => 'select',
     107                ),
     108            ),
     109        );
     110    }
     111
     112    /**
     113     * Add QR configuration to payment component arguments
     114     *
     115     * @param array             $payment_component_arguments
     116     * @param BasePaymentMethod $woocommerce_payment_gateway
     117     * @return void
     118     */
     119    private function add_qr_configuration( array &$payment_component_arguments, BasePaymentMethod $woocommerce_payment_gateway ): void {
     120        $qr_checkout_manager = new QrCheckoutManager();
     121        if ( ! $qr_checkout_manager->validate_checkout_fields() ) {
     122            return;
     123        }
     124
     125        $is_qr_only_enabled = $woocommerce_payment_gateway->is_qr_only_enabled();
     126
     127        if ( $woocommerce_payment_gateway->is_qr_enabled() || $is_qr_only_enabled ) {
     128            $qr_config = array(
     129                'enabled' => 1,
     130                'size'    => 206,
     131            );
     132
     133            if ( $is_qr_only_enabled ) {
     134                $qr_config['qr_only'] = 1;
     135            }
     136            $this->add_qr_width_to_config( $qr_config, $woocommerce_payment_gateway );
     137            $payment_component_arguments['orderData']['payment_options']['settings']['connect']['qr'] = $qr_config;
     138        }
     139    }
     140
     141    /**
     142     * Add QR width to the configuration if specified
     143     *
     144     * @param array             $qr_config
     145     * @param BasePaymentMethod $woocommerce_payment_gateway
     146     * @return void
     147     */
     148    private function add_qr_width_to_config( array &$qr_config, BasePaymentMethod $woocommerce_payment_gateway ): void {
     149        $qr_width = $woocommerce_payment_gateway->get_qr_width();
     150        if ( ! empty( $qr_width ) && is_numeric( $qr_width ) ) {
     151            $qr_config['size'] = (int) $qr_width;
     152        }
     153    }
     154
     155    /**
     156     * Return the arguments required when the payment component needs to be initialized via a WP AJAX request
    116157     *
    117158     * @return void
  • multisafepay/trunk/src/Services/PaymentMethodService.php

    r3267803 r3393028  
    161161    public function create_branded_woocommerce_payment_gateways( array $multisafepay_payment_method, array $woocommerce_payment_gateways, PaymentMethod $payment_method ) : array {
    162162        foreach ( $multisafepay_payment_method['brands'] as $brand ) {
    163             if ( ! empty( $brand['allowed_countries'] ) ) {
     163            if ( ! empty( $brand['allowed_countries'] ) && ! get_option( 'multisafepay_group_credit_cards', false ) ) {
     164                $brand['id']                                       .= '_' . $multisafepay_payment_method['id'];
     165                $brand['name']                                     .= ' - ' . $multisafepay_payment_method['name'];
    164166                $payment_method_id                                  = self::get_legacy_woocommerce_payment_gateway_ids( $brand['id'] );
    165167                $woocommerce_payment_gateways[ $payment_method_id ] = new BaseBrandedPaymentMethod( $payment_method, $brand );
  • multisafepay/trunk/src/Services/SdkService.php

    r3114383 r3393028  
    5555     * @param Logger|null $logger
    5656     */
    57     public function __construct( string $api_key = null, bool $test_mode = null, ?Logger $logger = null ) {
     57    public function __construct( ?string $api_key = null, ?bool $test_mode = null, ?Logger $logger = null ) {
    5858        $this->api_key   = $api_key ?? $this->get_api_key();
    5959        $this->test_mode = $test_mode ?? $this->get_test_mode();
  • multisafepay/trunk/src/Settings/SettingsController.php

    r3048898 r3393028  
    5252            wp_enqueue_style( 'multisafepay-admin-css', MULTISAFEPAY_PLUGIN_URL . '/assets/admin/css/multisafepay-admin.css', array(), MULTISAFEPAY_PLUGIN_VERSION, 'all' );
    5353        }
    54         $sections = array( 'multisafepay_applepay', 'multisafepay_googlepay' );
     54        $sections = array( 'multisafepay_applepay', 'multisafepay_googlepay', 'multisafepay_bancontact' );
    5555        if ( isset( $_GET['section'] ) && in_array( $_GET['section'], $sections, true ) ) {
    5656            wp_enqueue_script( 'multisafepay-admin-js', MULTISAFEPAY_PLUGIN_URL . '/assets/admin/js/multisafepay-admin.js', array(), MULTISAFEPAY_PLUGIN_VERSION, true );
  • multisafepay/trunk/vendor/autoload.php

    r3306839 r3393028  
    2020require_once __DIR__ . '/composer/autoload_real.php';
    2121
    22 return ComposerAutoloaderIniteb5be672a765e05cf872148d946d1d0b::getLoader();
     22return ComposerAutoloaderInit431ee68f29f658207118bb5cd3435acb::getLoader();
  • multisafepay/trunk/vendor/composer/autoload_real.php

    r3306839 r3393028  
    33// autoload_real.php @generated by Composer
    44
    5 class ComposerAutoloaderIniteb5be672a765e05cf872148d946d1d0b
     5class ComposerAutoloaderInit431ee68f29f658207118bb5cd3435acb
    66{
    77    private static $loader;
     
    2525        require __DIR__ . '/platform_check.php';
    2626
    27         spl_autoload_register(array('ComposerAutoloaderIniteb5be672a765e05cf872148d946d1d0b', 'loadClassLoader'), true, true);
     27        spl_autoload_register(array('ComposerAutoloaderInit431ee68f29f658207118bb5cd3435acb', 'loadClassLoader'), true, true);
    2828        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
    29         spl_autoload_unregister(array('ComposerAutoloaderIniteb5be672a765e05cf872148d946d1d0b', 'loadClassLoader'));
     29        spl_autoload_unregister(array('ComposerAutoloaderInit431ee68f29f658207118bb5cd3435acb', 'loadClassLoader'));
    3030
    3131        require __DIR__ . '/autoload_static.php';
    32         call_user_func(\Composer\Autoload\ComposerStaticIniteb5be672a765e05cf872148d946d1d0b::getInitializer($loader));
     32        call_user_func(\Composer\Autoload\ComposerStaticInit431ee68f29f658207118bb5cd3435acb::getInitializer($loader));
    3333
    3434        $loader->register(true);
  • multisafepay/trunk/vendor/composer/autoload_static.php

    r3306839 r3393028  
    55namespace Composer\Autoload;
    66
    7 class ComposerStaticIniteb5be672a765e05cf872148d946d1d0b
     7class ComposerStaticInit431ee68f29f658207118bb5cd3435acb
    88{
    99    public static $prefixLengthsPsr4 = array (
     
    6363    {
    6464        return \Closure::bind(function () use ($loader) {
    65             $loader->prefixLengthsPsr4 = ComposerStaticIniteb5be672a765e05cf872148d946d1d0b::$prefixLengthsPsr4;
    66             $loader->prefixDirsPsr4 = ComposerStaticIniteb5be672a765e05cf872148d946d1d0b::$prefixDirsPsr4;
    67             $loader->classMap = ComposerStaticIniteb5be672a765e05cf872148d946d1d0b::$classMap;
     65            $loader->prefixLengthsPsr4 = ComposerStaticInit431ee68f29f658207118bb5cd3435acb::$prefixLengthsPsr4;
     66            $loader->prefixDirsPsr4 = ComposerStaticInit431ee68f29f658207118bb5cd3435acb::$prefixDirsPsr4;
     67            $loader->classMap = ComposerStaticInit431ee68f29f658207118bb5cd3435acb::$classMap;
    6868
    6969        }, null, ClassLoader::class);
  • multisafepay/trunk/vendor/composer/installed.json

    r3306839 r3393028  
    33        {
    44            "name": "multisafepay/php-sdk",
    5             "version": "5.17.0",
    6             "version_normalized": "5.17.0.0",
     5            "version": "5.18.0",
     6            "version_normalized": "5.18.0.0",
    77            "source": {
    88                "type": "git",
    99                "url": "https://github.com/MultiSafepay/php-sdk.git",
    10                 "reference": "4c46227cf3139d76ff08bc4191f06445c867798b"
    11             },
    12             "dist": {
    13                 "type": "zip",
    14                 "url": "https://api.github.com/repos/MultiSafepay/php-sdk/zipball/4c46227cf3139d76ff08bc4191f06445c867798b",
    15                 "reference": "4c46227cf3139d76ff08bc4191f06445c867798b",
     10                "reference": "837555d3d4699761ab34387605b192be5421ed63"
     11            },
     12            "dist": {
     13                "type": "zip",
     14                "url": "https://api.github.com/repos/MultiSafepay/php-sdk/zipball/837555d3d4699761ab34387605b192be5421ed63",
     15                "reference": "837555d3d4699761ab34387605b192be5421ed63",
    1616                "shasum": ""
    1717            },
     
    3838                "jschaedl/iban-validation": "Adds additional IBAN validation for \\MultiSafepay\\ValueObject\\IbanNumber"
    3939            },
    40             "time": "2025-06-04T13:12:21+00:00",
     40            "time": "2025-10-15T10:31:17+00:00",
    4141            "type": "library",
    4242            "installation-source": "dist",
     
    4848            "notification-url": "https://packagist.org/downloads/",
    4949            "license": [
    50                 "MIT"
     50                "OSL-3.0"
    5151            ],
    5252            "description": "MultiSafepay PHP SDK",
    5353            "support": {
    5454                "issues": "https://github.com/MultiSafepay/php-sdk/issues",
    55                 "source": "https://github.com/MultiSafepay/php-sdk/tree/5.17.0"
     55                "source": "https://github.com/MultiSafepay/php-sdk/tree/5.18.0"
    5656            },
    5757            "install-path": "../multisafepay/php-sdk"
  • multisafepay/trunk/vendor/composer/installed.php

    r3306839 r3393028  
    22    'root' => array(
    33        'name' => 'multisafepay/woocommerce',
    4         'pretty_version' => '6.9.0',
    5         'version' => '6.9.0.0',
     4        'pretty_version' => '6.10.0',
     5        'version' => '6.10.0.0',
    66        'reference' => null,
    77        'type' => 'wordpress-plugin',
     
    1212    'versions' => array(
    1313        'multisafepay/php-sdk' => array(
    14             'pretty_version' => '5.17.0',
    15             'version' => '5.17.0.0',
    16             'reference' => '4c46227cf3139d76ff08bc4191f06445c867798b',
     14            'pretty_version' => '5.18.0',
     15            'version' => '5.18.0.0',
     16            'reference' => '837555d3d4699761ab34387605b192be5421ed63',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../multisafepay/php-sdk',
     
    2121        ),
    2222        'multisafepay/woocommerce' => array(
    23             'pretty_version' => '6.9.0',
    24             'version' => '6.9.0.0',
     23            'pretty_version' => '6.10.0',
     24            'version' => '6.10.0.0',
    2525            'reference' => null,
    2626            'type' => 'wordpress-plugin',
  • multisafepay/trunk/vendor/composer/platform_check.php

    r2643314 r3393028  
    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}
  • multisafepay/trunk/vendor/multisafepay/php-sdk/CHANGELOG.md

    r3306839 r3393028  
    66
    77## [Unreleased]
     8
     9## [5.18.0] - 2025-10-15
     10### Added
     11- PHPSDK-178: Extend PaymentDetails object, including Card Payment related information
     12
     13## [5.17.2] - 2025-09-17
     14### Added
     15- PHPSDK-181: Add an auxiliary non-static method for verifyNotification()
     16
     17## [5.17.1] - 2025-08-21
     18### Added
     19- PLGMAG2V2-859: Add CODE_OF_CONDUCT.md
     20- PHPSDK-176: Add badges to the README.md document
     21
     22### Changed
     23- PHPSDK-180: Use constant-time string comparison in Notification::verifyNotification, thanks to @CasEbb
    824
    925## [5.17.0] - 2025-06-04
  • multisafepay/trunk/vendor/multisafepay/php-sdk/README.md

    r3230524 r3393028  
    55# MultiSafepay PHP SDK
    66
    7 [![Latest stable version](https://img.shields.io/packagist/v/multisafepay/php-sdk)](https://packagist.org/packages/multisafepay/php-sdk)
     7[![Build](https://img.shields.io/github/actions/workflow/status/multisafepay/php-sdk/build.yml?style=for-the-badge)](https://github.com/MultiSafepay/php-sdk/actions)
     8[![Codecov](https://img.shields.io/codecov/c/github/multisafepay/php-sdk?style=for-the-badge)](https://app.codecov.io/gh/MultiSafepay/php-sdk)
     9[![Latest stable version](https://img.shields.io/github/v/release/multisafepay/php-sdk?style=for-the-badge)](https://packagist.org/packages/multisafepay/php-sdk)
     10[![Total downloads](https://img.shields.io/packagist/dt/multisafepay/php-sdk?style=for-the-badge)](https://packagist.org/packages/multisafepay/php-sdk/stats)
     11[![License](https://img.shields.io/github/license/multisafepay/php-sdk?style=for-the-badge)](https://github.com/MultiSafepay/php-sdk/blob/master/LICENSE.md)
     12
    813
    914## About MultiSafepay
  • multisafepay/trunk/vendor/multisafepay/php-sdk/composer.json

    r3306839 r3393028  
    33  "description": "MultiSafepay PHP SDK",
    44  "type": "library",
    5   "license": "MIT",
    6   "version": "5.17.0",
     5  "license": "OSL-3.0",
     6  "version": "5.18.0",
    77  "require": {
    88    "php": "^7.2|^8.0",
  • multisafepay/trunk/vendor/multisafepay/php-sdk/src/Api/Transactions/TransactionResponse/PaymentDetails.php

    r2927749 r3393028  
    88
    99use MultiSafepay\Api\Base\DataObject;
     10use MultiSafepay\Api\Transactions\TransactionResponse\PaymentDetails\CardAuthenticationDetails;
     11use MultiSafepay\Api\Transactions\TransactionResponse\PaymentDetails\CardAuthenticationResult;
    1012
    1113/**
     
    119121        return (int)$this->get('capture_remain');
    120122    }
     123
     124    /**
     125     * @return string
     126     */
     127    public function getRecurringFlow(): string
     128    {
     129        return (string)$this->get('recurring_flow');
     130    }
     131
     132    /**
     133     * @return string
     134     */
     135    public function getRecurringModel(): string
     136    {
     137        return (string)$this->get('recurring_model');
     138    }
     139
     140    /**
     141     * @return string
     142     */
     143    public function getResponseCode(): string
     144    {
     145        return (string)$this->get('response_code');
     146    }
     147
     148    /**
     149     * @return string
     150     */
     151    public function getAuthorizationCode(): string
     152    {
     153        return (string)$this->get('authorization_code');
     154    }
     155
     156    /**
     157     * @return string
     158     */
     159    public function getCardAcceptorId(): string
     160    {
     161        return (string)$this->get('card_acceptor_id');
     162    }
     163
     164    /**
     165     * @return string
     166     */
     167    public function getCardAcceptorLocation(): string
     168    {
     169        return (string)$this->get('card_acceptor_location');
     170    }
     171
     172    /**
     173     * @return string
     174     */
     175    public function getCardAcceptorName(): string
     176    {
     177        return (string)$this->get('card_acceptor_name');
     178    }
     179
     180    /**
     181     * @return string
     182     */
     183    public function getCardEntryMode(): string
     184    {
     185        return (string)$this->get('card_entry_mode');
     186    }
     187
     188    /**
     189     * @return string
     190     */
     191    public function getCardVerificationResult(): string
     192    {
     193        return (string)$this->get('card_verification_result');
     194    }
     195
     196    /**
     197     * @return string
     198     */
     199    public function getMcc(): string
     200    {
     201        return (string)$this->get('mcc');
     202    }
     203
     204    /**
     205     * @return string
     206     */
     207    public function getSchemeReferenceId(): string
     208    {
     209        return (string)$this->get('scheme_reference_id');
     210    }
     211
     212    /**
     213     * @return CardAuthenticationDetails
     214     */
     215    public function getCardAuthenticationDetails(): CardAuthenticationDetails
     216    {
     217        return new CardAuthenticationDetails((array)$this->get('card_authentication_details'));
     218    }
     219
     220    /**
     221     * @return CardAuthenticationResult
     222     */
     223    public function getCardAuthenticationResult(): CardAuthenticationResult
     224    {
     225        return new CardAuthenticationResult((array)$this->get('card_authentication_result'));
     226    }
    121227}
  • multisafepay/trunk/vendor/multisafepay/php-sdk/src/Api/Transactions/TransactionResponse/RelatedTransaction.php

    r3050467 r3393028  
    8787        return (string)$this->get('transaction_id');
    8888    }
     89
     90    /**
     91     * @return string
     92     */
     93    public function getType(): string
     94    {
     95        return (string)$this->get('type');
     96    }
     97
     98    /**
     99     * @return string
     100     */
     101    public function getOrderId(): string
     102    {
     103        return (string)$this->get('order_id');
     104    }
    89105}
  • multisafepay/trunk/vendor/multisafepay/php-sdk/src/Util/Notification.php

    r3050467 r3393028  
    1212class Notification
    1313{
     14    /**
     15     * Method for scenarios where instance-based calls are required
     16     *
     17     * @param TransactionResponse|string $request
     18     * @param string $auth
     19     * @param string $apiKey
     20     * @param int $validationTimeInSeconds
     21     * @return bool
     22     * @throws InvalidArgumentException
     23     */
     24    public function verify(
     25        $request,
     26        string $auth,
     27        string $apiKey,
     28        int $validationTimeInSeconds = 600
     29    ): bool {
     30        return self::verifyNotification($request, $auth, $apiKey, $validationTimeInSeconds);
     31    }
     32
    1433    /**
    1534     * @param TransactionResponse|string $request
     
    5170        $hash = hash_hmac('sha512', $payload, trim($apiKey));
    5271
    53         return $hash === $sha512hexPayload;
     72        return hash_equals($hash, $sha512hexPayload);
    5473    }
    5574}
  • multisafepay/trunk/vendor/multisafepay/php-sdk/src/Util/Version.php

    r3306839 r3393028  
    1818class Version
    1919{
    20     public const SDK_VERSION = '5.17.0';
     20    public const SDK_VERSION = '5.18.0';
    2121
    2222    /**
Note: See TracChangeset for help on using the changeset viewer.