realex-payments-apiglobal-payments-api

Card payment error 508 -Realex payments error number: 61,754


i am using realex payment with iframe i can load the payment page correctly, but as soon as i hit 'Pay Now' it return Error: 508 Message: An error has occurred processing your request. Please contact the merchant whose goods or services you are purchasing quoting the following error number: 61,754 (most of time it return correct response string either successful and declined) but sometimes it return above error code) any idea what is mean and how to solve this issue?

    <script type='text/javascript'>       
        
        function iRedirect(redirectUrl, arg, value) {
           
            console.log(redirectUrl);
            try {
                var form = $('<form action="' + redirectUrl + '" method="post">' +
                    '<input type="hidden" name="' + arg + '" value="' + value + '"></input>' + '</form>');
                $('body').append(form);
                console.log(form);
                $(form).submit();
            }
            catch (e) {
                alert(e.message);
            }
         }

         function displayMessage(evt)
         {
               
             var message;
              
             try {
                 var iOrigin = '<%=ConfigurationManager.AppSettings["RealexResponseDomain"] %>';
                 if (evt.origin == iOrigin) {

                     message = evt.data.toString();
                     console.log(message);
                     if (message.indexOf("Error") == 0) {
                         var ErrorJsonStr = message.toString().split(":");
                         var ErrorJsonStr1 = ErrorJsonStr[1].split("<BR>");
                         var reDirectPath = "{\"" + ErrorJsonStr[0] + "\"" + ":" + "\"" + ErrorJsonStr1[0] + "\"" + "," + "\"" + ErrorJsonStr1[1] + "\"" + ":" + "\"" + ErrorJsonStr[2] + "\"" + "}";
                        
                         iRedirect("Response.aspx", "JsonStr", encodeURIComponent(reDirectPath));
                     }
                     else {
                         if (isJson(message) == true) {

                             var message1 = JSON.parse(message);
                             //alert(message1);
                              console.log(message1);
                             if (message1.hasOwnProperty('pas_uuid')) {
                                 iRedirect("Response.aspx", "JsonStr", encodeURIComponent(message.toString()));
                             }
                             else {
                                 //check if this transaction is already exist
                                 //do redirect
                                 //alert("not pas_uuid" + message1);
                                 console.log("not pas_uuid" + message1);
                             }
                         }
                     }
                     //get message and check result
                 }
                 else {
                     console.log("not data");
                 }
             }
            
             catch (err) {
                  console.log(err.message);
                
             }
         }

         function isJson(str) {
             try {
                 JSON.parse(str);
             }
             catch (e)
             {
                 console.log(e.message);
                 return false;
             }
             return true;
         }
            
          if (window.addEventListener) {
             // For standards-compliant web browsers
             window.addEventListener("message", displayMessage, false);
         }
         else {
             window.attachEvent("onmessage", displayMessage);
         }

         
    </script>


Solution

  • There are two major scenarios where this message may be displayed on the HPP.

    1. There was a temporary issue with the HPP Sandbox environment.

    2. The Merchant ID and Account you are using has 3D Secure 1 enabled, but you used a non-3D Secure enabled test card.

    If you think it wasn't either of these issues, please provide our Support Team with an example Order ID of a transaction where this occurred and they will be able to look at the logs in more detail.