iamab.in
iamab.in

Reputation: 2070

Payfast sandbox notify_url to localhost

The question might be simple for you but i am new to the laravel payment integration and i am stuck at this. I do have a problem with laravel - payfast payment integration.

The question is, How to set the notify_url to my localhost address for payfast payment integration in laravel 5.3 testing.

Or any idea about how to test the ITN call back in test environment. thanks in advance.

Upvotes: 2

Views: 1826

Answers (3)

Jnr
Jnr

Reputation: 1664

Use ngrok to open a tunnel that creates access to your localhost endpoint from outside your network.

To setup:

  1. Download and run the command line tool
  2. In the tool run : ngrok config add-authtoken [your_secret_token]
  3. Once that is done, head to the Tunnels > Agents tab and see your tunnel
  4. Copy the tunnel url e.g https://394a-116-154-29-75.ngrok-free.app/api/myendpoint and use it as the URL for 3rd party apps to access your localhost

Easy peasy

Upvotes: 0

Chastity
Chastity

Reputation: 1

for people who still need an answer to this question, using ngrok helped make my localhost publicly accessible, try it

Upvotes: 0

Andrew
Andrew

Reputation: 1150

Just hit the same issue and realised that there is no way that the localhost URL will work. There is no way for Payfast to reach that address.

2 Options - you could use a proxy server to map your external IP address to a domain.

OR

Dev offline as far as possible and then deploy to a online test environment to test.

Upvotes: 2

Related Questions