• Hi Mangopay team,

    We have developed a marketplace with Mangopay + Woocommerce + WC Vendors.
    We did our tests using Mangopay sandbox and our website was on a test domain urbanartspace.appycodes.com

    Now the account has been approved and we have live Mangopay account with the production clientID as “urbanartspacelimprod”

    It works on urbanartspace.appycodes.com – http://prntscr.com/lrnlfq

    Now we moved the website to the live domain http://www.urbanartspace.co.uk

    However, on live domain the API does not connect – http://prntscr.com/lrnm5u

    Tried resetting the plugin settings, disabling/enabling but no success.

    Any idea?

Viewing 15 replies - 1 through 15 (of 18 total)
  • Thread Starter iitbritesh

    (@iitbritesh)

    Just a follow up, Mangopay support said there’s no restriction on the number of domains a production clientID and key can be linked in.

    Plugin Author Yann at WP&Co

    (@ydubois)

    Please double-check the client-ID you provided in the MANGOPAY settings for the production environment. A wrong “Production Client ID” will result in 404 errors when connecting to the API.

    Please be extra-careful that no whitespace or other additional characters are present in the client-ID field.

    On your production server, please make sure that the PHP environment can do http requests to other servers. That might include making sure the PHP environment includes the php-curl library. You may need to check that out with your hosting provider, and compare the PHP environment / server configurations of both platforms to verify what is missing on the production server.

    Thread Starter iitbritesh

    (@iitbritesh)

    Hello there, thank you very much for the response. My hosting provider believes that the IP address to where the CURL requests are being sent is blocked by my hosting provider. Can you provide the IP address and the CURL endpoint URL so they can unblock it.

    This is their message

    Hello,

    Thank you for the patience.

    I was able to recreate the issue by using the provided steps. Please note that cURL is installed on the server:

    root@node1376 [~]# curl -V
    curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
    Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
    Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz

    Also the PHP extension is installed for all PHP versions on the server. You can also confirm the curl support on the following info file:

    > https://staging.urbanartspace.co.uk/info.php

    Based on the current error here:

    > http://i.prntscr.com/XAk2eUSQQ0KAkG2goPht_A.png

    I believe that the IP address to which this cURL request should be established is blocked on the server. Having this in mind, please contact this vendor and ask them for IP addresses used for their API connection. Also, if it is possible please provide the exact cURL request which is performing this extension, so we can test it manually on the server.

    We are waiting for your update.

    Kind Regards,

    Oliver W.
    Technical Support Team
    FastComet Inc.

    Plugin Author Yann at WP&Co

    (@ydubois)

    MANGOPAY provides two REST API environments – one for your live production usage, and one fully functional and free sandbox environment for testing and integration usage:

    Production: https://api.mangopay.com
    Sandbox: https://api.sandbox.mangopay.com

    Your hosting provider can perform tests based on the MANGOPAY API documentation here:
    https://docs.mangopay.com/guide/response-codes

    We cannot provide actual exact cURL request because this would contain private/sensitive information.

    But since everything works perfectly on your staging server, as soon as your production server can also establish a secured https connection to the addresses of the MANGOPAY REST API there is no reason why it should not work. Your provider should check that the server can resolve the actual IP addresses based on the domain names of the API.

    IP addresses are subject to change at anytime and are not a reliable way to authorize the API access. Your hosting provider must make sure that the server resolves the http domain names correctly and can connect to the API endpoints at all times through HTTPS GET and POST request. Those are the only requirements of the very standard REST API used by MANGOPAY.

    Thread Starter iitbritesh

    (@iitbritesh)

    Thank you for the response. I logged in to the server through SSH and made a CURL request to the production API using instructions as provided in the documentation.

    As you can see from this snapshot – http://prntscr.com/ltuwp9 – I was able to get an access token and a successful connection to the API.

    So the server is definitely being able to connect to the API.

    Thread Starter iitbritesh

    (@iitbritesh)

    Update: Tried https://api.mangopay.com as well as https://api.mangopay.com/v2.01 and both CURL requests worked.
    http://prntscr.com/ltv10a

    Plugin Author Yann at WP&Co

    (@ydubois)

    @iitbritesh only your hosting provider can help you with this problem.

    Please note that although curl is available as a command-line utility, this does not indicate that php-curl is installed as a PHP library. This should be checked by your hosting provider, as well as any web server and PHP configuration difference between your staging platform and your production site. You might compare the output of the phpinfo() function on both servers to find out what is different.

    Please do not post it on this forum because it would contain sensitive data.

    Thread Starter iitbritesh

    (@iitbritesh)

    Thank you for your patience and responses. I created a fresh VPS instance and setup the website again and it worked. So, you were right – the issue was with my server.

    Although the PHP-Curl was installed, but it was probably something else which we could not figure out.

    Thanks again – our website is working well with a wonderful escrow system – thanks to Mangopay and WP&Co.

    https://www.urbanartspace.co.uk/

    Thread Starter iitbritesh

    (@iitbritesh)

    Hi, after few days of working well – the API is again blocked from our server. It works again when tried from a new server. Could there be some firewall which is blocking requests from our server? I see you use Cloudflare – can Cloudflare be blocking us?

    This is the message from my host –

    We have investigated the matter carefully. Unfortunately, we were not able to locate any output that may give us a lead for further investigation. The only error message that we face is the one that you have provided in this ticket. With this in mind, it is possible that the API in question is blocked by the server firewall. Having this said could you please contact the API provider and ask them to provide you with the IP addresses associated with the server on which the mentioned API resider in order for us to whitelist the IP address and test once again.

    Plugin Author Yann at WP&Co

    (@ydubois)

    Hi, as already explained 4 weeks ago, IP addresses are subject to change at any time an are not a reliable way to configure firewall rules on the long term.

    The IP address for the production environment API is always the current IP address of this hostname: api.mangopay.com

    Your hosting provider/firewall/server should be able to deduce the IP address from this single piece of information.

    Thread Starter iitbritesh

    (@iitbritesh)

    Hi, thanks for the response – I understand that the IP is possible to extract from the domain. However, the following hostname/subdomain: > api.mangopay.com is pointed to CloudFlare and the “real” IP address is masked by CloudFlare.

    It is also possible that Cloudflare blocks certain IP addresses due to Cloudflare security.

    Do you agree? Is it possible to check this with Cloudflare?

    Plugin Author mangopay

    (@mangopay)

    Hi,

    We will check this with our ops team and come back to you.

    All the best,

    Plugin Author mangopay

    (@mangopay)

    Hello,

    Did you have a chance to check this morning. After a check it seems that the four API call that failed for you yesterday where during an incident.
    Sorry for that, for next time please check:
    http://status.mangopay.com/

    All the best

    Thread Starter iitbritesh

    (@iitbritesh)

    Hi team, Nope our website shows that the connection to the API could not be established. I have double checked the API keys etc.

    Plugin Author mangopay

    (@mangopay)

    Hello,
    It can’t be the case. You are the only client with such an issue. I advice your to recheck your credentials. Does it work on sandbox?

Viewing 15 replies - 1 through 15 (of 18 total)

The topic ‘Mangopay plugin – MangoPay\ResponseException Code: 404’ is closed to new replies.