We're writing a class that will submit a transaction using the Salesforce integration but any code we use, beyond the samples, always throws a null pointer exception on Class.CnP_IaaS.PaaS_Class.getOperation_node. We have even gone to extent of basically copying one of the sample classes and just made sure that we call it statically and it still throws the exception
The org ID is 00D1g0000008hZT. If this is the wrong way to go about it then do you have any examples of submitting a transaction through a static method?
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);
Comment