Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)
โ04-20-2015 11:59 PM
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Run debug and see which one is nul
Java SDK for Authorize.Net API. Contribute to AuthorizeNet/sdk-java development by creating an account on GitHub.
Java SDK for Authorize.Net API. Contribute to AuthorizeNet/sdk-java development by creating an account on GitHub.
โ04-21-2015 04:59 AM - edited โ04-21-2015 05:00 AM