diff --git a/Readme.txt b/Readme.txt index b59aba74..d8bdfe65 100755 --- a/Readme.txt +++ b/Readme.txt @@ -4,7 +4,7 @@ Tags: billwerk+, visa, mastercard, dankort, mobilepay Requires at least: 4.0 Tested up to: 6.6.1 Requires PHP: 7.4 -Stable tag: 1.7.9.1 +Stable tag: 1.7.9.2 License: GPL License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html @@ -18,6 +18,11 @@ The Billwerk+ Pay plugin extends WooCommerce allowing you to take payments on yo See installation guide right here: https://docu.billwerk.plus/help/en/apps/woocommerce/setup-woocommerce-plugin.html == Changelog == +v 1.7.9.2 +- [Fix] - WebHook URL for plain permalink structure +- [Fix] - Remove debug log is make notice message on cart page. +- [Fix] - Since v1.7.9.1, setting "skip order lines" caused the authorized amount to be multiplied by 100 one more time. Only when using saved card to pay. + v 1.7.9.1 - [Fix] – The payment method 'Vipps MobilePay Recurring' did not save the token. diff --git a/composer.json b/composer.json index d70acfb5..b793dda5 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Get a plug-n-play payment solution for WooCommerce, that is easy to use, highly secure and is built to maximize the potential of your e-commerce.", "type": "wordpress-plugin", "license": "GPL", - "version": "1.7.9.1", + "version": "1.7.9.2", "autoload": { "psr-4": { "Reepay\\Checkout\\": "includes/", diff --git a/includes/Api.php b/includes/Api.php index 2258f6cc..fefb0eed 100644 --- a/includes/Api.php +++ b/includes/Api.php @@ -1096,13 +1096,6 @@ public function get_reepay_cards( string $customer_handle, $reepay_token = null $result = $tmp; - wc_get_logger()->debug( - array( - 'source' => 'billwerk-token', - '_legacy' => true, - ) - ); - if ( ! $reepay_token ) { return $result['cards']; } diff --git a/includes/Gateways/ReepayGateway.php b/includes/Gateways/ReepayGateway.php index 4b87d8eb..2b115960 100644 --- a/includes/Gateways/ReepayGateway.php +++ b/includes/Gateways/ReepayGateway.php @@ -430,7 +430,14 @@ public static function get_webhook_url(): string { } } - return $default_wc_api_url . 'WC_Gateway_Reepay/'; + $structure = get_option( 'permalink_structure' ); + if ( empty( $structure ) ) { + $default_wc_api_url = $default_wc_api_url . '=WC_Gateway_Reepay/'; + } else { + $default_wc_api_url = $default_wc_api_url . 'WC_Gateway_Reepay/'; + } + + return $default_wc_api_url; } /** @@ -1006,7 +1013,7 @@ public function process_payment( $order_id ) { return $this->process_session_charge( $params, $order ); } else { $order_lines = 'no' === $this->skip_order_lines ? $this->get_order_items( $order ) : null; - $amount = 'yes' === $this->skip_order_lines ? $this->get_skip_order_lines_amount( $order ) : null; + $amount = 'yes' === $this->skip_order_lines ? $this->get_skip_order_lines_amount( $order, true ) : null; // Charge payment. $result = reepay()->api( $this )->charge( $order, $token->get_token(), $amount, $order_lines ); @@ -1582,8 +1589,9 @@ public function get_order_items( WC_Order $order, bool $only_not_settled = false * Get order amount from order item amount * * @param WC_Order $order order to get items. + * @param bool $skip_fn_rp_amount skip call funcion rp_prepare_amount. */ - public function get_skip_order_lines_amount( WC_Order $order ) { + public function get_skip_order_lines_amount( WC_Order $order, $skip_fn_rp_amount = false ) { $total_amount = 0; if ( wcs_cart_have_subscription() ) { @@ -1593,6 +1601,8 @@ public function get_skip_order_lines_amount( WC_Order $order ) { $total_amount += $item['amount']; } } + } elseif ( true === $skip_fn_rp_amount ) { + $total_amount = $order->get_total(); } else { $total_amount = rp_prepare_amount( $order->get_total(), $order->get_currency() ); } diff --git a/reepay-woocommerce-payment.php b/reepay-woocommerce-payment.php index c6bbd044..c8c999e6 100755 --- a/reepay-woocommerce-payment.php +++ b/reepay-woocommerce-payment.php @@ -4,7 +4,7 @@ * Description: Get a plug-n-play payment solution for WooCommerce, that is easy to use, highly secure and is built to maximize the potential of your e-commerce. * Author: Billwerk+ * Author URI: http://billwerk.plus - * Version: 1.7.9.1 + * Version: 1.7.9.2 * Text Domain: reepay-checkout-gateway * Domain Path: /languages * WC requires at least: 3.0.0