Announcement

Collapse
No announcement yet.

Null pointer exception thrown on getOperation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Null pointer exception thrown on getOperation

    Hi All,

    We're trying to set up an integration with the C&P Salesforce API to submit a transaction and no matter how we try it we keep getting a null pointer exception on FATAL_ERROR Class.CnP_IaaS.PaaS_Class.getOperation_node: line 81, column 1. We have even tried making a static version of one of the sample classes and even though the debugger shows the same data, our class still gets the exception while the sample class submits the transaction successfully. Below is the code that we are using for one of the test scenarios:

    Code:
    Example_Min_Fields trans = new Example_Min_Fields();
    
    trans.cnpxmlstring.ItemsList = new List<CnP_IaaS.Paas_Class.Items>();
    CnP_IaaS.Paas_Class.Items i = new CnP_IaaS.Paas_Class.Items();
    i.ItemName = 'Donation';
    i.UnitPrice = 22;
    trans.cnpxmlstring.ItemsList.add(i);
    trans.BillingInfo.BillingFirstName = 'Test';
    trans.BillingInfo.BillingLastName = 'Donor';
    trans.BillingAddress.BillingStateProvince = 'California';
    
    trans.PaymentMethod.NameOnCard = 'Test Donor';
    trans.PaymentMethod.CardNumber = '4111111111111111';
    trans.PaymentMethod.Cvv2 = '123';
    trans.PaymentMethod.ExpirationMonth = '12';
    trans.PaymentMethod.ExpirationYear = '18';
    
    trans.Process();
    System.debug(trans.cnpxmlstring.TransactionResultCode);
    System.debug(trans.cnpxmlstring.ErrorData);
    System.debug(trans.cnpxmlstring.TransactionNumber);
    Our dev sandbox org is 00D1g0000008hZT and we are blocked by this issue. Could we get some help with creating a static method for this or what we would need to change? Thanks

  • #2
    Duplicate post of the following: https://forums.clickandpledge.com/fo...n-getoperation
    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