Plugin Directory

Changeset 3292557


Ignore:
Timestamp:
05/13/2025 12:51:12 PM (11 months ago)
Author:
iCount
Message:

iCount v2.0.6 Added payment page customer fix

Location:
icount
Files:
87 added
3 edited

Legend:

Unmodified
Added
Removed
  • icount/trunk/icount-payment-gateway.php

    r3272080 r3292557  
    66 * Plugin Name: iCount Payment Gateway
    77 * Description: WooCommerce integration for iCount Payment Gateway.
    8  * Version: 2.0.5
     8 * Version: 2.0.6
    99 * RequiresPHP: 7.4
    1010 * Author: iCount Systems
  • icount/trunk/includes/WC_ICount_Gateway.php

    r3272080 r3292557  
    544544$hwc = implode("\n", $custom_hwc);
    545545
     546                   
     547/////////////////////////////////////////////////////////////////////
     548//MZ UPDATE 14.04.2025
     549//workaround not to use metadata storage
     550
     551$posted = wp_unslash(
     552        array_filter(
     553            $_REQUEST,
     554            fn($k) => in_array(
     555                $k,
     556                [
     557                    self::SECRET_VERIFY,
     558                    'order-id',
     559                    'confirmation_code',
     560                    'sum',
     561                    'num_of_payments',
     562                    'cc_type',
     563                    'cc_last4',
     564                    'multipass',
     565                    'currency_code',
     566                    'first_payment',
     567                       
     568                    'interest_rate',
     569                    'total_interest',
     570                    'total_paid'
     571                ]
     572            ),
     573            ARRAY_FILTER_USE_KEY
     574        )
     575);                 
     576                   
     577$cc_params_meta = ($posted['sum'] != 0
     578                        ? [
     579                                'cc' => [
     580                                    'sum' => ($posted['total_interest']) ? $posted['sum'] + $posted['total_interest'] : $posted['sum'],
     581                                    'num_of_payments' => $posted['num_of_payments'],
     582                                    'cc_type' => $posted['cc_type'],
     583                                    'cc_last4' => $posted['cc_last4'],
     584                                    'confirmation_code' => $posted['confirmation_code']
     585                                ],
     586                           ] : []
     587                    )
     588                        +
     589                        (array_key_exists('multipass', $posted)
     590                            ? ['multipass' => $posted['multipass'],]
     591                            : []
     592                        );
     593                   
     594if (!isset($cc_params_meta['cc']))
     595    $cc_params_meta = [];
     596/////////////////////////////////////////////////////////////////////
     597                   
    546598                    @[
    547599                        'doctype' => $doctype,
     
    583635                                    ],
    584636                                ]
    585                                 : ($order->get_meta('_icount_transaction_details') ?: []) + [
     637                                //: ($order->get_meta('_icount_transaction_details') ?: []) + [
     638                                : ($cc_params_meta) + [                                 
    586639                                    'sum' => $order->get_total(),
    587640                                    'confirmation_code' => $order->get_transaction_id(),
  • icount/trunk/readme.txt

    r3272080 r3292557  
    44Requires at least: 5.0
    55Tested up to: 6.7.1
    6 Stable tag: 2.0.5
     6Stable tag: 2.0.6
    77Requires PHP: 7.4
    88License: GPLv2 or later
Note: See TracChangeset for help on using the changeset viewer.