coinbase-commerce-php icon indicating copy to clipboard operation
coinbase-commerce-php copied to clipboard

`logo_url` fails to load

Open zlipa opened this issue 5 years ago • 6 comments

(X-CC-Version: 2018-03-22)

When using a custom logo_url the image fails to load throwing the following error:

Refused to load the image 'https://[edited].com/image.jpg' because it violates the following Content Security Policy directive: "img-src 'self' data: https://exceptions.coinbase.com/js https://res.cloudinary.com https://www.google-analytics.com/ https://images.coinbase.com".

The domain is whitelisted in the account settings, so not sure what's the problem. I guess the Content-Security-Policy has to be relaxed?

zlipa avatar Aug 19 '20 19:08 zlipa

This is important indeed. @zlipa did you get around this ?

babacarcissedia avatar Apr 21 '21 03:04 babacarcissedia

Nope :\

zlipa avatar Apr 21 '21 09:04 zlipa

Has this API seriously not been updated since 2018? 😟

Mike-E-angelo avatar Apr 28 '21 09:04 Mike-E-angelo

@Mike-E-angelo it feels like it. Maybe you can find a community implementation or perhaps build yours.

babacarcissedia avatar Apr 28 '21 10:04 babacarcissedia

@bcdbuddy to be sure I was referencing the server-side API where the version states it is from 2018. That is, when no X-CC-Version header is applied to requests, the following warning is emitted: Missing X-CC-Version header; serving latest API version (2018-03-22)

FWIW I am working with the unofficial C# version found here: https://github.com/bchavez/Coinbase.Commerce

FWIWx2: I have been spending the past day or so racking my brain around checkouts and charges, and trying to reconcile why charges made by checkouts are different, and cannot be made directly by the API. The only way to do so is to visit the checkout URL directly with a web client (and not via API).

Anyways, as noted in my other issue I think I have that figured out. So onto the next fire.

Speaking of which. 😁 As for this issue here. You might try to upload your image in the Branding image setting in your account. Then, you can visit a hosted checkout/charge from your account where you should see it. If you right-click the image and explore its properties, it should be a cloudinary.com address. Copy that URL and use that for your charge.logo_url property. Then go back to your account settings and re-upload your previous branding image to restore it. I am pretty sure the previous cloudinary.com one should still be there for you and you should be able to work around the content security policy in the short term.

Mike-E-angelo avatar Apr 28 '21 11:04 Mike-E-angelo

Legend

kcinnxy avatar Apr 13 '22 02:04 kcinnxy