mercadopago / checkout-payment-sample

Using Checkout PRO to process payments
148 stars 134 forks source link

[Report Only] Refused to frame #4

Open odisi opened 3 years ago

odisi commented 3 years ago

[Report Only] Refused to frame 'https://www.mercadopago.com.br/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self' *.mercadolibre.com".

?preference-id=773477537-cbe49959-cc33-4927-827f-b63e1f8687bd&from-widget=true:4 GET https://content.mercadopago.com/fp/check.js?org_id=jk96mpy0&session_id=b72090e1-57aa-43db-8976-406fa9d89b71 net::ERR_CERT_DATE_INVALID

It is not possible to complete the test because there are errors.

alztec commented 3 years ago

here too, same error

alztec commented 3 years ago

Here I change domain to .com.br in url to web-payment-checkout.js and work

image

mauriciosoares commented 3 years ago

Another issue I was able to fix was the message "You can't pay for yourself" (the message in pt-BR for me was Você não pode pagar para si mesmo.). That was happening because I was logged in with my mercadopago account on the same browser I was testing the app, and apparently we can't make a purchase if we're logged in with the same account we created the setup for the payment.

To fix that I just opened the app on a incognito window, and it worked just fine.

agds23 commented 2 years ago

Hello everybody. It's 2022 and I got the same problem.

I didn't see a solution answer.

Does anyone know what happened to this problem?

thiagolara commented 2 years ago

@agds23 Did you find a solution?

juanpablolarice commented 2 years ago

here too, same error

agds23 commented 2 years ago

@thiagolara I'm Brazilian too but I'll leave it in English. I opened a support ticket at MercadoPago.

Hours later it was working normally. There were other errors but I believe they were only of interest to the developers.

Two days later I received the support reply citing the below solution link.

But I didn't see the need to use the solution because I'm not having conflicts here anymore. But, if something changes, I will test the implementation of "frame-src""

https://github.com/mercadopago/sdk-js/discussions/75

Santukon commented 2 years ago

Found the problem. Thing is you are probably not getting the preference id due missing or wrong params. Put all your code into a try catch function, and log any error to see what is wrong.