Happy Business Starts Here

How do I resolve error "'https://www.zuora.com/apps/HostedPageLite.do'; is not allowed to call in manner of CORS."

Highlighted
Community Manager

How do I resolve error "'https://www.zuora.com/apps/HostedPageLite.do'; is not allowed to call in manner of CORS."

See Reply



Subscribe to Zuora System Updates at Zuora Trust
Follow Zuora Global Support on Twitter and LinkedIn

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Manager

Re: How do I resolve error "'https://www.zuora.com/apps/HostedPageLite.do'; is not allowed to call in manner of CORS."

Question or Problem Statement:

We've enabled CORS in our production server by adding Access-Control-Allow-Origin entry over there, but we still encounter below error. 

Our code is based on https://knowledgecenter.zuora.com/CA_Commerce/G_Hosted_Commerce_Pages/B_Payment_Pages_2.0/F_Generate....

Here is the REST call Request: 


Header: 

Accept: application/json 
Content-Type: application/json 
apiAccessKeyId: xxx 
apiSecretAccessKey: xxx 
Access-Control-Allow-Origin: * 

Request: 

"uri":"https://www.zuora.com/apps/HostedPageLite.do", 
"method":"POST", 
"pageId":"2c92a0fb4c789983014c7b0bb73174a3" 
}

Call Response: 


"success" : false, 
"processId" : "F85FF90FC6827D10", 
"reasons" : [ { 
"code" : 59010020, 
"message" : "'https://www.zuora.com/apps/HostedPageLite.do'; is not allowed to call in manner of CORS." 
} ] 
}

Solution:

The error was due to the wrong URI being specified. The URI should be https://www.zuora.com/apps/PublicHostedPageLite.do, and not https://www.zuora.com/apps/HostedPageLite.do

Supporting References:

https://knowledgecenter.zuora.com/CA_Commerce/G_Hosted_Commerce_Pages/B_Payment_Pages_2.0/F_Generate....

 



Subscribe to Zuora System Updates at Zuora Trust
Follow Zuora Global Support on Twitter and LinkedIn

View solution in original post

1 REPLY 1
Highlighted
Community Manager

Re: How do I resolve error "'https://www.zuora.com/apps/HostedPageLite.do'; is not allowed to call in manner of CORS."

Question or Problem Statement:

We've enabled CORS in our production server by adding Access-Control-Allow-Origin entry over there, but we still encounter below error. 

Our code is based on https://knowledgecenter.zuora.com/CA_Commerce/G_Hosted_Commerce_Pages/B_Payment_Pages_2.0/F_Generate....

Here is the REST call Request: 


Header: 

Accept: application/json 
Content-Type: application/json 
apiAccessKeyId: xxx 
apiSecretAccessKey: xxx 
Access-Control-Allow-Origin: * 

Request: 

"uri":"https://www.zuora.com/apps/HostedPageLite.do", 
"method":"POST", 
"pageId":"2c92a0fb4c789983014c7b0bb73174a3" 
}

Call Response: 


"success" : false, 
"processId" : "F85FF90FC6827D10", 
"reasons" : [ { 
"code" : 59010020, 
"message" : "'https://www.zuora.com/apps/HostedPageLite.do'; is not allowed to call in manner of CORS." 
} ] 
}

Solution:

The error was due to the wrong URI being specified. The URI should be https://www.zuora.com/apps/PublicHostedPageLite.do, and not https://www.zuora.com/apps/HostedPageLite.do

Supporting References:

https://knowledgecenter.zuora.com/CA_Commerce/G_Hosted_Commerce_Pages/B_Payment_Pages_2.0/F_Generate....

 



Subscribe to Zuora System Updates at Zuora Trust
Follow Zuora Global Support on Twitter and LinkedIn

View solution in original post