• Resolved keviniseekie

    (@keviniseekie)


    We have re-developed a website for a client (http://johnbuckleysports.com) and had included Max Mega Menu as part of the new design. The site is running WooCommerce using the WooCommerce Realex Gateway (https://woocommerce.com/products/realex-payment-gateway/) plugin as a payment gateway. When anyone tried to make a payment, Realex returned the error: Syntax error: JSON Parse error: Unrecognized token ‘<‘ and the payment and order failed.

    After some searching it was suggested that this could be a conflict from another plugin so I began to turn off plugins and the error went away when I deactivated Max Mega Menu. It came back when I re-activated it so I can only conclude the conflict lies between the two.

    We would like to continue using Max Mega Menu but clearly we can’t have the payment gateway compromised. Does this error sound familiar? Any ideas on how to resolve it? Currently Max Mega Menu is deactivated on the site.

    Please let me know if you need anything more from me to help resolve this issue.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi Kevin,

    No known issues around this area.

    Disabling MMM will have the affect of disabling any widgets that are in the menu too – do you have widgets in the menu, and if so does disabling/removing those plugins/widgets (with MMM enabled again) fix the issue?

    If not, in Chrome please open Developer Tools then go to the Network tab. Do whatever is needed to trigger the AJAX request and monitor the Network tab for that request. Then, for the request, click the Response tab and paste back what you see.

    EDIT: it may also be helpful if you enable WP_DEBUG

    Regards,
    Tom

    • This reply was modified 8 years, 10 months ago by megamenu.
    • This reply was modified 8 years, 10 months ago by megamenu.
    Thread Starter keviniseekie

    (@keviniseekie)

    Hi, Tom,

    We’re not using any widgets in the menus, only two mega menus (submenus).

    I did as you asked. The error seems to be triggered in checkout.min.js from what I can tell. This is what I get when I copy response:

    <html>
    <head>
    <title>3DSecure Payment Authorisation</title>
    </head>
    <body>
    <form name=”frmLaunchACS” id=”3ds_submit_form” method=”POST” action=”https://cap.attempts.securecode.com/acspage/cap?RID=16&VAA=B”&gt;
    <input type=”hidden” name=”PaReq” value=”eJxVUslSwzAMvfMVndyp7ezpKGagrDMUukAHuAVbbUKbpDhOp+Xrsbuw3PSk5yfpyXC2KZedNaqmqKvUYV3qdLAStSyqeeo8P12fxs4ZP4GnXCFeTlC0CjkMsGmyOXYKmTqzRMQupdSNQumHSZiFsUTJAj8KPH+GnsNheD7GTw6HLtw06bpAjtCoKZFnleaQic+LuwcesNh3DeMAoUR1d8ldRmmQhBELgewzUGUl8o86r95bsVjiFsguA6JuK6223IuMyhFAq5Y813rVI+TPm2ZVK910RV0SIJYC5HegYWujxkhuCsljfBE3OJzqab4eyKxk5HUgN9N71xcpEMsAmWnkLmURjZjXYUGPsZ5nhtjlISvtLDykXUrNensEK9vk/Fiylb8ZMJYrc5ItT6LYbHNEgJtVXaFhGPmfGMjvyP1b66jQxqmpP+i/XjVvE/Goy0VAk3B88TW66vdHi9T6vCNZxcIYxWIa7SQtAGJlyOGE5HB5E/37Ed/KgL8i”>
    <input type=”hidden” name=”TermUrl” value=”https://johnbuckleysports.com/?wc-api=WC_Gateway_Realex”&gt;
    <input type=”hidden” name=”MD” value=”eJwBKQHW/hjsbBl6vBg1Lt+HdhikuPBs+78YlcUEnAtKQHMnv+LigzlmD7nbW4qpX35nKydBWxxmgRDjgnci3cGqLQYU0agnBUeagTXgx+gz90LKj0Rb8p5vc4xUgCVtk4J5aznel9IZHFyiJeZVplpGMpqdLoqzJWsIQDsjLx8x8OhUUs9ZSM9XndlWfs4g8z+enfL7PhC+44fGSA+6Jv9DW/C7qhDmtEpTWsO+jSuKi7vcY46TX+OS+uJVe8E7LXlg+jV7HRafQTsZgNRJzsOpU5RyoGEavBAiqqBYd6OGJCPyvWHbp8wJ7PG75A1nhjPoeIVpMdllBEAXlmFB6aJUZPHhHTGd+zsTugPAa/lgJfjdtXWm8BHZexpyjVmSh2BBT0wiblFFtYE9lwTMqhHpjtw=”>
    <noscript>
    <div class=”woocommerce_message”>Processing your Payer Authentication Transaction – Please click Submit to continue the processing of your transaction. <input type=”submit” class=”button” id=”3ds_submit” value=”Submit” /></div>
    </noscript>
    </form>
    <script>
    document.frmLaunchACS.submit();
    </script>
    </body>
    </html>

    These are the response headers:

    HTTP/1.1 200 OK
    Date: Thu, 13 Jul 2017 14:00:16 GMT
    Server: Apache
    Pragma: no-cache
    X-Pingback: https://johnbuckleysports.com/xmlrpc.php
    Access-Control-Allow-Origin: https://johnbuckleysports.com
    Access-Control-Allow-Credentials: true
    X-Robots-Tag: noindex
    X-Content-Type-Options: nosniff
    Expires: Wed, 11 Jan 1984 05:00:00 GMT
    Cache-Control: no-cache, must-revalidate, max-age=0
    Set-Cookie: wfvt_2076392739=59677cf131d35; expires=Thu, 13-Jul-2017 14:30:17 GMT; Max-Age=1800; path=/; httponly
    Set-Cookie: woocommerce_items_in_cart=1; path=/
    Set-Cookie: woocommerce_cart_hash=acb0837b8201183bb893c3e9ae105661; path=/
    Set-Cookie: wp_woocommerce_session_20c8a3d9075c4a6e064a835766eddaef=59bf215fbeffee8a4a28bb36c526563a%7C%7C1500045560%7C%7C1500041960%7C%7C450a1934348c80527def6d413375570d; expires=Fri, 14-Jul-2017 15:19:20 GMT; Max-Age=91143; path=/
    Set-Cookie: woocommerce_items_in_cart=1; path=/
    Set-Cookie: woocommerce_cart_hash=acb0837b8201183bb893c3e9ae105661; path=/
    Set-Cookie: wp_woocommerce_session_20c8a3d9075c4a6e064a835766eddaef=59bf215fbeffee8a4a28bb36c526563a%7C%7C1500045560%7C%7C1500041960%7C%7C450a1934348c80527def6d413375570d; expires=Fri, 14-Jul-2017 15:19:20 GMT; Max-Age=91140; path=/
    Vary: Accept-Encoding,User-Agent
    Content-Encoding: gzip
    Content-Length: 1196
    Keep-Alive: timeout=5, max=100
    Connection: Keep-Alive
    Content-Type: text/html; charset=UTF-8

    I don’t see how this is conflicting with the Mega Menu plugin myself but all I know is that when I deactivate the plugin, the payments are processed as they should be with no errors.

    Plugin Author megamenu

    (@megamenu)

    Hi Kevin,

    That response looks correct – is that without MMM enabled?

    That is the 3d secure “extra” check that sometimes happens when making online payments. Does it make a different if you enable MMM and disable/enable the 3d secure option in the realex payment gateway plugin?

    Can you enable MMM and look at the responses again?

    Regards,
    Tom

    Thread Starter keviniseekie

    (@keviniseekie)

    Hi, Tom,

    No that is with MMM enabled.It is the last thing listed in the Network screen when I try to make a payment and it stalls with the Syntax error: JSON Parse error: Unrecognized token ‘<‘.

    The reason I think it has something to do with the checkout.min.js is that in the Console tab, this is listed with “Unable to fix malformed JSON”.

    But having just said that I just ran another test with MMM enabled and the order processed normally. This is the first time this has happened with MMM enabled. So now I’m really baffled.

    Regards,
    Kevin

    Plugin Author megamenu

    (@megamenu)

    Hi Kevin,

    I suspect the plugin or checkout.min.js isn’t expecting the Secure3D checkout screen to be returned, it expects the payment just to go through without that extra check.

    For me, those 3D checks only sometimes appear. Sometimes I can make card payments (on the same site) which go straight through, sometimes I have to go through the extra Secure 3D check.

    What I suspect has happened is that it’s just coincidence that you disabled MMM, and the next time you tried to make a payment it didn’t ask for the Secure3D check and therefore it went through OK. I also suspect If you try again and it asks for the 3D check, it’ll throw that error (regardless of whether or not MMM is enabled).

    Regards,
    Tom

    Thread Starter keviniseekie

    (@keviniseekie)

    Hi, Tom,

    What you are saying makes sense. Sorry to be suspecting your plugin but turning it off did seem to have an immediate effect but as you say it was clearly a coincidence.

    I appreciate your prompt response and your help.

    Regards,
    Kevin

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘JSON Conflict with Realex Payment Gateway Plugin’ is closed to new replies.