How to customize Paypal Error Code 10605

I have integrated the paypal with my website. In the website there are 2 options of Currency. One is US Dollar and another is Indian Rupees. Now till date INR is not supported by Paypal. that is why it is giving the Error Code 10605. Now my question is how could I trap this specific Error Code and customize this particular message and then show it in another page (not the page that Paypal is showing).
akulaviAsked:
Who is Participating?
 
princeatapiConnect With a Mentor Commented:
Just Decode the Acknowledgment received from PayPal using the following Code

string Ack =  decoder["ACK"];
            string ErrMsg="";
            if (Ack == "Failure")
            {
                ErrMsg = "ErrorCode=" + decoder["L_ERRORCODE0"] + "&" + "Desc=" + decoder["L_SHORTMESSAGE0"] + "&" + "Desc2=" + decoder["L_LONGMESSAGE0"];
            }
            else if (Ack == "Success")
            {
                ErrMsg = "Transaction ID: " + decoder["TRANSACTIONID"] + "\n" + "Amount:" + decoder["AMT"]+"\n"+"Transfer Success";
            }
            return ErrMsg;

Note : The Decoder what Ive Written Is Specific for DoDirectPayment You can Customize the Above Code as per your need and Display the Exact Error Message as PayPal Do Rater displaying Error Codes.

If the Acknowledgment results with Failure , redirect to some other page and display the error as you mentioned .
0
 
akulaviAuthor Commented:
Thanx for your help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.