Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author myCred

    (@designbymerovingi)

    Hi. Check your database setup for your log table. Make sure collations are correct and that Chinese characters are supported.

    Thread Starter redirg

    (@redirg)

    thanks,i checked my log table,Encoding is utf8,I found that the reason may not be Chinese,I found two in the wp_users table inside the data as follows:

    [ deleted, please do not post table entries from your user database ]

    Thread Starter redirg

    (@redirg)

    The above two data exists, it will be incorrect payment.

    [ Moderator note: please wrap code in backticks or use the code button. ]

    {"result":"failure","messages":"
    \n\t\t\t
    \u52a8\u4f5c\u5931\u8d25\u3002\u8bf7\u5237\u65b0\u9875\u9762\u7136\u540e\u91cd\u8bd5\u3002<\/li>\n\t\t\t
    \u56fd\u5bb6<\/strong> \u4e3a\u5fc5\u586b\u9879<\/li>\n\t\t\t
    \u540d<\/strong> \u4e3a\u5fc5\u586b\u9879<\/li>\n\t\t\t
    \u59d3<\/strong> \u4e3a\u5fc5\u586b\u9879<\/li>\n\t\t\t
    \u5730\u5740<\/strong> \u4e3a\u5fc5\u586b\u9879<\/li>\n\t\t\t
    Town \/ City<\/strong> \u4e3a\u5fc5\u586b\u9879<\/li>\n\t\t\t
    State \/ County<\/strong> \u4e3a\u5fc5\u586b\u9879<\/li>\n\t\t\t
    Postcode \/ Zip<\/strong> \u4e3a\u5fc5\u586b\u9879<\/li>\n\t\t\t
    Email \u5730\u5740<\/strong> \u4e3a\u5fc5\u586b\u9879<\/li>\n\t\t\t
    \u7535\u8bdd<\/strong> \u4e3a\u5fc5\u586b\u9879<\/li>\n\t\t\t
    \u56fd\u5bb6<\/strong> \u4e3a\u5fc5\u586b\u9879<\/li>\n\t\t\t
    \u540d<\/strong> \u4e3a\u5fc5\u586b\u9879<\/li>\n\t\t\t
    \u59d3<\/strong> \u4e3a\u5fc5\u586b\u9879<\/li>\n\t\t\t
    \u5730\u5740<\/strong> \u4e3a\u5fc5\u586b\u9879<\/li>\n\t\t\t
    Town \/ City<\/strong> \u4e3a\u5fc5\u586b\u9879<\/li>\n\t\t\t
    State \/ County<\/strong> \u4e3a\u5fc5\u586b\u9879<\/li>\n\t\t\t
    Postcode \/ Zip<\/strong> \u4e3a\u5fc5\u586b\u9879<\/li>\n\t\t\t
    \u65e0\u6548\u7684\u9001\u8d27\u65b9\u5f0f\u3002<\/li>\n\t\t\t
    \u65e0\u6548\u7684\u652f\u4ed8\u65b9\u5f0f\u3002<\/li>\n\t<\/ul>","refresh":"false"}
    Thread Starter redirg

    (@redirg)

    But other payment interface are normal, only mycred payment interface there is such a problem,thanks

    Thread Starter redirg

    (@redirg)

    I locate the following code mycred-woocomerce.php problems:

    do_action( ‘mycred_paid_for_woo’, $order, $cui );
    // Return the good news
    return array(
    ‘result’ => ‘success’,
    ‘redirect’ => $this->get_return_url( $order )
    );

    I changed the code below normal

    do_action( ‘mycred_paid_for_woo’, $order, $cui );
    $url = add_query_arg( ‘key’, $order->order_key, add_query_arg( ‘order’, $order->id, $return_url ) );

    $return_url = “https://localhost/wp/checkout/order-received&#8221;.$url;
    // Return the good news
    return array(
    ‘result’ => ‘success’,
    ‘redirect’ => $this->get_return_url( $order )
    );

    Thread Starter redirg

    (@redirg)

    The above was wrong, it should be this:
    ‘redirect’ => $ return_url

    Plugin Author myCred

    (@designbymerovingi)

    Do get the same issue only on your localhost or other servers as well?

    I am using the return URL as shown in the WooCommerce documentation for custom payment gateways.

    So far I have not been able to replicate this issue on any of my test or live sites that uses the WooCommerce payment gateway. Do you have any customizations added to your version? Also, did you talk to WooCommerce to see what could cause this type of errors as I have not come across this error before.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘mycred gateway not working’ is closed to new replies.