No announcement yet.

Grabbing error results

  • Filter
  • Time
  • Show
Clear All
new posts

  • Grabbing error results

    Hi C&P
    In the Library examples VF page code, There are conditional render checks that use the variable
    TransactionResultCode. I don't see this in the API documentation.

    What is the best variable/values to test:
    1. If a response has been received
    2. If it was successful / if there were errors

    And cnpxmlstring.message is the best result to show to the donor if their transaction has failed?


  • #2
    Hi Franklin:

    To get the response please use the following:

    Error code: cnpxmlstring.TransactionResultCode
    Error message: cnpxmlstring.ErrorData
    Additional Information: cnpxmlstring.additionalInfo

    For declined card:

    Error Code = 5001
    Error Message: Declined

    If Successful the Error Code = 0

    The error messages are listed at:

    Hope that helps.

    Please let us know if you need any additional info.
    Click & Pledge Support Department

    Join us @ the educational webinars:
    Live Support- read more:


    • #3
      HI C&P
      I need further clarification. Going by the library examples, it is not clear to me how to access the transaction parameters outlined in the documentation.

      In the library examples, we are working with cnpxmlstring. After the transaction, you display info from that string the following parameters:
      cnpxmlstring.TransactionResultCode - Kinda of like response.message but I am not seeing the same exact string as in the documentation. Documented for code 2105 is "Invalid Credit Card Information". I see "Invalid Credit Card Information". Is this the same parameter?

      cnpxmlstring.ErrorData- this appears to be Response Code?

      cnpxmlstring.TransactionNumber- is this OrderNumber?

      cnpxmlstring.VaultGUID- this appears to be VaultGUID - as expected

      cnpxmlstring.AdditionalInfo- Never see a result here..

      cnpxmlstring.xmlfile - this is the xml file sent to the api

      So where do I find a list of everything in cnpxmlstring that I can access? and how do I relate it to the parameters that are documented?



      • #4
        Good day!

        Here are a couple of examples:

        Error Code 2105
        Transaction Result Invalid Credit Card Information

        Error Code 2052
        Transaction Result Xml Error

        The 'urn:APISchema.xsd:BillingFirstName' element is invalid - The value 'first namefirst namefirst namefirst namefirst namefirst name' is invalid according to its datatype 'NormalizedString' - The actual length is greater than the MaxLength value

        The error codes are all per API error codes as sent earlier:

        & a few more notes:

        If we declare the response as follows, e.g. testingprocess

        CnP_IaaS.PaaS_Class testingprocess = new CnP_IaaS.PaaS_Class();


        by default all fields are empty prior to processing the transaction


        Once the call has been made the following will include the results


        I hope this answers the question. I also included some error messages at the top. For the most part you are interested in the Authorize & Decline.

        Earlier I also sent you (via email) info about a test account that returns only decline codes regardless of the credit card sent. That will help you identify and test declined transactions.
        Click & Pledge Support Department

        Join us @ the educational webinars:
        Live Support- read more: