Changeset 3099249
- Timestamp:
- 06/07/2024 10:48:52 AM (22 months ago)
- Location:
- multisafepay
- Files:
-
- 10 edited
- 1 copied
-
tags/6.5.1 (copied) (copied from multisafepay/trunk)
-
tags/6.5.1/multisafepay.php (modified) (3 diffs)
-
tags/6.5.1/readme.txt (modified) (3 diffs)
-
tags/6.5.1/src/PaymentMethods/Base/BasePaymentMethod.php (modified) (2 diffs)
-
tags/6.5.1/src/Services/PaymentComponentService.php (modified) (3 diffs)
-
tags/6.5.1/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/multisafepay.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/src/PaymentMethods/Base/BasePaymentMethod.php (modified) (2 diffs)
-
trunk/src/Services/PaymentComponentService.php (modified) (3 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
multisafepay/tags/6.5.1/multisafepay.php
r3090804 r3099249 5 5 * Plugin URI: https://docs.multisafepay.com/docs/woocommerce 6 6 * Description: MultiSafepay Payment Plugin 7 * Version: 6.5. 07 * Version: 6.5.1 8 8 * Author: MultiSafepay 9 9 * Author URI: https://www.multisafepay.com … … 12 12 * License URI: http://www.gnu.org/licenses/gpl-3.0.html 13 13 * Requires at least: 6.0 14 * Tested up to: 6.5. 314 * Tested up to: 6.5.4 15 15 * WC requires at least: 6.0.0 16 16 * WC tested up to: 8.8.3 … … 27 27 * Plugin version 28 28 */ 29 define( 'MULTISAFEPAY_PLUGIN_VERSION', '6.5. 0' );29 define( 'MULTISAFEPAY_PLUGIN_VERSION', '6.5.1' ); 30 30 31 31 /** -
multisafepay/tags/6.5.1/readme.txt
r3090804 r3099249 3 3 Tags: multisafepay, payment gateway, credit cards, ideal, bnpl 4 4 Requires at least: 6.0 5 Tested up to: 6.5. 35 Tested up to: 6.5.4 6 6 Requires PHP: 7.3 7 Stable tag: 6.5. 07 Stable tag: 6.5.1 8 8 License: MIT 9 9 … … 128 128 == Upgrade Notice == 129 129 130 = 6.5. 0=130 = 6.5.1 = 131 131 6.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. 132 132 … … 144 144 145 145 == 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 146 152 = Release Notes - WooCommerce 6.5.0 (May 22nd, 2024) = 147 153 -
multisafepay/tags/6.5.1/src/PaymentMethods/Base/BasePaymentMethod.php
r3090804 r3099249 473 473 'type' => 'decimal', 474 474 '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 ) ), 477 477 ), 478 478 'max_amount' => array( … … 480 480 'type' => 'decimal', 481 481 '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 ) : '' ) ), 484 484 ), 485 485 'countries' => array( -
multisafepay/tags/6.5.1/src/Services/PaymentComponentService.php
r3090804 r3099249 43 43 */ 44 44 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 56 45 $payment_component_arguments = array( 57 46 'debug' => (bool) get_option( 'multisafepay_debugmode', false ), … … 62 51 'orderData' => array( 63 52 'currency' => get_woocommerce_currency(), 64 'amount' => ( $t otal_amount* 100 ),53 'amount' => ( $this->get_total_amount() * 100 ), 65 54 'customer' => array( 66 55 'locale' => strtoupper( substr( ( new CustomerService() )->get_locale(), 0, 2 ) ), … … 119 108 wp_send_json( $payment_component_arguments ); 120 109 } 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 } 121 131 } -
multisafepay/tags/6.5.1/vendor/composer/installed.php
r3090804 r3099249 2 2 'root' => array( 3 3 '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', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 21 21 ), 22 22 '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', 26 26 'type' => 'wordpress-plugin', 27 27 'install_path' => __DIR__ . '/../../', -
multisafepay/trunk/multisafepay.php
r3090804 r3099249 5 5 * Plugin URI: https://docs.multisafepay.com/docs/woocommerce 6 6 * Description: MultiSafepay Payment Plugin 7 * Version: 6.5. 07 * Version: 6.5.1 8 8 * Author: MultiSafepay 9 9 * Author URI: https://www.multisafepay.com … … 12 12 * License URI: http://www.gnu.org/licenses/gpl-3.0.html 13 13 * Requires at least: 6.0 14 * Tested up to: 6.5. 314 * Tested up to: 6.5.4 15 15 * WC requires at least: 6.0.0 16 16 * WC tested up to: 8.8.3 … … 27 27 * Plugin version 28 28 */ 29 define( 'MULTISAFEPAY_PLUGIN_VERSION', '6.5. 0' );29 define( 'MULTISAFEPAY_PLUGIN_VERSION', '6.5.1' ); 30 30 31 31 /** -
multisafepay/trunk/readme.txt
r3090804 r3099249 3 3 Tags: multisafepay, payment gateway, credit cards, ideal, bnpl 4 4 Requires at least: 6.0 5 Tested up to: 6.5. 35 Tested up to: 6.5.4 6 6 Requires PHP: 7.3 7 Stable tag: 6.5. 07 Stable tag: 6.5.1 8 8 License: MIT 9 9 … … 128 128 == Upgrade Notice == 129 129 130 = 6.5. 0=130 = 6.5.1 = 131 131 6.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. 132 132 … … 144 144 145 145 == 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 146 152 = Release Notes - WooCommerce 6.5.0 (May 22nd, 2024) = 147 153 -
multisafepay/trunk/src/PaymentMethods/Base/BasePaymentMethod.php
r3090804 r3099249 473 473 'type' => 'decimal', 474 474 '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 ) ), 477 477 ), 478 478 'max_amount' => array( … … 480 480 'type' => 'decimal', 481 481 '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 ) : '' ) ), 484 484 ), 485 485 'countries' => array( -
multisafepay/trunk/src/Services/PaymentComponentService.php
r3090804 r3099249 43 43 */ 44 44 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 56 45 $payment_component_arguments = array( 57 46 'debug' => (bool) get_option( 'multisafepay_debugmode', false ), … … 62 51 'orderData' => array( 63 52 'currency' => get_woocommerce_currency(), 64 'amount' => ( $t otal_amount* 100 ),53 'amount' => ( $this->get_total_amount() * 100 ), 65 54 'customer' => array( 66 55 'locale' => strtoupper( substr( ( new CustomerService() )->get_locale(), 0, 2 ) ), … … 119 108 wp_send_json( $payment_component_arguments ); 120 109 } 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 } 121 131 } -
multisafepay/trunk/vendor/composer/installed.php
r3090804 r3099249 2 2 'root' => array( 3 3 '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', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 21 21 ), 22 22 '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', 26 26 'type' => 'wordpress-plugin', 27 27 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.