Plug for handling Airtel Money webhooks in Phoenix applications.
Usage
Add to your router:
pipeline :webhooks do
plug AirtelMoney.WebhookPlugend
scope "/webhooks" do
pipe_through :webhooks
post "/airtel", WebhookController, :handleend
The plug will:
- Verify the webhook signature
- Parse the JSON payload
- Assign the parsed data to
conn.assigns[:airtel_webhook] - Call the next plug if verification succeeds
- Return 401 if verification fails