Plugin Directory

Changeset 3425201


Ignore:
Timestamp:
12/22/2025 09:39:02 AM (3 months ago)
Author:
easypayment
Message:

tags/1.0.10

Location:
payment-gateway-for-phonepe-and-for-woocommerce
Files:
59 added
5 edited

Legend:

Unmodified
Added
Removed
  • payment-gateway-for-phonepe-and-for-woocommerce/trunk/admin/class-pgppw-admin.php

    r3362173 r3425201  
    99        $this->plugin_name = $plugin_name;
    1010        $this->version = $version;
     11        add_action('admin_footer', array($this, 'easy_phonepe_add_deactivation_feedback_form'));
     12        add_action('admin_enqueue_scripts', array($this, 'easy_phonepe_add_deactivation_feedback_form_scripts'));
     13        add_action('wp_ajax_easy_phonepe_send_deactivation', array($this, 'easy_phonepe_handle_plugin_deactivation_request'));
    1114    }
    1215
     
    1720        }
    1821    }
     22   
     23    public function easy_phonepe_add_deactivation_feedback_form() {
     24        global $pagenow;
     25        if ('plugins.php' != $pagenow) {
     26            return;
     27        }
     28        include_once(PGPPW_PLUGIN_DIR . '/admin/feedback/deactivation-feedback-form.php');
     29    }
     30
     31    public function easy_phonepe_add_deactivation_feedback_form_scripts() {
     32        global $pagenow;
     33        if ('plugins.php' != $pagenow) {
     34            return;
     35        }
     36        wp_enqueue_script('jquery-blockui');
     37        wp_enqueue_style('deactivation-feedback-modal-phonepe', PGPPW_ASSET_URL . 'admin/feedback/css/deactivation-feedback-modal.css', null, PGPPW_PLUGIN_VERSION);
     38        wp_enqueue_script('deactivation-feedback-modal-phonepe', PGPPW_ASSET_URL . 'admin/feedback/js/deactivation-feedback-modal.js', null, PGPPW_PLUGIN_VERSION, true);
     39        wp_localize_script('deactivation-feedback-modal-phonepe', 'phonepe_feedback_form_ajax_data', array('nonce' => wp_create_nonce('easy_phonepe-ajax')));
     40    }
     41
     42    public function easy_phonepe_handle_plugin_deactivation_request() {
     43        $reason = isset($_POST['reason']) ? sanitize_text_field($_POST['reason']) : '';
     44        $reason_details = isset($_POST['reason_details']) ? sanitize_text_field($_POST['reason_details']) : '';
     45        $url = 'https://api.airtable.com/v0/appxxiU87VQWG6rOO/Sheet1';
     46        $api_key = 'patgeqj8DJfPjqZbS.9223810d432db4efccf27354c08513a7725e4a08d11a85fba75de07a539c8aeb';
     47        $data = array(
     48            'reason' => $reason . ' : ' . $reason_details,
     49            'plugin' => 'phonepe',
     50            'php_version' => phpversion(),
     51            'wp_version' => get_bloginfo('version'),
     52            'wc_version' => (!defined('WC_VERSION') ) ? '' : WC_VERSION,
     53            'locale' => get_locale(),
     54            'theme' => wp_get_theme()->get('Name'),
     55            'theme_version' => wp_get_theme()->get('Version'),
     56            'multisite' => is_multisite() ? 'Yes' : 'No',
     57            'plugin_version' => PGPPW_PLUGIN_VERSION
     58        );
     59        $args = array(
     60            'headers' => array(
     61                'Authorization' => 'Bearer ' . $api_key,
     62                'Content-Type' => 'application/json',
     63            ),
     64            'body' => json_encode(array(
     65                'records' => array(
     66                    array(
     67                        'fields' => array(
     68                            'reason' => json_encode($data),
     69                            'date' => date('M d, Y h:i:s A')
     70                        ),
     71                    ),
     72                ),
     73            )),
     74            'method' => 'POST'
     75        );
     76        $response = wp_remote_post($url, $args);
     77        if (is_wp_error($response)) {
     78            wp_send_json_error(array(
     79                'message' => 'Error communicating with Airtable',
     80                'error' => $response->get_error_message()
     81            ));
     82        } else {
     83            wp_send_json_success(array(
     84                'message' => 'Deactivation feedback submitted successfully',
     85                'response' => json_decode(wp_remote_retrieve_body($response), true)
     86            ));
     87        }
     88    }
    1989}
  • payment-gateway-for-phonepe-and-for-woocommerce/trunk/includes/class-pgppw-gateway.php

    r3404110 r3425201  
    128128        $this->form_fields = [
    129129            'section_one' => [
    130                 'title' => __('Step 1: Registration', 'payment-gateway-for-phonepe-and-for-woocommerce'),
     130                'title' => __('Step 1: Registration (Skip this step if you already have a PhonePe business account)', 'payment-gateway-for-phonepe-and-for-woocommerce'),
    131131                'type' => 'title',
    132132                'class' => 'pgppw-phonepe-collapsible-section'
  • payment-gateway-for-phonepe-and-for-woocommerce/trunk/includes/class-pgppw.php

    r3404110 r3425201  
    1111            $this->version = PGPPW_VERSION;
    1212        } else {
    13             $this->version = '1.0.9';
     13            $this->version = '1.0.10';
    1414        }
    1515        $this->plugin_name = 'payment-gateway-for-phonepe-and-for-woocommerce';
  • payment-gateway-for-phonepe-and-for-woocommerce/trunk/payment-gateway-for-phonepe-and-for-woocommerce.php

    r3404110 r3425201  
    66 * Plugin URI:        https://wordpress.org/plugins/payment-gateway-for-phonepe-and-for-woocommerce/
    77 * Description:       Accept payments through UPI, Cards, and Net Banking — developed by an official PhonePe Partner.
    8  * Version:           1.0.9
     8 * Version:           1.0.10
    99 * Author:            Easy Payment
    1010 * Author URI:        https://profiles.wordpress.org/easypayment/
     
    1717 * Tested up to: 6.9
    1818 * WC requires at least: 3.4
    19  * WC tested up to: 10.3.5
     19 * WC tested up to: 10.4.2
    2020 */
    2121// If this file is called directly, abort.
     
    3535}
    3636if (!defined('PGPPW_PLUGIN_VERSION')) {
    37     define('PGPPW_PLUGIN_VERSION', '1.0.9');
     37    define('PGPPW_PLUGIN_VERSION', '1.0.10');
    3838}
    3939
  • payment-gateway-for-phonepe-and-for-woocommerce/trunk/readme.txt

    r3404110 r3425201  
    66Tested up to: 6.9
    77Requires PHP: 7.4 
    8 Stable tag: 1.0.9 
     8Stable tag: 1.0.10 
    99License: GPLv2 or later 
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html 
     
    6060
    6161== Changelog == 
     62
     63= 1.0.10 =
     64* Enhanced - Improved gateway settings panel text.
    6265
    6366= 1.0.9 =
Note: See TracChangeset for help on using the changeset viewer.