Adyen / adyen-prestashop

Adyen Payment plugin for Prestashop
MIT License
14 stars 14 forks source link

Testing in the local environment #274

Closed dpuhach closed 3 months ago

dpuhach commented 3 months ago

Hello

Is it possible to fully use the latest version of this module in a local environment with Adyen test account?

Perhaps there are specific steps that can be described in Wiki?

I see that in StoreService and WebhookUrlService classes there is some functionality for using a test host, but perhaps it isn't completed, because "testHostname" isn't mentioned anywhere else.

In any case, I managed to temporarily replace my local host with a domain forwarded through Ngrok. As a result, I managed to register a webhook and add the first payment method for tests.

However, I encountered errors similar to the following ones: WARNING: securedFields:: the iframe has not configured correctly. {errors: Array(1), type: 'encryptedCardNumber'} If the above errors, or the message in the iframe itself, give no insight - then check your clientKey. Check that the clientKey is created against the right endpoint ("test" | "live") and that the list of "Allowed Origins" contains the domain of your website.

My local host is added to allowed origins, including Ngrok's custom domain, but that's not enough.

I would be grateful if you could share your workaround for the local development environment, because it's hard to imagine that it doesn't exist.

Thanks in advance

P.S. Docker containers are used for my local environment

dpuhach commented 3 months ago

It was successfully resolved using https://hub.docker.com/r/cloudflare/cloudflared