I have a response from PHP I am trying to read this on JS but didn't get the value. I want to get the value of responseCode. But it returns me undefined.
Response Code :
Array
(
[request] =>
[receiptId] => 11233-555
[responseCode] => 0
[message] => PSI-3217:Maximum number of attempts reached.
[transTime] => 4/2/2021 8:50:09 PM
[merchantEmail] => johndoe@gmail.com
[merchantId] => 19
)
JS Code :
$.ajax({
method: "POST",
url: "https://john.com/ca/pay.php",
data: objData,
success: function (data, status) {
console.log(data['responseCode']);
},
error: function (error) {
}
})