BayRewards PHP SDK for Laravel Framework.
BayRewards revolutionizes e-commerce engagement with a comprehensive rewards platform. Seamlessly integrated with online stores, BayRewards offers point programs, referral incentives, and VIP perks to drive customer loyalty and sales. Elevate your e-commerce experience by incentivizing purchases, encouraging referrals, and rewarding VIP customers with exclusive benefits. With BayRewards, businesses can effortlessly cultivate customer relationships and foster brand advocacy, leading to increased retention and revenue.
You can install the package via composer:
composer require palpalani/bayrewards-laravel
You can publish the config file with:
php artisan vendor:publish --tag="bayrewards-laravel-config"
This is the contents of the published config file:
return [
'bayrewards_base_url' => env('BAYREWARDS_BASE_URL')
];
use Palpalani\BayRewards\BayRewards;
$bayRewards = BayRewards::client();
$store = $client->storeDetails()->get('<Store-Access-Token>');
use Palpalani\BayRewards\BayRewards;
$bayRewards = BayRewards::client();
$activity = $bayRewards->createActivity()->post('<Store-Access-Token>', [
"title" => "Title of the Activity name", //required
"icon" => "<Icon URL>" //required
]);
use Palpalani\BayRewards\BayRewards;
$bayRewards = BayRewards::client();
$activity = $bayRewards->updateActivity()->post('<Store-Access-Token>', [
"title" => "Title of the Activity name", //required
"icon" => "<Icon URL>", //required
"activity_id" => ******* //required
]);
use Palpalani\BayRewards\BayRewards;
$bayRewards = BayRewards::client();
$updatePoints = $bayRewards->updatePoints()->post('<Store-Access-Token>', [
"activity_id" => '<From activity payload>', //required
'customer_email' => '<Customer Email>', //required
]);
use Palpalani\BayRewards\BayRewards;
$bayRewards = BayRewards::client();
$store = $bayRewards->allCustomers()->get(
'<Store-Access-Token>, //required
0, //optional - page , default - 1
0,//optional - limit , default - 25
0,//optional - type , default - NaN
"" //optional - search'
);
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.