[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1654
  • Last Modified:

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).
1 Solution
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 .
akulaviAuthor Commented:
Thanx for your help

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now