Plugin Directory

Changeset 3099249


Ignore:
Timestamp:
06/07/2024 10:48:52 AM (22 months ago)
Author:
multisafepayplugin
Message:

Update to version 6.5.1 from GitHub

Location:
multisafepay
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • multisafepay/tags/6.5.1/multisafepay.php

    r3090804 r3099249  
    55 * Plugin URI:              https://docs.multisafepay.com/docs/woocommerce
    66 * Description:             MultiSafepay Payment Plugin
    7  * Version:                 6.5.0
     7 * Version:                 6.5.1
    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.5.3
     14 * Tested up to:            6.5.4
    1515 * WC requires at least:    6.0.0
    1616 * WC tested up to:         8.8.3
     
    2727 * Plugin version
    2828 */
    29 define( 'MULTISAFEPAY_PLUGIN_VERSION', '6.5.0' );
     29define( 'MULTISAFEPAY_PLUGIN_VERSION', '6.5.1' );
    3030
    3131/**
  • multisafepay/tags/6.5.1/readme.txt

    r3090804 r3099249  
    33Tags: multisafepay, payment gateway, credit cards, ideal, bnpl
    44Requires at least: 6.0
    5 Tested up to: 6.5.3
     5Tested up to: 6.5.4
    66Requires PHP: 7.3
    7 Stable tag: 6.5.0
     7Stable tag: 6.5.1
    88License: MIT
    99
     
    128128== Upgrade Notice ==
    129129
    130 = 6.5.0 =
     130= 6.5.1 =
    1311316.x.x is a major upgrade in which the MultiSafepay payment methods are registered dynamically via an API request to MultiSafepay. If you are upgrading from 5.X.X version, after the upgrade, please navigate to the MultiSafepay settings page, and to each one of the payment methods enabled in your account, and confirm the settings in each section are set up according to your preferences.
    132132
     
    144144
    145145== Changelog ==
     146= Release Notes - WooCommerce 6.5.1 (Jun 7th, 2024) =
     147
     148### Fixed
     149+ PLGWOOS-936: Fix the values set as min and max amount from payment method API request
     150+ PLGWOOS-937: Fix Payment Components, where the amount is wrongly being set
     151
    146152= Release Notes - WooCommerce 6.5.0 (May 22nd, 2024) =
    147153
  • multisafepay/tags/6.5.1/src/PaymentMethods/Base/BasePaymentMethod.php

    r3090804 r3099249  
    473473                'type'     => 'decimal',
    474474                'desc_tip' => __( 'This payment method is not shown in the checkout if the order total is lower than the defined amount. Leave blank for no restrictions.', 'multisafepay' ),
    475                 'default'  => $this->payment_method->getMinAmount(),
    476                 'value'    => (float) $this->get_option( 'min_amount', $this->payment_method->getMinAmount() ),
     475                'default'  => ( (int) $this->payment_method->getMinAmount() / 100 ),
     476                'value'    => (float) $this->get_option( 'min_amount', ( (int) $this->payment_method->getMinAmount() / 100 ) ),
    477477            ),
    478478            'max_amount'           => array(
     
    480480                'type'     => 'decimal',
    481481                'desc_tip' => __( 'This payment method is not shown in the checkout if the order total exceeds a certain amount. Leave blank for no restrictions.', 'multisafepay' ),
    482                 'default'  => $this->payment_method->getMaxAmount(),
    483                 'value'    => (float) $this->get_option( 'max_amount', $this->payment_method->getMaxAmount() ),
     482                'default'  => $this->payment_method->getMaxAmount() ? ( (int) $this->payment_method->getMaxAmount() / 100 ) : '',
     483                'value'    => (float) $this->get_option( 'max_amount', ( $this->payment_method->getMaxAmount() ? ( (int) $this->payment_method->getMaxAmount() / 100 ) : '' ) ),
    484484            ),
    485485            'countries'            => array(
  • multisafepay/tags/6.5.1/src/Services/PaymentComponentService.php

    r3090804 r3099249  
    4343     */
    4444    public function get_payment_component_arguments( BasePaymentMethod $woocommerce_payment_gateway ): array {
    45         $total_amount = ( WC()->cart ) ? ( WC()->cart->get_total( '' ) * 100 ) : null;
    46         if ( is_wc_endpoint_url( 'order-pay' ) ) {
    47             $order_id = absint( get_query_var( 'order-pay' ) );
    48             if ( 0 < $order_id ) {
    49                 $order = wc_get_order( $order_id );
    50                 if ( $order ) {
    51                     $total_amount = (float) $order->get_total();
    52                 }
    53             }
    54         }
    55 
    5645        $payment_component_arguments = array(
    5746            'debug'     => (bool) get_option( 'multisafepay_debugmode', false ),
     
    6251            'orderData' => array(
    6352                'currency'        => get_woocommerce_currency(),
    64                 'amount'          => ( $total_amount * 100 ),
     53                'amount'          => ( $this->get_total_amount() * 100 ),
    6554                'customer'        => array(
    6655                    'locale'  => strtoupper( substr( ( new CustomerService() )->get_locale(), 0, 2 ) ),
     
    119108        wp_send_json( $payment_component_arguments );
    120109    }
     110
     111    /**
     112     * Return the total amount of the cart or order
     113     *
     114     * @return float
     115     */
     116    private function get_total_amount(): float {
     117        $total_amount = ( WC()->cart ) ? (float) WC()->cart->get_total( '' ) : null;
     118
     119        if ( is_wc_endpoint_url( 'order-pay' ) ) {
     120            $order_id = absint( get_query_var( 'order-pay' ) );
     121            if ( 0 < $order_id ) {
     122                $order = wc_get_order( $order_id );
     123                if ( $order ) {
     124                    $total_amount = (float) $order->get_total();
     125                }
     126            }
     127        }
     128
     129        return $total_amount;
     130    }
    121131}
  • multisafepay/tags/6.5.1/vendor/composer/installed.php

    r3090804 r3099249  
    22    'root' => array(
    33        'name' => 'multisafepay/woocommerce',
    4         'pretty_version' => '6.5.0',
    5         'version' => '6.5.0.0',
    6         'reference' => '4bff200f5bc2b8e3acab3ba84008472f2f988f7d',
     4        'pretty_version' => '6.5.1',
     5        'version' => '6.5.1.0',
     6        'reference' => 'a57a06a32837f1542476a9726a1e3749e08ba92d',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    2121        ),
    2222        'multisafepay/woocommerce' => array(
    23             'pretty_version' => '6.5.0',
    24             'version' => '6.5.0.0',
    25             'reference' => '4bff200f5bc2b8e3acab3ba84008472f2f988f7d',
     23            'pretty_version' => '6.5.1',
     24            'version' => '6.5.1.0',
     25            'reference' => 'a57a06a32837f1542476a9726a1e3749e08ba92d',
    2626            'type' => 'wordpress-plugin',
    2727            'install_path' => __DIR__ . '/../../',
  • multisafepay/trunk/multisafepay.php

    r3090804 r3099249  
    55 * Plugin URI:              https://docs.multisafepay.com/docs/woocommerce
    66 * Description:             MultiSafepay Payment Plugin
    7  * Version:                 6.5.0
     7 * Version:                 6.5.1
    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.5.3
     14 * Tested up to:            6.5.4
    1515 * WC requires at least:    6.0.0
    1616 * WC tested up to:         8.8.3
     
    2727 * Plugin version
    2828 */
    29 define( 'MULTISAFEPAY_PLUGIN_VERSION', '6.5.0' );
     29define( 'MULTISAFEPAY_PLUGIN_VERSION', '6.5.1' );
    3030
    3131/**
  • multisafepay/trunk/readme.txt

    r3090804 r3099249  
    33Tags: multisafepay, payment gateway, credit cards, ideal, bnpl
    44Requires at least: 6.0
    5 Tested up to: 6.5.3
     5Tested up to: 6.5.4
    66Requires PHP: 7.3
    7 Stable tag: 6.5.0
     7Stable tag: 6.5.1
    88License: MIT
    99
     
    128128== Upgrade Notice ==
    129129
    130 = 6.5.0 =
     130= 6.5.1 =
    1311316.x.x is a major upgrade in which the MultiSafepay payment methods are registered dynamically via an API request to MultiSafepay. If you are upgrading from 5.X.X version, after the upgrade, please navigate to the MultiSafepay settings page, and to each one of the payment methods enabled in your account, and confirm the settings in each section are set up according to your preferences.
    132132
     
    144144
    145145== Changelog ==
     146= Release Notes - WooCommerce 6.5.1 (Jun 7th, 2024) =
     147
     148### Fixed
     149+ PLGWOOS-936: Fix the values set as min and max amount from payment method API request
     150+ PLGWOOS-937: Fix Payment Components, where the amount is wrongly being set
     151
    146152= Release Notes - WooCommerce 6.5.0 (May 22nd, 2024) =
    147153
  • multisafepay/trunk/src/PaymentMethods/Base/BasePaymentMethod.php

    r3090804 r3099249  
    473473                'type'     => 'decimal',
    474474                'desc_tip' => __( 'This payment method is not shown in the checkout if the order total is lower than the defined amount. Leave blank for no restrictions.', 'multisafepay' ),
    475                 'default'  => $this->payment_method->getMinAmount(),
    476                 'value'    => (float) $this->get_option( 'min_amount', $this->payment_method->getMinAmount() ),
     475                'default'  => ( (int) $this->payment_method->getMinAmount() / 100 ),
     476                'value'    => (float) $this->get_option( 'min_amount', ( (int) $this->payment_method->getMinAmount() / 100 ) ),
    477477            ),
    478478            'max_amount'           => array(
     
    480480                'type'     => 'decimal',
    481481                'desc_tip' => __( 'This payment method is not shown in the checkout if the order total exceeds a certain amount. Leave blank for no restrictions.', 'multisafepay' ),
    482                 'default'  => $this->payment_method->getMaxAmount(),
    483                 'value'    => (float) $this->get_option( 'max_amount', $this->payment_method->getMaxAmount() ),
     482                'default'  => $this->payment_method->getMaxAmount() ? ( (int) $this->payment_method->getMaxAmount() / 100 ) : '',
     483                'value'    => (float) $this->get_option( 'max_amount', ( $this->payment_method->getMaxAmount() ? ( (int) $this->payment_method->getMaxAmount() / 100 ) : '' ) ),
    484484            ),
    485485            'countries'            => array(
  • multisafepay/trunk/src/Services/PaymentComponentService.php

    r3090804 r3099249  
    4343     */
    4444    public function get_payment_component_arguments( BasePaymentMethod $woocommerce_payment_gateway ): array {
    45         $total_amount = ( WC()->cart ) ? ( WC()->cart->get_total( '' ) * 100 ) : null;
    46         if ( is_wc_endpoint_url( 'order-pay' ) ) {
    47             $order_id = absint( get_query_var( 'order-pay' ) );
    48             if ( 0 < $order_id ) {
    49                 $order = wc_get_order( $order_id );
    50                 if ( $order ) {
    51                     $total_amount = (float) $order->get_total();
    52                 }
    53             }
    54         }
    55 
    5645        $payment_component_arguments = array(
    5746            'debug'     => (bool) get_option( 'multisafepay_debugmode', false ),
     
    6251            'orderData' => array(
    6352                'currency'        => get_woocommerce_currency(),
    64                 'amount'          => ( $total_amount * 100 ),
     53                'amount'          => ( $this->get_total_amount() * 100 ),
    6554                'customer'        => array(
    6655                    'locale'  => strtoupper( substr( ( new CustomerService() )->get_locale(), 0, 2 ) ),
     
    119108        wp_send_json( $payment_component_arguments );
    120109    }
     110
     111    /**
     112     * Return the total amount of the cart or order
     113     *
     114     * @return float
     115     */
     116    private function get_total_amount(): float {
     117        $total_amount = ( WC()->cart ) ? (float) WC()->cart->get_total( '' ) : null;
     118
     119        if ( is_wc_endpoint_url( 'order-pay' ) ) {
     120            $order_id = absint( get_query_var( 'order-pay' ) );
     121            if ( 0 < $order_id ) {
     122                $order = wc_get_order( $order_id );
     123                if ( $order ) {
     124                    $total_amount = (float) $order->get_total();
     125                }
     126            }
     127        }
     128
     129        return $total_amount;
     130    }
    121131}
  • multisafepay/trunk/vendor/composer/installed.php

    r3090804 r3099249  
    22    'root' => array(
    33        'name' => 'multisafepay/woocommerce',
    4         'pretty_version' => '6.5.0',
    5         'version' => '6.5.0.0',
    6         'reference' => '4bff200f5bc2b8e3acab3ba84008472f2f988f7d',
     4        'pretty_version' => '6.5.1',
     5        'version' => '6.5.1.0',
     6        'reference' => 'a57a06a32837f1542476a9726a1e3749e08ba92d',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    2121        ),
    2222        'multisafepay/woocommerce' => array(
    23             'pretty_version' => '6.5.0',
    24             'version' => '6.5.0.0',
    25             'reference' => '4bff200f5bc2b8e3acab3ba84008472f2f988f7d',
     23            'pretty_version' => '6.5.1',
     24            'version' => '6.5.1.0',
     25            'reference' => 'a57a06a32837f1542476a9726a1e3749e08ba92d',
    2626            'type' => 'wordpress-plugin',
    2727            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.