Plugin Directory

Changeset 3366941


Ignore:
Timestamp:
09/24/2025 06:52:27 AM (5 months ago)
Author:
allpay
Message:

Minor fix for v1.1.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • allpay-payment-gateway/trunk/classes/class-allpay.php

    r3365680 r3366941  
    3939        }
    4040
    41         $sign = $this->get_signature($_REQUEST);
     41        $chunks = [];
     42        $wh_params = ['name', 'items', 'amount', 'order_id', 'currency', 'status', 'client_name',
     43            'client_email', 'client_tehudat', 'client_phone', 'card_mask', 'card_brand', 'foreign_card',
     44            'add_field_1', 'add_field_2', 'receipt'];
     45        foreach($wh_params as $k) {
     46            if(isset($_REQUEST[$k])) {
     47                $chunks[$k] = $_REQUEST[$k];
     48            }
     49        }
     50        $sign = $this->get_signature($chunks);
     51
    4252        $order_id = $_REQUEST['order_id'];
    4353        $status = (int)$_REQUEST['status'];
     
    4858            wc_reduce_stock_levels($customer_order);   
    4959        } else {
    50             echo 'Notification error: ' . json_encode($_REQUEST);
     60            echo 'Notification error: ' . json_encode($_REQUEST) . ' / ' . $sign;
    5161        }
    5262        exit();
     
    151161        }
    152162
    153         $tax_included = wc_tax_enabled() && wc_prices_include_tax();
     163        $tax_included = wc_tax_enabled() && wc_prices_include_tax() && $customer_order->get_total_tax() > 0;
    154164
    155165        // Items
Note: See TracChangeset for help on using the changeset viewer.