Plugin Directory

Changeset 3443469


Ignore:
Timestamp:
01/20/2026 05:34:42 PM (3 months ago)
Author:
payhere
Message:

Bug fixes and valiidation fixes.

Location:
payhere-payment-gateway
Files:
69 added
3 edited

Legend:

Unmodified
Added
Removed
  • payhere-payment-gateway/trunk/gateway/class-wcgatewaypayhere.php

    r3440771 r3443469  
    2020
    2121if (!defined('ABSPATH')) {
    22     exit;
     22    exit;
    2323}
    2424
     
    852852            if (('completed' !== $order->get_status() && !$is_subscription) || ($is_subscription)) {
    853853
    854                 if (!$verified || floatval($payhere_amount) === floatval($order_amount) || $payhere_currency === $order_currncy) {
     854                $payhereAmount = number_format((float) $payhere_amount, 2, '.', '');
     855                $orderAmount   = number_format((float) $order_amount, 2, '.', '');
     856
     857                $payhereCurrency = strtoupper(trim($payhere_currency));
     858                $orderCurrency   = strtoupper(trim($order_currncy));
     859
     860                // Validate response integrity
     861                $hasError =
     862                    !$verified ||
     863                    $payhereAmount !== $orderAmount ||
     864                    $payhereCurrency !== $orderCurrency;
     865
     866                if ($hasError) {
    855867                    $this->msg['class']   = 'error';
    856868                    $this->msg['message'] = 'Security Error. Illegal access detected.';
  • payhere-payment-gateway/trunk/payhere-payment-gateway.php

    r3440773 r3443469  
    88 * Plugin URI:        https://www.payhere.lk
    99 * Description:       PayHere Payment Gateway allows you to accept payment on your Woocommerce store via Visa, MasterCard, AMEX, eZcash, mCash & Internet banking services.
    10  * Version:           2.4.1
     10 * Version:           2.4.2
    1111 * Author:            PayHere (Private) Limited
    1212 * Author URI:        https://www.payhere.lk
     
    2828 * Start at version 2.0.0 and use SemVer - https://semver.org
    2929 */
    30 define('PAYHERE_VERSION', '2.4.1');
     30define('PAYHERE_VERSION', '2.4.2');
    3131/**
    3232 * Currently plugin text domain.
  • payhere-payment-gateway/trunk/readme.txt

    r3440773 r3443469  
    66Tested up to: 6.9
    77WC tested up to: 10.4.3
    8 Stable tag: 2.4.1
     8Stable tag: 2.4.2
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    181181= 2.4.1 =
    182182Stable tag fix.
     183
     184= 2.4.2 =
     185Bug and valiidation fixes.
    183186
    184187== Upgrade Notice ==
Note: See TracChangeset for help on using the changeset viewer.