Plugin Directory

Changeset 3406427


Ignore:
Timestamp:
12/01/2025 03:56:24 AM (4 months ago)
Author:
easypayment
Message:

tags/1.0.4

Location:
easy-payment-gateway-for-razorpay-and-for-woocommerce
Files:
62 added
4 edited

Legend:

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

    r3367179 r3406427  
    1414        $this->plugin_name = $plugin_name;
    1515        $this->version = $version;
     16        add_action('admin_footer', array($this, 'easy_razorpay_add_deactivation_feedback_form'));
     17        add_action('admin_enqueue_scripts', array($this, 'easy_razorpay_add_deactivation_feedback_form_scripts'));
     18        add_action('wp_ajax_easy_razorpay_send_deactivation', array($this, 'easy_razorpay_handle_plugin_deactivation_request'));
    1619    }
    1720
     
    2225        }
    2326    }
     27   
     28    public function easy_razorpay_add_deactivation_feedback_form() {
     29        global $pagenow;
     30        if ('plugins.php' != $pagenow) {
     31            return;
     32        }
     33        include_once(EASY_RAZORPAY_FOR_WOOCOMMERCE_PLUGIN_DIR . '/admin/feedback/deactivation-feedback-form.php');
     34    }
     35
     36    public function easy_razorpay_add_deactivation_feedback_form_scripts() {
     37        global $pagenow;
     38        if ('plugins.php' != $pagenow) {
     39            return;
     40        }
     41        wp_enqueue_script('jquery-blockui');
     42        wp_enqueue_style('deactivation-feedback-modal-razorpay', EASY_RAZORPAY_FOR_WOOCOMMERCE_ASSET_URL . 'admin/feedback/css/deactivation-feedback-modal.css', null, EASY_RAZORPAY_FOR_WOOCOMMERCE_VERSION);
     43        wp_enqueue_script('deactivation-feedback-modal-razorpay', EASY_RAZORPAY_FOR_WOOCOMMERCE_ASSET_URL . 'admin/feedback/js/deactivation-feedback-modal.js', null, EASY_RAZORPAY_FOR_WOOCOMMERCE_VERSION, true);
     44        wp_localize_script('deactivation-feedback-modal-razorpay', 'razorpay_feedback_form_ajax_data', array('nonce' => wp_create_nonce('easy_razorpay-ajax')));
     45    }
     46
     47    public function easy_razorpay_handle_plugin_deactivation_request() {
     48        $reason = isset($_POST['reason']) ? sanitize_text_field($_POST['reason']) : '';
     49        $reason_details = isset($_POST['reason_details']) ? sanitize_text_field($_POST['reason_details']) : '';
     50        $url = 'https://api.airtable.com/v0/appxxiU87VQWG6rOO/Sheet1';
     51        $api_key = 'patgeqj8DJfPjqZbS.9223810d432db4efccf27354c08513a7725e4a08d11a85fba75de07a539c8aeb';
     52        $data = array(
     53            'reason' => $reason . ' : ' . $reason_details,
     54            'plugin' => 'razorpay',
     55            'php_version' => phpversion(),
     56            'wp_version' => get_bloginfo('version'),
     57            'wc_version' => (!defined('WC_VERSION') ) ? '' : WC_VERSION,
     58            'locale' => get_locale(),
     59            'theme' => wp_get_theme()->get('Name'),
     60            'theme_version' => wp_get_theme()->get('Version'),
     61            'multisite' => is_multisite() ? 'Yes' : 'No',
     62            'plugin_version' => EASY_RAZORPAY_FOR_WOOCOMMERCE_VERSION
     63        );
     64        $args = array(
     65            'headers' => array(
     66                'Authorization' => 'Bearer ' . $api_key,
     67                'Content-Type' => 'application/json',
     68            ),
     69            'body' => json_encode(array(
     70                'records' => array(
     71                    array(
     72                        'fields' => array(
     73                            'reason' => json_encode($data),
     74                            'date' => date('M d, Y h:i:s A')
     75                        ),
     76                    ),
     77                ),
     78            )),
     79            'method' => 'POST'
     80        );
     81        $response = wp_remote_post($url, $args);
     82        if (is_wp_error($response)) {
     83            wp_send_json_error(array(
     84                'message' => 'Error communicating with Airtable',
     85                'error' => $response->get_error_message()
     86            ));
     87        } else {
     88            wp_send_json_success(array(
     89                'message' => 'Deactivation feedback submitted successfully',
     90                'response' => json_decode(wp_remote_retrieve_body($response), true)
     91            ));
     92        }
     93    }
    2494}
  • easy-payment-gateway-for-razorpay-and-for-woocommerce/trunk/easy-payment-gateway-for-razorpay-and-for-woocommerce.php

    r3380070 r3406427  
    66 * Plugin URI:        https://wordpress.org/plugins/easy-payment-gateway-for-razorpay-and-for-woocommerce/
    77 * Description:       Accept payments through UPI, Cards, and Net Banking — developed by an official Razorpay Partner.
    8  * Version:           1.0.3
     8 * Version:           1.0.4
    99 * Author:            Easy Payment
    1010 * Author URI:        https://profiles.wordpress.org/easypayment//
     
    1616 * Requires PHP: 7.4
    1717 * Requires Plugins: woocommerce
    18  * Tested up to: 6.8.3
     18 * Tested up to: 6.9
    1919 * WC requires at least: 3.4
    20  * WC tested up to: 10.2.2
     20 * WC tested up to: 10.3.5
    2121 */
    2222// If this file is called directly, abort.
     
    2828    define('EASY_RAZORPAY_FOR_WOOCOMMERCE_PLUGIN_DIR', dirname(__FILE__));
    2929}
    30 define('EASY_RAZORPAY_FOR_WOOCOMMERCE_VERSION', '1.0.3');
     30if (!defined('EASY_RAZORPAY_FOR_WOOCOMMERCE_VERSION')) {
     31    define('EASY_RAZORPAY_FOR_WOOCOMMERCE_VERSION', '1.0.4');
     32}
    3133if (!defined('EASY_RAZORPAY_FOR_WOOCOMMERCE_ASSET_URL')) {
    3234    define('EASY_RAZORPAY_FOR_WOOCOMMERCE_ASSET_URL', plugin_dir_url(__FILE__));
  • easy-payment-gateway-for-razorpay-and-for-woocommerce/trunk/includes/class-easy-payment-gateway-for-razorpay-and-for-woocommerce-gateway.php

    r3380070 r3406427  
    1111    public $api_key;
    1212    public $api_secret;
     13    public $hide_redirect_icon;
     14    public $redirect_icon;
    1315    private static $receipt_hook_added = false;
    1416    private static $pgrpw_notice_rendered = false;
  • easy-payment-gateway-for-razorpay-and-for-woocommerce/trunk/readme.txt

    r3380071 r3406427  
    33Tags: Razorpay, UPI, Credit Cards 
    44Requires at least: 6.0 
    5 Tested up to: 6.8.3 
     5Tested up to: 6.9
    66Requires PHP: 7.4 
    7 Stable tag: 1.0.3 
     7Stable tag: 1.0.4 
    88License: GPL-2.0+ 
    99License URI: http://www.gnu.org/licenses/gpl-2.0.txt 
     
    9393== Changelog ==
    9494
     95= 1.0.4 =
     96* Added - Compatibility with WordPress 6.9.
     97
    9598= 1.0.3 - 2025-10-17 =
    9699* Added – Displayed payment processing message on the order payment page.
Note: See TracChangeset for help on using the changeset viewer.