Webhooks on localhost

bromelio picture bromelio · Jan 10, 2015 · Viewed 7.5k times · Source

I am creating a payment gateway using Paymill (which is comparable to Stripe). I want my website to automatically react to subscription-based billings. This is why I am considering Paymill webhooks.

I am in the testing phase and thus on localhost (XAMPP). The receiving webhook script would therefore have this URL:

localhost/paymill-example-php-subscriptions-master/src/Paymill/LlamaKisses/Controllers/WebhooksController.php. 

But is it possible at all to set a localhost address as a webhook url (and how)?

(By the way, isn't WebhooksController.php missing a response code line like this:

http_response_code(200);

to let the sending webhook know it succeeded and needn't retry?)

Many thanks in advance!

Answer