0
votes

I am developing a web application. There I am using authorize.net for the payment process. I want to display the status of the error message (like Transaction Status: Declined (Card declined by issuer - Contact card issuer to determine reason.). I have implemented the following code

if ("Ok" != $parsedresponse->messages->resultCode) {
                            $errorMsg = '';
                            foreach ($parsedresponse->messages->message as $msg) {
                             $errorMsg .= htmlspecialchars($msg->text);
                            }
                            }

But I need the message like Transaction Status: Declined (Card declined by issuer - Contact card issuer to determine reason.)

Does any one know this?

1
Which API are you using?John Conde

1 Answers

1
votes

You would use this code:

$parsedresponse->messages->message->text