Although this question has been posted many times, none of the posted solutions seem to work.
Specifically, it was mentioned that the only way to get the PayPal Transaction ID is by calling GetItemTransactions on a given item, and retrieving Transaction.ExternalTransation.ExternalTransactionID; DetailLevel must be set to RETURN_ALL.
I've tried this, and it keeps returning a null ExternalTransaction. Does anyone know if I'm missing something? Perhaps there's another way of obtaining the PayPal Transaction ID from the Ebay API?
Here's the code:
public static void main(String[] args) throws SdkException {
ItemTransactions itemTxns = new ItemTransactions();
GetItemTransactionsCall call = new GetItemTransactionsCall(apiContext);
GetItemTransactionsRequestType request = new GetItemTransactionsRequestType();
request.setDetailLevel(new DetailLevelCodeType[]{DetailLevelCodeType.RETURN_ALL});
request.setItemID("283891330636");
//call.setItemID("283891330636");
GetItemTransactionsResponseType response = (GetItemTransactionsResponseType) call.execute(request);
//throws IndexOutOfBoundsException, and is null when examining in debug window
log.debug(response.getTransactionArray().getTransaction()[0].getExternalTransaction()[0]);
}
Any help is appreciated, as I'm pretty desperate!