Plugin Directory

Changeset 3286247


Ignore:
Timestamp:
05/02/2025 12:59:33 PM (10 months ago)
Author:
paystack
Message:

4.0.4 - Bug Fixes - Min Amount Field

Location:
payment-forms-for-paystack/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • payment-forms-for-paystack/trunk/assets/js/paystack-public.js

    r3210130 r3286247  
    166166            );
    167167            if ($("#pf-quantity").length) {
     168                $( "#pf-quantity" ).on( 'change', function(event){
     169                    checkMinimumVal();
     170                } );
    168171                calculateTotal();
    169172            };
     
    596599
    597600            function checkMinimumVal() {
    598                 if ($("#pf-minimum-hidden").length) {
    599                     var min_amount = Number($("#pf-minimum-hidden").val());
     601                if ( $("#pf-amount").length ) {
     602                    var min_amount = Number($("#pf-amount").attr('min'));
    600603                    var amt = Number($("#pf-amount").val());
     604                    var quantity = 1;
     605
     606                    if ( $("#pf-quantity").length ) {
     607                        quantity = $("#pf-quantity").val();
     608                    }
     609
     610                    amt = amt * quantity;
     611
    601612                    if (min_amount > 0 && amt < min_amount) {
    602613                        $("#pf-min-val-warn").text( "Amount cannot be less than the minimum amount");
  • payment-forms-for-paystack/trunk/includes/classes/class-form-shortcode.php

    r3210130 r3286247  
    391391            }
    392392
     393            $html[] = '<div style="color:red;"><small id="pf-min-val-warn"></small></div>';
     394
    393395        $html[] = '</div></div>';
    394396
  • payment-forms-for-paystack/trunk/paystack-forms.php

    r3279082 r3286247  
    44  Plugin URI:   https://github.com/PaystackHQ/Wordpress-Payment-forms-for-Paystack
    55  Description:  Payment Forms for Paystack allows you create forms that will be used to bill clients for goods and services via Paystack.
    6   Version:      4.0.3
     6  Version:      4.0.4
    77  Author:       Paystack
    88  Author URI:   http://paystack.com
     
    1717define( 'PFF_PAYSTACK_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    1818define( 'PFF_PAYSTACK_MAIN_FILE', __FILE__ );
    19 define( 'PFF_PAYSTACK_VERSION', '4.0.3' );
     19define( 'PFF_PAYSTACK_VERSION', '4.0.4' );
    2020define( 'PFF_PAYSTACK_TABLE', 'paystack_forms_payments' );
    2121define( 'PFF_PLUGIN_BASENAME', plugin_basename(__FILE__) );
  • payment-forms-for-paystack/trunk/readme.txt

    r3284067 r3286247  
    55Requires at least: 5.0
    66Tested up to: 6.7
    7 Stable tag: 4.0.3
     7Stable tag: 4.0.4
    88Requires PHP: 7.4
    99License: GPLv2 or later
     
    9292
    9393== Changelog ==
     94= 4.0.4 =
     95* Fixing the UAT error with the amount field and minimum amounts.
     96
    9497= 4.0.3 =
    9598* Security update - Add extra sanitization to form fields
Note: See TracChangeset for help on using the changeset viewer.