error in hosted tokenization " https://esqa.moneris.com SENT - 942-undefined-invalid credentials"

Hi,

when i hit on submit iframe button immediately i get an error message " https://esqa.moneris.com SENT - 942-undefined-invalid credentials" although i have entered valid profile id.

could you please look into this and thanks in advance.

  • What are you using for a profile ID? Can you send us what you are passing for the request?
  • In reply to RR_Moneris:

    I'm passing 'ht8RVMVJBJAZGX5' as a profile ID. and the URL given in source domain input is 'devaddons1.socialengineaddons.com/.../make-payment'.
  • In reply to cleanK:

    It might be an issue with the source domain. Try created a hosted tokenization profile without source domain to see if that's the issue.
  • In reply to RR_Moneris:

    I do not know how to create a profile id without given source domain (it is required). Can you please help?
  • In reply to RR_Moneris:

    I have the same issue, here is the error response:

    https://esqa.moneris.com SENT | Response Code: 944 | Temporary Token: undefined | Error Message: invalid credentials | Visa Debit: undefined

    Can you please help, thanks in advance.
  • In reply to pink:

    Can you show me the exact request that you sent in including the profile ID? And what is the test store ID? Also what did you put in for a card number (assuming you entered a test card).
  • In reply to RR_Moneris:

    Hi RR_Moneris,

    - Thank you for your quick respond
    - Here is the code on git hub
    - Profile id included in the code
    - Store ID esqa.moneris.com/.../index.php QA Merchant 2 - store2
    - Test card number:
    MasterCard 5454545442424242
    Visa 4242424254545454
    Amex 373269005095005
    Diners 36462462742008
    - Here is the link yo can try - Public ...

    Thank you so much for any help. I replied to you immediately but did not realize till now that was a noreply email address.

  • In reply to pink:

    I just tried it and it gave me a response code of 001 along with the temp token. Are you still having an issue with it? Generally invalid credentials means you were using an invalid profile ID.
  • In reply to RR_Moneris:

    Hi RR_Moneris, Can you please share with me what works? I tried 4242424254545454 at www.sample.com/.../index2.html the error is still the same: https://esqa.moneris.com SENT | Response Code: 945,944 | Temporary Token: undefined | Error Message: invalid data | Visa Debit: undefined
    Thanks for your reply. Wanted to go ahead writing the application but no point if Moneris still does not work. 

  • In reply to RR_Moneris:

    I figured it out The buggy example given by Moneris (developer.moneris.com/.../Hosted Tokenization) There is bug in your sample code and doc please update it for other people.

    here is working code:

    <html>
    <head>
    <title> Outer Frame - Merchant Page</title>

    <script>

    function doMonerisSubmit()
    {
    var monFrameRef = document.getElementById('monerisFrame').contentWindow;
    monFrameRef.postMessage('','esqa.moneris.com/.../index.php');
    return false;
    }

    var respMsg = function(e)
    {
    var respData = eval("(" + e.data + ")");
    document.getElementById("monerisResponse").innerHTML = e.origin + " SENT " + " - " +
    respData.responseCode + "-" + respData.dataKey + "-" + respData.errorMessage;
    document.getElementById("monerisFrame").style.display = 'none';
    }

    window.onload = function()
    {
    if (window.addEventListener)
    {
    window.addEventListener ("message", respMsg, false);
    }
    else
    {
    if (window.attachEvent)
    {
    window.attachEvent("onmessage", respMsg);
    }
    }
    }
    </script>
    </head>
    <body>
    <div>This is the outer page</div>
    <div id=monerisResponse></div>
    <p><iframe id="monerisFrame" src="esqa.moneris.com/.../index.php dotted purple;&amp;css_textbox=border:1px solid blue" frameborder="0" height="30px" width="200px"> </iframe> <input type="button" onClick="doMonerisSubmit()" value="submit iframe" />
    </body>
    </html>
  • In reply to pink:

    what did you change? The only thing I see different is ampersand is escaped. Is that what you are referring to?

    Are you still having an issue with card 4242424254545454?
  • In reply to RR_Moneris:

    I changed more than just escaping the ampersand, if you carefully compare my string with Moreris string you will see do not forget syntax. The card number above works fine.
  • In reply to pink:

    I tested the source as is on our dev portal and it works (other than the fact that the Profile ID is not valid). I'll bring up &s not being escaped since I know that this is recommended. But if there are other issues with it please be more specific.
  • In reply to RR_Moneris:

    I will test more later, and I will be more specific, then update this thread again. I made many changes, but at least I have showed you the code above is working 100%. I have no issue at this time.

  • In reply to pink:

    the original code so messy and has many un-escape character of & so I have to clean it up and narrow it down to this working line:

    <iframe id="monerisFrame" src="esqa.moneris.com/.../index.php frameborder="0" width="200px" height="30px"></iframe>

    <input type="button" onClick="doMonerisSubmit()" value="submit iframe" />

    I will not tell people to use or not to use optional attributes in iframe element (by adding "&amp;" string), however if one adds more attributes - making sure test each attribute carefully because that where it breaks due to syntax.