Announcement

Collapse
No announcement yet.

Grabbing error results

Collapse
X
 
  • 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?

    Thanks

  • #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: http://manual.clickandpledge.com/Response.html

    Hope that helps.

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

    On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

    Join us @ the educational webinars: https://clickandpledge.com/webinars/
    Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
    Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

    Comment


    • #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?

      Thanks!

      Comment


      • #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: http://manual.clickandpledge.com/Response.html

        & a few more notes:

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

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

        testingprocess.TransactionResultCode;
        testingprocess.ErrorData;
        testingprocess.additionalInfo;
        testingprocess.xmlfile;

        by default all fields are empty prior to processing the transaction

        xmlstring.Send_Transaction_api(xmlstring.xmlfile);

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

        xmlstring.TransactionResultCode;
        xmlstring.ErrorData;
        xmlstring.additionalInfo;
        xmlstring.xmlfile;

        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.
        Regards,
        Click & Pledge Support Department

        On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

        Join us @ the educational webinars: https://clickandpledge.com/webinars/
        Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
        Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

        Comment

        Working...
        X