Changeset 2504769
- Timestamp:
- 03/28/2021 03:05:46 PM (5 years ago)
- Location:
- pay-with-mtn-momo-woocommerce
- Files:
-
- 17 added
- 4 edited
-
tags/1.0.1 (added)
-
tags/1.0.1/LICENSE.txt (added)
-
tags/1.0.1/README.txt (added)
-
tags/1.0.1/assets (added)
-
tags/1.0.1/assets/css (added)
-
tags/1.0.1/assets/css/wc-mtn-momo-pay.css (added)
-
tags/1.0.1/assets/img (added)
-
tags/1.0.1/assets/img/mtn-momo-logo.png (added)
-
tags/1.0.1/assets/js (added)
-
tags/1.0.1/assets/js/wc-mtn-momo-pay.js (added)
-
tags/1.0.1/assets/js/wc-mtn-momo-pay_public.js (added)
-
tags/1.0.1/classes (added)
-
tags/1.0.1/classes/class_momo_pay_controller.php (added)
-
tags/1.0.1/classes/class_momo_pay_gateway.php (added)
-
tags/1.0.1/classes/class_momo_pay_helper.php (added)
-
tags/1.0.1/classes/class_momo_pay_view.php (added)
-
tags/1.0.1/mtn-momo-pay.php (added)
-
trunk/README.txt (modified) (3 diffs)
-
trunk/classes/class_momo_pay_gateway.php (modified) (1 diff)
-
trunk/classes/class_momo_pay_view.php (modified) (2 diffs)
-
trunk/mtn-momo-pay.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pay-with-mtn-momo-woocommerce/trunk/README.txt
r2486245 r2504769 4 4 Tags: MTN MoMo, MoMo, payment, MTN, payment gateway, mobile money, WooCommerce 5 5 Tested up to: 5.7 6 Stable tag: 1.0. 16 Stable tag: 1.0.2 7 7 Requires at least: 5.0 8 8 Requires PHP: 7.0 … … 90 90 This section describes how to install the plugin and get it working. 91 91 92 1. Unzip ` mtn-momo-pay.zip` to the `/wp-content/plugins/` directory, or install from the WordPress Plugins Directory.92 1. Unzip `pay-with-mtn-momo-woocommerce.zip` to the `/wp-content/plugins/` directory, or install from the WordPress Plugins Directory. 93 93 2. Activate the plugin through the 'Plugins' menu in WordPress 94 94 3. Configure plugin under WooCommerce->Payments, look for *MTN MoMo* … … 147 147 == Changelog == 148 148 149 = 1.0.2 = 150 * Documentation updated 151 * Fixed REST callback, `permission_callback` added 152 * Deprecation warnings removed 153 149 154 = 1.0.1 = 150 155 * Tested with Wordpress 5.7 -
pay-with-mtn-momo-woocommerce/trunk/classes/class_momo_pay_gateway.php
r2486245 r2504769 732 732 return array( 733 733 'amount' => (int) $order->order_total, 734 'note' => 'Order ' . $order-> id,734 'note' => 'Order ' . $order->get_order_number(), 735 735 'payer' => $this->cleanPhone($order->billing_phone) 736 736 ); -
pay-with-mtn-momo-woocommerce/trunk/classes/class_momo_pay_view.php
r2470497 r2504769 284 284 $cartUrl = $cart_page_id ? get_permalink( $cart_page_id ) : ''; 285 285 286 $orderReceivedUrl = $order->get_checkout_order_received_url(); //$siteUrl . '/checkout/order-received';287 $cartPaymentWithIdUrl = $ siteUrl . '/cart?momo_payment_id=' . $payment_id;286 $orderReceivedUrl = $order->get_checkout_order_received_url(); 287 $cartPaymentWithIdUrl = $cartUrl + '?momo_payment_id=' . $payment_id; 288 288 289 289 $html = '<div class="momopay-checkout-box"> … … 291 291 <img class="momopay-checkout-logo" src="'. plugin_dir_url(__FILE__) . '../assets/img/mtn-momo-logo.png" alt="MTN MoMoPay payments"> 292 292 <div class="mtn-momo-pay_error-box" id="momopay_errorBox"></div> 293 <input type="hidden" id="currentOrderId" value="'. $order-> id.'" />293 <input type="hidden" id="currentOrderId" value="'. $order->get_id() .'" /> 294 294 <input type="hidden" id="paymentId" value="'. $payment_id .'" /> 295 295 <input type="hidden" id="orderCancelUrl" value="'. $orderCancelUrl.'" /> -
pay-with-mtn-momo-woocommerce/trunk/mtn-momo-pay.php
r2486245 r2504769 4 4 * Plugin URI: https://www.clickon.ch 5 5 * Description: Accept payments over MTN MoMo in WooCommerce 6 * Version: 1.0. 16 * Version: 1.0.2 7 7 * Author: mstonys 8 8 * Author URI: https://profiles.wordpress.org/mstonys/ 9 9 * Licence: GPL2 10 10 * Text Domain: mtn-momo-pay 11 * Tested up to: 5. 411 * Tested up to: 5.7 12 12 * Stable tag: 5.0 13 13 * WC requires at least: 4.2.0 14 * WC tested up to: 5. 0.014 * WC tested up to: 5.1.0 15 15 */ 16 16 … … 32 32 }; 33 33 34 function woo_momo_pay_admin_assets() { 35 wp_enqueue_script('momo_pay_script', plugin_dir_url(__FILE__) . 'assets/js/wc-mtn-momo-pay.js', array('jquery'), time(), true); 36 wp_enqueue_style( 'momo_pay_style', plugin_dir_url(__FILE__) . 'assets/css/wc-mtn-momo-pay.css', array(), time()); 37 }; 34 if(!function_exists('woo_momo_pay_admin_assets')) { 35 function woo_momo_pay_admin_assets() { 36 wp_enqueue_script('momo_pay_script', plugin_dir_url(__FILE__) . 'assets/js/wc-mtn-momo-pay.js', array('jquery'), time(), true); 37 wp_enqueue_style( 'momo_pay_style', plugin_dir_url(__FILE__) . 'assets/css/wc-mtn-momo-pay.css', array(), time()); 38 }; 39 } 38 40 39 40 function woo_momo_pay_public_assets() { 41 wp_enqueue_script('momo_pay_script_public', plugin_dir_url(__FILE__) . 'assets/js/wc-mtn-momo-pay_public.js', array('jquery'), time(), true); 42 wp_enqueue_style( 'momo_pay_style', plugin_dir_url(__FILE__) . 'assets/css/wc-mtn-momo-pay.css', array(), time()); 43 }; 41 if(!function_exists('woo_momo_pay_public_assets')) { 42 function woo_momo_pay_public_assets() { 43 wp_enqueue_script('momo_pay_script_public', plugin_dir_url(__FILE__) . 'assets/js/wc-mtn-momo-pay_public.js', array('jquery'), time(), true); 44 wp_enqueue_style( 'momo_pay_style', plugin_dir_url(__FILE__) . 'assets/css/wc-mtn-momo-pay.css', array(), time()); 45 }; 46 } 44 47 45 48 … … 111 114 array( 112 115 'methods' => 'POST', 113 'callback' => 'process_momo_payment' 114 ) 116 'callback' => 'process_momo_payment', 117 'permission_callback' => '__return_true' 118 ) 115 119 ); 116 120 });
Note: See TracChangeset
for help on using the changeset viewer.