gplcart-module webhook
Allows to inform external resources about various system events by sending HTTP POST payloads
gplcart/webhook
Allows to inform external resources about various system events by sending HTTP POST payloads
- Saturday, March 10, 2018
- by gplcart
- Repository
- 0 Watchers
- 0 Stars
- 1 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
, (*1)
Web Hook is a GPL Cart module that allows to inform external resources about various system events by sending HTTP POST payloads, (*2)
Features:, (*3)
- Configurable triggering hooks
- Configurable payload URL
- Data encryption
Requirements:, (*4)
Installation, (*5)
- Download and extract to
system/modules
manually or using composer composer require gplcart/webhook
. IMPORTANT: If you downloaded the module manually, be sure that the name of extracted module folder doesn't contain a branch/version suffix, e.g -master
. Rename if needed.
- Go to
admin/module/list
end enable the module
- Go to
admin/module/settings/webhook
and adjust settings
Receiving payloads, (*6)
Example settings:, (*7)
- Url: http://domain.com/webhook.php
- Sender: My cool site
- Key: My secret key
- Salt: My salt
In webhook.php
paste the following code, (*8)
if(isset($_POST['sender']) && $_POST['sender'] === 'My cool site'){
$json = $_POST['data'];
if($_POST['encrypted']){
$secret = hash("sha256", 'My secret key');
$hash = substr(hash("sha256", 'My salt'), 0, 16);
$json = openssl_decrypt($json, "AES-256-CBC", $secret, 0, $hash);
}
$payload = json_decode($json, true);
print_r($payload);
}
dev-master
9999999-dev
Allows to inform external resources about various system events by sending HTTP POST payloads
Sources
Download
GPL-3.0
GPL-3.0-or-later
The Requires
by
Iurii Makukh
ecommerce
shopping cart
gplcart
gplcart-module
gplcart-api
dev-dev
dev-dev
Allows to inform external resources about various system events by sending HTTP POST payloads
Sources
Download
GPL-3.0-or-later
The Requires
ecommerce
shopping cart
gplcart
gplcart-module
gplcart-api