Skip to content
Advertisement

Can I test paypal api’s from localhost

UPDATE 1:

According to this tutorial on Using PayPal’s Instant Payment Notification with PHP, PayPal cannot access locally hosted websites unless certain router ports are opened. Is this because the website is about IPN or is this true for all PayPal APIs?

ORIGINAL QUESTION:

On my laptop, I have a LAMP environment setup, when I use the http://localhost to create website before going live.

For a new project, I need to use the PayPal APIs. Will I be able to use the localhost to test the PayPal APIs if I connect my laptop to the internet? Or will I have to upload my website to a LAMP host elsewhere?

You’re probably thinking, what a stupid question, just try it to see if it works. I have tried it and it’s not working and I wanted to rule out this question before going onto the next step.

Advertisement

Answer

It should work. I have made a payment integration with paypal last year, and it worked on localhost without problems.

Are you using the paypal sandbox for development? https://developer.paypal.com/

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement