sdk-php icon indicating copy to clipboard operation
sdk-php copied to clipboard

CreateTransactionController returns null, conflicting examples

Open KasparRosin opened this issue 3 years ago • 3 comments

Hey,

I've been following the example documentation provided, but started running into issues across the project when response was null, which resulted in exception while attempting to read messages. https://github.com/AuthorizeNet/sample-code-php/blob/master/TransactionReporting/get-transaction-details.php#L40

Call to a member function getMessages() on null
echo "ERROR :  Invalid response\n";
$errorMessages = $response->getMessages()->getMessage();
echo "Response : " . $errorMessages[0]->getCode() . "  " .$errorMessages[0]->getText() . "\n";

KasparRosin avatar Apr 04 '22 09:04 KasparRosin

"name": "authorizenet/authorizenet",
"version": "2.0.2",

KasparRosin avatar Apr 04 '22 10:04 KasparRosin

After reading some source code, this seems to happen when sdk fails to get response from API, but I'm still no closer to figuring out why. Was the API down?

Can confirm from authorize.net dashboard that the customer was charged, so there shouldn't be any issues there.

KasparRosin avatar Apr 04 '22 10:04 KasparRosin

I also received the same issue for a 15 minute period April 15th, except in my case it was for the CreateCustomerProfileTransactionController, it did not happen either before or after.

thewunder avatar May 16 '22 22:05 thewunder