If you're seeing a CORS issue, i'm going to assume you are trying to run your e-commerce SDK against a tier 1 Retail server environment is that correct? If so they document covers some troubleshooting steps you can try: docs.microsoft.com/.../debug-tier-1
For testing you should mock the data as shown here : docs.microsoft.com/.../test-page-mock
As an example i created following mock page:
{
"exception": null,
"pageRoot": {
"id": "core-root_0",
"typeName": "core-root",
"modules": {
"body": [
{
"id": "default-page_0",
"typeName": "default-page",
"modules": {
"primary": [
{
"id": "ProductFeature__0",
"typeName": "product-feature",
"config": {
"imageAlignment": "left",
"buttonText": "Buy Now",
"productIds": "68719490621"
}
},
{
"id": "ProductFeature__1",
"typeName": "product-feature",
"config": {
"imageAlignment": "right",
"productIds": "68719498121",
"buttonText": "Buy Now"
}
}
]
}
}
]
}
},
"renderingContext": {
"gridSettings": {
"xs": {
"w": 767
},
"sm": {
"w": 991
},
"md": {
"w": 1199
},
"lg": {
"w": 1599
},
"xl": {
"w": 1600
}
},
"staticContext": {
"staticCdnUrl": "/_scnr/"
},
"user": {
"token": "MY_TOKEN",
"isAuthenticated": true,
"signInUrl": "dev.fabrikam.com/.../signin",
"signOutUrl": "dev.fabrikam.com/.../signout",
"signUpUrl": "dev.fabrikam.com/.../signup",
"editProfileUrl": "dev.fabrikam.com/.../editprofile",
"signinName": "NAME",
"firstName": "FIRST_NAME",
"lastName": "LAST_NAME",
"tenantId": "",
"customerAccountNumber": "ACCOUNT_NUMBER",
"name": "NAME",
"emailAddress": "MY_EMAIL_ADDRESS"
},
"locale": "en-us"
},
"statusCode": 200
}
You should go to your e-commerce site, sign in and copy/replace above the token, name fields, account number and email address. Now the API call to get customer info will use the data from the user context.
Hope that helps.
Sam