Skip to content

Commit

Permalink
Merge pull request #24 from palpalani/develop
Browse files Browse the repository at this point in the history
Support Laravel 11
  • Loading branch information
palpalani authored Apr 23, 2024
2 parents 87c6c5a + 6eb05d6 commit 1a1802c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@

BayRewards PHP SDK for Laravel Framework.

[BayRewards](https://bayrewards.io) revolutionizes e-commerce engagement with a comprehensive rewards platform. Seamlessly integrated with online stores, [BayRewards](https://bayrewards.io) 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](https://bayrewards.io), businesses can effortlessly cultivate customer relationships and foster brand advocacy, leading to increased retention and revenue.

## Installation

You can install the package via composer:

```bash
composer require palpalani/bayrewards-laravel
```

You can publish the config file with:

```bash
Expand All @@ -24,21 +27,23 @@ This is the contents of the published config file:

```php
return [
'bayrewards_base_url' => env('BAYREWARDS_BASE_URL', 'https://data.bayrewards.io')
'bayrewards_base_url' => env('BAYREWARDS_BASE_URL')
];
```

## Usage

Get store details, after integrate with BayRewards.io
### Get store details, after integrate with BayRewards.io

```php
use Palpalani\BayRewards\BayRewards;

$bayRewards = BayRewards::client();
$store = $client->storeDetails()->get('<Store-Access-Token>');
```

Create a new BayReward Activity
### Create a new BayReward Activity

```php
use Palpalani\BayRewards\BayRewards;

Expand All @@ -49,7 +54,8 @@ $activity = $bayRewards->createActivity()->post('<Store-Access-Token>', [
]);
```

Update loyalty points
### Update loyalty points

```php
use Palpalani\BayRewards\BayRewards;

Expand All @@ -60,7 +66,8 @@ $updatePoints = $bayRewards->updatePoints()->post('<Store-Access-Token>', [
]);
```

Get all Customers List
### Get all Customers List

```php
use Palpalani\BayRewards\BayRewards;

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"php": "^8.2",
"spatie/laravel-package-tools": "^1.15.0",
"illuminate/contracts": "^10.0|^11.0",
"sammyjo20/saloon": "^2.8"
"saloonphp/saloon": "^3.0"
},
"require-dev": {
"laravel/pint": "^1.10.3",
Expand Down
6 changes: 4 additions & 2 deletions config/bayrewards-laravel.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

// config for Palpalani/BayRewards
return [
'bayrewards_base_url' => env('BAYREWARDS_BASE_URL', 'https://data.bayrewards.io'),
/**
* BayRewares rest API URL.
*/
'bayrewards_base_url' => env('BAYREWARDS_BASE_URL'),
];

0 comments on commit 1a1802c

Please sign in to comment.