2017-12-01 5 views
0

エラーメッセージが表示され、razorpayの支払いが完了し、Woocommerceの注文が失敗します。Woocommerceの注文キーが "order_pay"関数に渡されませんでした。エラーメッセージ「この注文は無効で、お支払いができません」

申し訳ありませんが、この注文は無効で、お支払いができません。

注文が配置されている場合、pay_urlが

https://dev-xyz.pantheonsite.io/checkout/order-pay/6339/?key=wc_order_5b421123a4g1r 

以下のようなしかし、 "WC_Shortcode_Checkout" スローエラーで "order_pay" 機能に

申し訳ありませんが、この以下のように生成されます注文は無効で、お支払いはできません。例外

throw new Exception(__('Sorry, this order is invalid and cannot be paid for.', 'woocommerce')); 

から

woocommerceが$ _GET

$order_key = $_GET['key']; 

から問題になる可能性がどのような任意のソリューションを、ためのキーを期待して、この問題に深く掘り?この問題を回避するソリューションとして

+1

親切に、あなたがより良い[WooCommerceのためRazorpay]でスレッドを開く必要があります(HTTPSの値を送信する際の問題を引き起こす可能性がnginxの設定ファイル、で逃したかもしれません.org/support/plugin/woo-razorpay)プラグインサポートページ... – LoicTheAztec

答えて

0

:\ MAMP \ htdocsに\ webiste:

 if($order_key === ''){ 
        $order_key = get_post_meta($order_id, '_order_key', true); 
     } 

クラスWC_Shortcode_CheckoutにおけるDの一部であり、その下に追加のコード上の$ _GETから値を取得できない場合は\ wp-content \ plugins \ woocommerce \ includes \ shortcodes \ class-wc-shortcode-checkout.phpはこの問題を解決します。

 } catch (Exception $e) { 
      wc_add_notice($e->getMessage(), 'error'); 
     } 
    } elseif ($order_id) { 

     // Pay for order after checkout step 
     $order_key   = isset($_GET['key']) ? wc_clean($_GET['key']) : ''; 
     $order    = wc_get_order($order_id); 
     if($order_key === ''){ 
        $order_key = get_post_meta($order_id, '_order_key', true); 
     } 
     if ($order && $order->get_id() === $order_id && $order->get_order_key() === $order_key) { 

もう1つの原因として、Nginxの設定に問題がある可能性があります。 //ワードプレス:デフォルトでは、クエリ刺さも$ _GET

location/{ 
try_files $uri $uri/ /index.php?$query_string; 
} 
関連する問題