DePayFi / widgets

💸 Payments directly into your wallet. DePay simplifies and improves Web3 Payments with the power of DeFi. Accept any token with on-the-fly conversion and state-of-the-art widgets.
https://depay.com
MIT License
97 stars 36 forks source link

No 'Access-Control-Allow-Origin' header is present on the requested resource #118

Closed mengqing closed 4 months ago

mengqing commented 4 months ago

Trying to test the integration locally and is getting the CORS issue when trying to trigger the widget

Access to fetch at 'https://public.depay.com/configurations/xxxx' from origin 'http://localhost:9000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Any idea on how to solve this? Thanks

0xNe0x1 commented 4 months ago

can you share a screenshot of your configuration on app.depay.com?

Feel free to share via support@depay.com if you want to take this private.

mengqing commented 4 months ago

Hi @0xNe0x1, if you're referring to the integration configuration, I haven't made any changes to the configuration page, all I did was clicking "New Integration" and then "Payment Widget", and then used the integration ID to render the widget.

231716398398_ pic

0xNe0x1 commented 4 months ago

Then it's raising an exception because it can't render without knowing how much needs to be paid and what tokens are accepted. Obfuscated by a CORS error.

mengqing commented 4 months ago

After filling out the project name, the price, and the token, it started working. It would be ideal if it actually shows the relevant error, or perhaps show some warning on the configuration page, but great work!