Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORS Error in Helper Class #1

Open
attiqdev opened this issue May 27, 2022 · 1 comment
Open

CORS Error in Helper Class #1

attiqdev opened this issue May 27, 2022 · 1 comment

Comments

@attiqdev
Copy link

Hi Guys, thanks for this code sample I am using your sample @MrYossu but I am facing one issue can you please help me with this. When I am calling the CreateOrderResponse orderResponse = await _client.OrdersApi.CreateOrderAsync(orderRequest); in SquareHelper.cs line 139, I am getting this error

"Access to fetch at 'https://connect.squareupsandbox.com/v2/orders' from origin 'https://localhost:44309/' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status."

can you please tell me what else should I do to reslove this?

@attiqdev
Copy link
Author

Actually, I am using this code in the blazer application the same as you are using but when I reach this line where I create and get the order in the helper class it's giving me the exception for CORS. So I am wondering how its working for you with doing anything for CORS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant