Changeset 3225972
- Timestamp:
- 01/21/2025 07:30:27 AM (15 months ago)
- Location:
- ksher-payment
- Files:
-
- 43 added
- 5 edited
-
tags/1.1.3 (added)
-
tags/1.1.3/assets (added)
-
tags/1.1.3/assets/css (added)
-
tags/1.1.3/assets/css/admin-style.css (added)
-
tags/1.1.3/assets/css/style.css (added)
-
tags/1.1.3/assets/img (added)
-
tags/1.1.3/assets/img/ksher-airpay.png (added)
-
tags/1.1.3/assets/img/ksher-alipay.png (added)
-
tags/1.1.3/assets/img/ksher-atome.png (added)
-
tags/1.1.3/assets/img/ksher-bbl.png (added)
-
tags/1.1.3/assets/img/ksher-credit.png (added)
-
tags/1.1.3/assets/img/ksher-kbank.png (added)
-
tags/1.1.3/assets/img/ksher-krungsri.png (added)
-
tags/1.1.3/assets/img/ksher-ktc.png (added)
-
tags/1.1.3/assets/img/ksher-line.png (added)
-
tags/1.1.3/assets/img/ksher-promptpay.png (added)
-
tags/1.1.3/assets/img/ksher-scb.png (added)
-
tags/1.1.3/assets/img/ksher-shopeepay-1.png (added)
-
tags/1.1.3/assets/img/ksher-shopeepay.png (added)
-
tags/1.1.3/assets/img/ksher-true.png (added)
-
tags/1.1.3/assets/img/ksher-wechat.png (added)
-
tags/1.1.3/assets/js (added)
-
tags/1.1.3/assets/js/check_payment.js (added)
-
tags/1.1.3/assets/js/connection.js (added)
-
tags/1.1.3/assets/js/ksher-checkout.js (added)
-
tags/1.1.3/assets/js/upload.js (added)
-
tags/1.1.3/includes (added)
-
tags/1.1.3/includes/admin (added)
-
tags/1.1.3/includes/admin/views (added)
-
tags/1.1.3/includes/admin/views/ksher-page-settings.php (added)
-
tags/1.1.3/ksher-block.php (added)
-
tags/1.1.3/ksher.php (added)
-
tags/1.1.3/languages (added)
-
tags/1.1.3/order-received (added)
-
tags/1.1.3/order-received/order-received.php (added)
-
tags/1.1.3/payment (added)
-
tags/1.1.3/payment/set-payment.php (added)
-
tags/1.1.3/readme.txt (added)
-
tags/1.1.3/setting (added)
-
tags/1.1.3/setting/check-payment.php (added)
-
tags/1.1.3/setting/setting.php (added)
-
trunk/assets/js/ksher-checkout.js (added)
-
trunk/assets/js/upload.js (modified) (1 diff)
-
trunk/ksher-block.php (added)
-
trunk/ksher.php (modified) (2 diffs)
-
trunk/payment/set-payment.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/setting/setting.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ksher-payment/trunk/assets/js/upload.js
r3206808 r3225972 63 63 form_data.append("file", ksherPrivateKey); 64 64 form_data.append("action", "file_upload"); 65 form_data.append("security", ul.nonce); 65 66 66 67 $.ajax({ -
ksher-payment/trunk/ksher.php
r3206808 r3225972 4 4 * Plugin URI: https://www.ksher.com 5 5 * Description: Ksher Gateway Plugin is a WordPress plugin designed specifically for WooCommerce. The plugin adds support for Ksher Payment Gateway payment method to WooCommerce. 6 * Version: 1.1. 26 * Version: 1.1.3 7 7 * Author: Ksher 8 8 * Text Domain: ksher … … 61 61 include('payment/set-payment.php'); 62 62 include('order-received/order-received.php'); 63 64 add_action('before_woocommerce_init', 'ksher_cart_checkout_blocks_compatibility'); 65 function ksher_cart_checkout_blocks_compatibility() { 66 // Check if the required class exists 67 if (class_exists('\Automattic\WooCommerce\Utilities\FeaturesUtil')) { 68 // Declare compatibility for 'cart_checkout_blocks' 69 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('cart_checkout_blocks', __FILE__, true); 70 } 71 } 72 73 add_action( 'woocommerce_blocks_loaded', 'ksher_register_order_approval_payment_method_type' ); 74 function ksher_register_order_approval_payment_method_type() { 75 if ( ! class_exists( 'Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType' ) ) { 76 return; 77 } 78 79 require_once plugin_dir_path(__FILE__) . 'ksher-block.php'; 80 81 add_action( 82 'woocommerce_blocks_payment_method_type_registration', 83 function( Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry $payment_method_registry ) { 84 // Register an instance of My_Custom_Gateway_Blocks 85 $payment_method_registry->register( new Ksher_Gateway_Blocks ); 86 } 87 ); 88 } 89 63 90 } -
ksher-payment/trunk/payment/set-payment.php
r3206808 r3225972 14 14 } 15 15 16 if (get_option('ksher_connection') == 'success') {16 17 17 // SET PAYMENT IN WOOCOMMARCE. 18 add_filter( 'woocommerce_payment_gateways', 'ksher_add_gateway_class' );19 function ksher_add_gateway_class( $gateways )20 {21 $gateways[] = 'WC_Ksher_Gateway';22 return $gateways;23 }24 25 add_action( 'plugins_loaded', 'ksher_init_gateway_class' );26 function ksher_init_gateway_class()27 {18 add_filter( 'woocommerce_payment_gateways', 'ksher_add_gateway_class' ); 19 function ksher_add_gateway_class( $gateways ) 20 { 21 $gateways[] = 'WC_Ksher_Gateway'; 22 return $gateways; 23 } 24 25 add_action( 'plugins_loaded', 'ksher_init_gateway_class' ); 26 function ksher_init_gateway_class() 27 { 28 28 29 29 class WC_Ksher_Gateway extends WC_Payment_Gateway … … 73 73 74 74 $this->ktc_instal = $this->get_option( 'ktc_instal' ); 75 $this->instal_fee_payer = $this->get_option( 'instal_fee_payer' );75 $this->instal_fee_payer = $this->get_option( 'instal_fee_payer' ); 76 76 $this->ktc_installment_period = $this->get_option( 'ktc_installment_period'); 77 77 … … 87 87 $this->baybank_deeplink = $this->get_option( 'baybank_deeplink' ); 88 88 89 89 90 90 91 91 add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) ); … … 611 611 } 612 612 } 613 }614 613 } 614 615 615 ?> -
ksher-payment/trunk/readme.txt
r3206808 r3225972 6 6 Requires PHP: 7.0 7 7 WooCommerce up to: 9.0.0 8 Stable tag: 1.1. 28 Stable tag: 1.1.3 9 9 License: GPLv2 or later 10 10 -
ksher-payment/trunk/setting/setting.php
r3206808 r3225972 136 136 { 137 137 138 check_ajax_referer('ksher_nonce', 'security'); 139 140 141 138 142 if (!current_user_can('manage_options')) { 139 143 wp_die('Unauthorized', '403 Forbidden', ['response' => 403]);
Note: See TracChangeset
for help on using the changeset viewer.