Plugin Directory

Changeset 3201037


Ignore:
Timestamp:
12/02/2024 03:41:31 PM (16 months ago)
Author:
totalprocessing
Message:

Addition of Applepay in to the main plugin
Registration process refinement
Applepay compatibility with HPOS and Woocommerce blocks

Location:
totalprocessing-card-payments
Files:
240 added
8 edited

Legend:

Unmodified
Added
Removed
  • totalprocessing-card-payments/trunk/gateways/init.php

    r3022827 r3201037  
    11<?php
    22require_once plugin_dir_path( dirname( __FILE__ ) ) . 'gateways/open-banking-payment/openbanking.php';
     3require_once plugin_dir_path( dirname( __FILE__ ) ) . 'gateways/apple-pay-woocommerce/applepay.php';
  • totalprocessing-card-payments/trunk/includes/class-totalprocessing-card-payments-and-gateway-woocommerce-activator.php

    r2869427 r3201037  
    3636        self::tpcp_gateway_cardsv2_db_cbk_tbl();
    3737        self::tpcp_gateway_cronjob_tbl();
     38        self::tpapplepay_activation();
    3839    }
    3940
     
    120121        return true;
    121122    }
     123
     124    public static function tpapplepay_activation() {
     125        if(get_option('wc_totalprocessing_applepay_permalinks_flushed') === false){
     126            add_option('wc_totalprocessing_applepay_permalinks_flushed', 0);
     127        } else {
     128            update_option('wc_totalprocessing_applepay_permalinks_flushed', 0);
     129        }
     130    }
    122131}
  • totalprocessing-card-payments/trunk/includes/class-totalprocessing-card-payments-and-gateway-woocommerce-deactivator.php

    r2908434 r3201037  
    3434        self::tpcp_gateway_cardsv2_deactivation();
    3535        self::cronstarter_deactivate();
     36        self::tpapplepay_deactivation();
    3637    }
    3738
     
    5354        wp_unschedule_event( $timestamp, TP_CONSTANTS::GLOBAL_PREFIX . 'dupe_payment_validation' );
    5455    }
     56
     57    public static function tpapplepay_deactivation() {
     58        delete_option('wc_totalprocessing_applepay_permalinks_flushed');
     59        delete_option('wc_totalprocessing_applepay_merchantIdentifier');
     60        return false;
     61    }
    5562}
  • totalprocessing-card-payments/trunk/includes/class-tp-payment-gateway.php

    r3169784 r3201037  
    609609                }
    610610            }
    611             wp_register_script( $prefix . 'tp_cards_commons', plugin_dir_url( dirname( __FILE__ ) ).'assets/js/tpJs-common.js' , ['jquery'], $tp_pluginVer, array("in_footer" => true) );
     611            wp_register_script( $prefix . 'tp_cards_commons', plugin_dir_url( dirname( __FILE__ ) ).'assets/js/tpJs-common.js' , ['jquery','wp-util'], $tp_pluginVer, array("in_footer" => true) );
    612612            wp_register_script( $prefix . 'tp_fetch', 'https://cdn.jsdelivr.net/npm/whatwg-fetch@3.4.0/dist/fetch.umd.min.js' , ['jquery','wp-util'] , true, array("in_footer" => true) );
    613613            wp_register_script( $prefix . 'tp_swal', 'https://cdn.jsdelivr.net/npm/sweetalert2@10/dist/sweetalert2.all.min.js' , ['jquery','wp-util'] , true, array("in_footer" => true) );
     
    681681            $inlinescript = "function getTPGlobalVariable(){
    682682                return " . $prefix . "CardVars;
    683             }";
     683        }";
    684684            wp_add_inline_script( $prefix . 'tp_cards', $inlinescript, 'before' );
    685685           
  • totalprocessing-card-payments/trunk/includes/payment-gateway-setting-fields.php

    r3022827 r3201037  
    135135                    'MASTER' => 'Mastercard',
    136136                    'AMEX' => 'American Express',
    137                     'MAESTRO' => 'Maestro'
     137                    'MAESTRO' => 'Maestro',
    138138                )
    139139            ),
  • totalprocessing-card-payments/trunk/public/class-totalprocessing-card-payments-and-gateway-woocommerce-public.php

    r3169784 r3201037  
    2323class Totalprocessing_Card_Payments_And_Gateway_Woocommerce_Public {
    2424
    25     /**
    26     *
    27     * @since    5.2.0
    28     * @access   private
    29     * @var      string    $plugin_name
    30     */
    31     private $plugin_name;
    32 
    33     /**
    34     * The version of this plugin.
    35     *
    36     * @since    5.2.0
    37     * @access   private
    38     * @var      string    $version    The current version of this plugin.
    39     */
    40     private $version;
    41 
    42     /**
    43     * Initialize the class and set its properties.
    44     *
    45     * @since    5.2.0
    46     * @param      string    $plugin_name       The name of the plugin.
    47     * @param      string    $version    The version of this plugin.
    48     */
    49     public function __construct( $plugin_name, $version ) {
    50 
    51         $this->plugin_name = $plugin_name;
    52         $this->version = $version;
    53 
    54     }
    55 
    56     /**
    57     * Register the stylesheets for the public-facing side of the site.
    58     *
    59     * @since    5.2.0
    60     */
    61     public function enqueue_styles() {
    62 
    63         /**
    64         *
    65         * An instance of this class should be passed to the run() function
    66         * defined in Totalprocessing_Card_Payments_And_Gateway_Woocommerce_Loader as all of the hooks are defined
    67         * in that particular class.
    68         *
    69         * The Totalprocessing_Card_Payments_And_Gateway_Woocommerce_Loader will then create the relationship
    70         * between the defined hooks and the functions defined in this
    71         * class.
    72         */
    73 
    74         wp_enqueue_style(
     25    /**
     26    *
     27    * @since    5.2.0
     28    * @access   private
     29    * @var      string    $plugin_name
     30    */
     31    private $plugin_name;
     32
     33    /**
     34    * The version of this plugin.
     35    *
     36    * @since    5.2.0
     37    * @access   private
     38    * @var      string    $version    The current version of this plugin.
     39    */
     40    private $version;
     41
     42    /**
     43    * Initialize the class and set its properties.
     44    *
     45    * @since    5.2.0
     46    * @param      string    $plugin_name       The name of the plugin.
     47    * @param      string    $version    The version of this plugin.
     48    */
     49    public function __construct( $plugin_name, $version ) {
     50
     51        $this->plugin_name = $plugin_name;
     52        $this->version = $version;
     53
     54    }
     55
     56    /**
     57    * Register the stylesheets for the public-facing side of the site.
     58    *
     59    * @since    5.2.0
     60    */
     61    public function enqueue_styles() {
     62
     63        /**
     64        *
     65        * An instance of this class should be passed to the run() function
     66        * defined in Totalprocessing_Card_Payments_And_Gateway_Woocommerce_Loader as all of the hooks are defined
     67        * in that particular class.
     68        *
     69        * The Totalprocessing_Card_Payments_And_Gateway_Woocommerce_Loader will then create the relationship
     70        * between the defined hooks and the functions defined in this
     71        * class.
     72        */
     73
     74        wp_enqueue_style(
    7575            $this->plugin_name,
    7676            plugin_dir_url( __FILE__ ) . 'css/totalprocessing-card-payments-and-gateway-woocommerce-public.css',
     
    8080        );
    8181
    82     }
    83 
    84     /**
    85     * Register the JavaScript for the public-facing side of the site.
    86     *
    87     * @since    5.2.0
    88     */
    89     public function enqueue_scripts() {
    90 
    91         /**
    92         *
    93         * An instance of this class should be passed to the run() function
    94         * defined in Totalprocessing_Card_Payments_And_Gateway_Woocommerce_Loader as all of the hooks are defined
    95         * in that particular class.
    96         *
    97         * The Totalprocessing_Card_Payments_And_Gateway_Woocommerce_Loader will then create the relationship
    98         * between the defined hooks and the functions defined in this
    99         * class.
    100         */
    101 
    102         wp_enqueue_script( $this->plugin_name,
     82    }
     83
     84    /**
     85    * Register the JavaScript for the public-facing side of the site.
     86    *
     87    * @since    5.2.0
     88    */
     89    public function enqueue_scripts() {
     90
     91        /**
     92        *
     93        * An instance of this class should be passed to the run() function
     94        * defined in Totalprocessing_Card_Payments_And_Gateway_Woocommerce_Loader as all of the hooks are defined
     95        * in that particular class.
     96        *
     97        * The Totalprocessing_Card_Payments_And_Gateway_Woocommerce_Loader will then create the relationship
     98        * between the defined hooks and the functions defined in this
     99        * class.
     100        */
     101
     102        wp_enqueue_script( $this->plugin_name,
    103103            plugin_dir_url( __FILE__ ) . 'js/totalprocessing-card-payments-and-gateway-woocommerce-public.js',
    104104            array( 'jquery' ),
     
    107107        );
    108108
    109     }
    110 
    111     /**
    112     * Register the JavaScript for the public-facing side of the site.
    113     *
    114     * @since    5.2.0
    115     */
    116     public function add_new_woocommerce_payment_gateways( $gateways ) {
    117 
    118         $gateways[] = 'WC_Payment_Gateway_TotalProcessing_Cards';
    119         return $gateways;
    120 
    121     }
     109    }
     110
     111    /**
     112    * Register the JavaScript for the public-facing side of the site.
     113    *
     114    * @since    5.2.0
     115    */
     116    public function add_new_woocommerce_payment_gateways( $gateways ) {
     117
     118        $gateways[] = 'WC_Payment_Gateway_TotalProcessing_Cards';
     119        return $gateways;
     120
     121    }
    122122   
    123123    public function tpcp_pci_frame_initv2() {
     
    224224    public function tp_payment_dupe_check_cronstarter_activation(){
    225225        if( !wp_next_scheduled( TP_CONSTANTS::GLOBAL_PREFIX . 'dupe_payment_validation' ) ) { 
    226             wp_schedule_event( time(), 'every10minutes', TP_CONSTANTS::GLOBAL_PREFIX . 'dupe_payment_validation' ); 
    227         }
     226            wp_schedule_event( time(), 'every10minutes', TP_CONSTANTS::GLOBAL_PREFIX . 'dupe_payment_validation' ); 
     227        }
    228228    }
    229229
    230230    public function tp_payment_dupe_check_cron_schedules_10min( $schedules ){
    231231        $schedules['every10minutes'] = array(
    232             'interval' => 10*60,
    233             'display'  => __( 'Once Every 10 Minutes' )
     232            'interval' => 10*60,
     233            'display'  => __( 'Once Every 10 Minutes' )
    234234        );
    235235        return $schedules;
  • totalprocessing-card-payments/trunk/readme.txt

    r3169939 r3201037  
    44Requires at least: 5.2.0
    55Tested up to: 6.5.4
    6 Stable tag: 7.0.5
     6Stable tag: 7.1.0
    77Requires PHP: 7.4
    88License: GPLv3
     
    4747
    4848== Changelog ==
     49
     50= 7.1.0 - 02-12-2024 09:05 =
     51
     52* Addition of Applepay in to the main plugin
     53* Registration process refinement
     54* Applepay compatibility with HPOS and Woocommerce blocks
    4955
    5056= 7.0.5 - 16-10-2024 14:04 =
  • totalprocessing-card-payments/trunk/totalprocessing-card-payments-and-gateway-woocommerce.php

    r3169939 r3201037  
    1010 * Plugin URI:           https://www.totalprocessing.com/woocommerce/cards
    1111 * Description:          Accept all major credit and debit cards. Fast, seamless, and flexible.
    12  * Version:              7.0.5
     12 * Version:              7.1.0
    1313 * Author:               Total Processing Limited
    1414 * Copyright:            2022 Total Processing Limited.
Note: See TracChangeset for help on using the changeset viewer.