LaravelPackages.net
Acme Inc.
Toggle sidebar
onethirtyone/aws-sns-handler

Laravel package to handle incoming SNS messages

72
0
1.1
About onethirtyone/aws-sns-handler

onethirtyone/aws-sns-handler is a Laravel package for laravel package to handle incoming sns messages. It currently has 0 GitHub stars and 72 downloads on Packagist (latest version 1.1). Install it with composer require onethirtyone/aws-sns-handler. Discover more Laravel packages by onethirtyone or browse all Laravel packages to compare alternatives.

Last updated

Handle AWS SNS Messages in your Laravel Application

Build Status StyleCI

This is a Laravel package for validating and handling AWS SNS messages

Installation

You can install the package with composer

composer require onethirtyone/aws-sns-handler

CSRF

Since SNS messages are sent via a HTTP Post Request you will need to add your webhook route to your VerifyCsrfToken.php

/**
     * The URIs that should be excluded from CSRF verification.
     *
     * @var array
     */
    protected $except = [
        '/webhook'
    ];

Usage

Edit your routes/web.php and add a route to your the webhook handler

Route::any('callback', 'OneThirtyOne\Sns\Controllers\SnsController@handle');

Events

The package will fire an SnsSubscriptionConfirmation event when a new subscription is added and needs to be confirmed and will fire an SnsEvent event when a message is delivered after confirmation.

You should listen for these events in your application.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change

License

MIT

Star History Chart