I am newbie in javascript and need some help :( I am simply using post api in my html page like this
varsettings = {
"url": "https://credimax.gateway.mastercard.com/api/nvp/version/54",
"method": "POST",
"timeout": 0,
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Cookie": "TS01f8f5b8=0163461fdde5ee3588241a8b83c8806a36a236cc1484715206aeee58f05ff4acc21bff27c0f22f45d8027bdfa3ef1b330efc711746"
},
"data": {
"apiOperation": "CREATE_CHECKOUT_SESSION",
"apiPassword": "asdasdasdsad",
"apiUsername": "merchant.sadasda",
"merchant": "asdasda",
"interaction.operation": "AUTHORIZE",
"order.id": "121312327",
"order.amount": "0.01",
"order.currency": "BHD"
}
};
$.ajax(varsettings).done(function(response) {
console.log(response);
});
Its showing responsei n console correctly like this
merchant=E10561950&result=SUCCESS&session.id=SESSION0002247374303I6654970F90&session.updateStatus=SUCCESS&session.version=18a5ad4401&successIndicator=5f04c5071d2f46fd
I want to just console the session.id from response how can i do this ?
i try with with console.log(response.session.id)
but its not showing