cancel
Showing results for 
Search instead for 
Did you mean: 

NULL pointer exception ( importRefId )

Hello,

 

Code snippet 

 

		Merchant merchant = createMerchant("**LOGINID**", "**transactionKey**");
		net.authorize.cim.Transaction txn = merchant.createCIMTransaction(TransactionType.CREATE_CUSTOMER_PROFILE_TRANSACTION);
		txn.setRefId("**REFID**");
		txn.setCustomerPaymentProfileId(*******);
		txn.setCustomerProfileId(********);

		PaymentTransaction paymentTransaction = PaymentTransaction.createPaymentTransaction();
		//creating order -txn amount details
		net.authorize.data.Order order = net.authorize.data.Order.createOrder();
		order.setInvoiceNumber(******);
		order.setTotalAmount(****);
		order.setDescription(******);
		paymentTransaction.setOrder(order);
		paymentTransaction.setTransactionType(net.authorize.TransactionType.AUTH_CAPTURE);
		txn.setPaymentTransaction(paymentTransaction);

		Result<net.authorize.cim.Transaction> result = (Result<net.authorize.cim.Transaction>) merchant.postTransaction(txn)

Error 

 

java.lang.NullPointerException
	at net.authorize.cim.Result.importRefId(Result.java:109)
	at net.authorize.cim.Result.createResult(Result.java:47)
	at net.authorize.Merchant.postTransaction(Merchant.java:296)

 

 

 

 

 

 

naveenkumar
Contributor
1 REPLY 1
RaynorC1emen7
Expert