I am trying to alert the visitor of my webpage with a country code provided by a JSONP endpoint. However, I cannot seem to get this working! And all the answers on the web seem confusing!
The following is returned from the endpoint:
{
"pcCartCt": 0,
"pcCountryCode": "au",
"pcCountrySite": "WWW",
"pcExpDomCt": 0,
"pcFirstName": "",
"pcIsCdc": false,
"pcIsDiscount": false,
"pcIsGdEmployee": false,
"pcIsTrusted": false,
"pcLanguageCookie": "en-us",
"pcModalData": "",
"pcRepEmail": "",
"pcRepExt": "",
"pcRepName": "",
"pcSelectedCurrFullDesc": "United States Dollar $ (Transactional)",
"pcSelectedCurrType": "USD",
"pcSetLanguageLogo": true,
"pcShopperId": ""
}
For it to work, I first need to specify a prog_id of "myprogid" and a callback function.
In the callback, I need an alert message containing pcCountryCode.
How do I do this?