cancel
Showing results for 
Search instead for 
Did you mean: 

getTransactionDetailsResponse can't retrieve the InvoiceNumber

Hello,

 

I have been searching and testing for a while, I hope someon can help me out here!

 

I am using Accept Hosted, with Redirect method, PHP SDK library and PHP language.

I am using WebHook to check notification of authorize+capture. I managed to get the transID and then I use it to run getTransactionDetails.

 

I get correctly the response and can retrieve the status, so this is work fine:

$status = $response->getTransaction()->getTransactionStatus();

 

However, it seems that I can't retrieve the invoiceNumber or desc. I have set them at the  createTransactionRequest step and I can actually see the invoice number and description both on Authorize Payment Step (when redirected to Authorize to enter credit card details) and in my Authorize Sandbox dashboard.

 

Here is what I use :

$invoice = $response->getOrder()->getInvoiceNumber();
$desc = $response->getOrder()->getDescription();

 

I have checked the getter and they seem correct so I wonder what is going wrong...

 

Thank you in advance!

Maestreldev
Member
1 ACCEPTED SOLUTION

Accepted Solutions

@Maestreldev

The object is one more node down. I am sending you an IM.

View solution in original post

Renaissance
All Star
2 REPLIES 2

@Maestreldev

The object is one more node down. I am sending you an IM.
Renaissance
All Star

Thank you! The documentation was misleading since it seems that invoiceNumber is a node of Order, yes, but not that Order is a node of Transaction...

 

For anyone who is looking for the getter for invoiceNumber, I post here the solution given by Renaissance :

 

$result = $response->getTransaction()->getOrder()->getInvoiceNumber();

 

Thanks again. ;-)

Maestreldev
Member