Configure Paypal Sandbox ReturnURL with localhost - paypal

I'm trying to insert http://localhost:4000/api/myroute as returlURL
on https://developer.paypal.com.
Paypal displays this message :
We are sorry something went wrong while saving application please try again...
So, localhost seems be forbidden but the last week, it's was ok.
How can i enter localhost url ?
Please, do not answer me the 127.0.0.1 solution.

"localhost" to PayPal's server, is themselves, so if they tried to redirect to http://localhost/whatever, it would just go right back to their own server, and that URL most likely wouldn't exist, and you'd end up with a 404 at the PayPal server.
If you want to test on your local server you're going to need to setup DNS to point some sort of a domain to your public IP address there, and make sure your web server is configured to answer to that domain as well.
For example, your site might be www.domain.com. Lookup your public IP address there, and then create a DNS record for domain.com that points sandbox.domain.com to your public IP address there.
Then you can use http://sandbox.domain.com anytime you need to work with PayPal (or anything else) and it'll work the same as "localhost" is for you now, but 3rd party servers will be able to communicate with your application as expected. This will also allow you to have other people on different networks test/demo the site with you.

Related

Used cloud-flare on a site, but an error occurs (link wrong or retired)

I am trying to point the domain www.xxx.com to www.ttio.com/tc using cloudflare to enable to the https on the site.
On GoDaddy I have changed the nameservers to cloudflare's recommended name servers
I have also gone to "Page rules" on Cloudflare and added a forwarding rule so that the above is in place.
On going to www.xxx.com however, i get the following error:
It redirects to this url: https://shortener.secureserver.net/error_404
and the error is:
Destination
Unknown
Everything's working on our side, so the link you clicked is either wrong or has been retired.
I have done everything I think I should have, so could anyone shed any light on this please?
You can't point a domain (e.g. www.xxx.com) at an URL (e.g. www.ttio.com/tc). A domain needs to be converted to an IP address by the browser.
If the web server for www.ttio.com is set to recognise www.xxx.com and serve the content from the /tc folder under www.ttio.com, just set up a CNAME for www.xxx.com pointing www.ttio.com and it will work.
If the web server for www.ttio.com doesn't know about www.xxx.com at all, you'll need to use a translation proxy. One way of doing that is using a Cloudflare worker to map the www.xxx.com/PATH URL to www.ttio.com/tc/PATH. An example of how to do this is at https://developers.cloudflare.com/workers/tutorials/configure-your-cdn/. You may also need to rewrite the HTML so that links in the pages don't point to www.ttio.com/tc. An example of how to do that is at https://developers.cloudflare.com/workers/reference/apis/html-rewriter/.

Drupal IP/domain redirect

I recently redid a client's old Drupal site, in Apostrophe, and pointed their domain to the new server.
I am now trying to access the old site via IP address, but there seems to be a redirect configured to rewrite the base IP address to the domain name (72.xx.xxx.xxx to www.clientdomain.com).
Is there something configured in Drupal to rewrite the IP address? Can I change a field in the database or configuration files to prevent this?
I have ssh access to the server, and have poured over the Drupal code, settings.php, .htaccess, etc., but cannot locate this offending field. I am not familiar with Drupal, but suspect it could be an admin setting. Since the site redirects, I am unable to login to the admin backend.
Any and all insight is appreciated. Thanks for your help!
A few possibilities:
In the settings.php (sites/default/settings.php), see if there is a $base_url set. If you can see any, comment that line. You can run a drupal site without the base_url hardcoded in the settings.php
In the .htaccess look for redirects. Your safest bet is to replace it with a fresh file downloaded from http://drupal.org/project/drupal
The most likely case is that your web server is configured to redirect the IP address to the main domain.
You can also access your site at old server by explicitly setting the IP address in your hosts file. Check it for your operating system DNS resolver docs.

Facebook Object Debugger - Could not resolve the hostname into a valid IP address

There is a problem with how Facebook scrapes my page for meta data.
When I use the Facebook object debugger I get the following error:
I am quite sure this has something to do with how my DNS records are defined. It seems the scraper can't even reach my site. As the error states, it can't turn the host name to a valid IP.
When I press the link down the page "See exactly what out scra...", I get "Document returned no data".
I am trying to figure it for about a month now and getting VERY VERY frustrated.
Can someone shed some light on the subject ?
After digging for 3 days came to the conclusion that name servers were configured incorrectly.
I am using Bigrock for the domain and GoDaddy for hosting, by mistake, I configured actual hosting provider hostname in "Name Server 3" and "Name Server 4". But Facebook looks for the content in first server "bigrocks-1.com"(wrong server) server but does not find any hosting and throughs 'Could not resolve the hostname into a valid IP address'.
So do remember to put hosting provider address on the first name server
Hope it may help you :)
ok i had the exact same problem and solution was in the dns ... facebook is not able to fetch the data cause of wrong server name ... you need to get in touch with the hosting service provider where your website is hosted or from where you brought your domain name and ask for the right nanme s

Blacklisted on Facebook/Graph API?

When requesting the Facebook/Graph API with a Facebook App, I get the error (#5) Unauthorized source IP address. Searching the internet I found that adding the server's IP to the app's whitelist may work. But when I do that, I get the following error: Uncaught OAuthException: This IP can't make requests for that application.
The server has definitely only the IP address I added to the whitelist. Using another server with the same app works just fine. I suppose this is due to a bug in our application requesting the API too often with invalid keys (all from this very IP).
So, to me, this seems like something we need to contact Facebook for, so our IP gets unlisted. Somebody has a idea on how to do it?
First, access canhazip.com or jsonip.com from the server to make sure it has the public IP you think it does. Second, make sure that IP address is in "Server IP Whitelist" for the app's Settings > Advanced section in the Developer console (https://developers.facebook.com/apps/[APP ID]/settings/advanced/).

PayPal IPN doesn't reach EC2 tomcat

I'm trying to get IPN to my site, hosted on Amazon AWS EC2. The web server is Tomcat 7. Using PayPal sandbox.
The site has a Servlet or JSP to get the request.
When I set the IPN URL to my local machine (using IP address) it works, but setting it to the public site doesn't.
It doesn't matter if use site name or IP address, servlet or JSP.
In the access log I don't see any request for the IPN URL.
IPN Simulator with the IPN URL works.
in AWS ports 80 and 443 are opened for all IP range (0.0.0.0/0).
I think I checked everything, so I'm totally lost right now.
This was resolved after installing Linux updates and restarting the server. I don't know why, but SSL certificate did not work correctly before the updates and/or reboot