This repository contains a sample implementation of how to the verify the signatures included in the URL generated by custom menu buttons in Lightspeed R-Series. Verifying the signature ensures that the request was sent by a user of Lightspeed and not by a malicious third party.
To test this demo application on your own local machine you can follow these steps:
-
Clone this repository
-
Install composer dependencies (Composer installation instructions). These include some libraries that handle the
$ composer install
-
Run the local test server
$ php -S localhost:8000
-
In a web browser, log into your Lightspeed R-Series account and navigate to the Menu Buttons section of the Settings menu
-
Create a button of type "Open Web Page" and set the URL to
http://localhost:8000/
-
Navigate to the register and click the newly created button. If setup correctly, you should see a success message.