Changeset 3282559
- Timestamp:
- 04/27/2025 03:01:08 AM (11 months ago)
- Location:
- mustangpay/trunk
- Files:
-
- 4 edited
-
mustangpay.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
src/MustangpayApiUtilsV1.php (modified) (3 diffs)
-
src/PaymentGateway.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mustangpay/trunk/mustangpay.php
r3281618 r3282559 4 4 * Plugin URI: https://www.mustangpay.co.za 5 5 * Description: South Africa's trusted payment gateway offering secure card payments and EFT services. 6 * Version: 1.1. 16 * Version: 1.1.2 7 7 * Author: MustangPay 8 8 * Author URI: https://www.mustangpay.co.za/contact-us -
mustangpay/trunk/readme.txt
r3281623 r3282559 5 5 Tested up to: 6.7 6 6 Requires PHP: 7.4 7 Stable tag: 1.1. 17 Stable tag: 1.1.2 8 8 License: GPLv2 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
mustangpay/trunk/src/MustangpayApiUtilsV1.php
r3281526 r3282559 122 122 123 123 if (empty($merchant_id)) { 124 wp_send_json_error(array('message' => __( 'Please configure Merchant Id', 'mustangpay' ))); 124 125 return array( 126 'status' =>0, 127 'message'=>__( 'Please configure Merchant Id', 'mustangpay' ) 128 ); 125 129 } 126 130 … … 131 135 132 136 if (empty($config->get_option('rsaPrivateKey_test'))) { 133 wp_send_json_error(array('message' => __( 'Please configure rsaPrivateKey_test', 'mustangpay' ))); 137 138 return array( 139 'status' =>0, 140 'message'=>__( 'Please configure rsaPrivateKey_test', 'mustangpay' ) 141 ); 142 134 143 } 135 144 … … 138 147 139 148 if (empty($config->get_option('rsaPrivateKey'))) { 140 wp_send_json_error(array('message' => __( 'Please configure rsaPrivateKey', 'mustangpay' ))); 149 150 return array( 151 'status' =>0, 152 'message'=>__( 'Please configure rsaPrivateKey', 'mustangpay' ) 153 ); 141 154 } 142 155 -
mustangpay/trunk/src/PaymentGateway.php
r3281526 r3282559 77 77 } 78 78 79 function timed_redirect_with_message($msg) { 80 // 提示信息 81 $message = $msg.',The page will jump in 3 seconds.'; 82 // 跳转目标URL 83 //$redirect_url = $url; 84 // 跳转等待时间(秒) 85 $delay = 3; 86 87 $redirect_url = home_url('index.php/checkout/'); 88 89 // 输出包含提示信息和JavaScript定时跳转代码的HTML 90 echo '<div style="padding: 20px; background-color: #f0f0f0; text-align: center;">'; 91 echo '<p>'. esc_html( $message ). '</p>'; 92 echo '<script type="text/javascript">'; 93 echo 'setTimeout(function() { window.location.href = "'. esc_url( $redirect_url ). '"; }, '. ( $delay * 1000 ). ');'; 94 echo '</script>'; 95 echo '</div>'; 96 } 97 79 98 /** 80 99 * Gateway settings … … 240 259 if(!$order||(method_exists($order, 'is_paid')?$order->is_paid():in_array($order->get_status(), array( 'processing', 'completed' )))){ 241 260 242 $return_url= $order->get_checkout_order_received_url();261 //$return_url= $order->get_checkout_order_received_url(); 243 262 263 $return_url = home_url('index.php/checkout/'); 244 264 /* return array( 245 265 'result' => 'success', … … 296 316 $order = wc_get_order( $order_id ); 297 317 298 $pagrurl=$this->getCurrentUrl();299 318 //$pagrurl=$this->getCurrentUrl(); 319 $pagrurl = home_url('index.php/checkout/'); 300 320 //var_dump($pagrurl); 301 321 … … 327 347 $notify_url= WC()->api_request_url('hpj-wc-wechatpay-notify'); 328 348 349 350 329 351 330 352 $return_url= $order->get_checkout_order_received_url(); … … 372 394 exit; 373 395 }else{ 374 wp_send_json_error($data['message']); 396 //exit; 397 //$this->timed_redirect_with_message($data['message']); 398 wp_send_json_error($data['message']); 375 399 } 376 400 ?> 377 <div class="pay-weixin-design" >401 <div class="pay-weixin-design" hidden> 378 402 379 403 <div class="p-w-center" style="padding:15px"> … … 494 518 } 495 519 "; 496 wp_enqueue_style('mustangpay-css',get_stylesheet_uri());497 wp_add_inline_style('mustangpay-css', $inline_css);520 // wp_enqueue_style('mustangpay-css',get_stylesheet_uri()); 521 // wp_add_inline_style('mustangpay-css', $inline_css); 498 522 /* $nonce=wp_create_nonce('mustangpay'); 499 523 var_dump($nonce);exit;*/ … … 629 653 630 654 631 wp_register_script( 'mustangpay-js', false );632 wp_enqueue_script( 'mustangpay-js' );655 // wp_register_script( 'mustangpay-js', false ); 656 // wp_enqueue_script( 'mustangpay-js' ); 633 657 634 658 635 659 636 //$safe_js = wp_json_encode($inline_js); 637 wp_add_inline_script('mustangpay-js',$inline_js); 660 // wp_add_inline_script('mustangpay-js',$inline_js); 638 661 639 662
Note: See TracChangeset
for help on using the changeset viewer.