Question

In my work we use VirtualBox for development so sometimes it gets a little bit tricky when it comes to testing.

Actually I'm working on a payment platform and I have to integrate with PayPal Instant Payment Notifications.

The idea is that when a Paypal transaction is approved, PayPal sends an IPN message to my server and that is the problem.

Is there a way I can make my local development server available so PayPal can access it?

Thanks in advance.

Was it helpful?

Solution

I assume your server is running inside the VirtualBox, right?

So you will have to give the VirtualBox machine an IP that your company router can relay the PayPal IPN message to. That IP should also be a static IP (not by DHCP) so the routing on the router could be set accordingly.

(The following works well, I have done it successfully numerous times)

To do that:

  1. Setup the VirtualBox to have the IP from the company router: In VirtualBox adapter go to the 'settings' of that said VirtualBox, click on 'Network' and change 'Attached to' to 'Bridge Adapter'.

  2. Launch the VirtualBox and change the IP of the machine to a static IP allowed by the company router.

  3. Create on the company's router a routing ('Virtual Server') from a specific socket to this static IP. For example, for socket 1234: http://YourDomain.com:1234

  4. Then you give the PayPal server this domain with socket. any communication on this socket would be routed directly to your server inside the VirtualBox.

Hope that helps!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top