Download the PHP package basgate/laravel-sdk without Composer
On this page you can find all versions of the php package basgate/laravel-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download basgate/laravel-sdk
More information about basgate/laravel-sdk
Files in basgate/laravel-sdk
Package laravel-sdk
Short Description Laravel SDK for BAS Mini Apps Platform
License MIT
Informations about the package laravel-sdk
Laravel BAS SDK
This SDK simplifies integration with the BAS Mini Apps Platform in Laravel applications. It provides convenient services and facades to interact with BAS APIs for authentication, payment, and other functionalities.
Installation
-
Require the package via Composer:
-
Configure your BAS Credentials:
You must configure your BAS API credentials by adding environment variables to your application's
.env
file.
Configuration
-
Edit your
.env
file:Open your Laravel application's
.env
file and add the following environment variables, replacing the placeholder values with your actual BAS credentials. -
Environment Variable Descriptions:
BAS_BASE_URL
: The base URL for the BAS API platform. This should be set to your Staging or Production API endpoint (e.g.,https://api-tst.basgate.com
).BAS_CLIENT_ID
: Your Mini App's Client ID (App ID) provided by BAS when you register your Mini App.BAS_CLIENT_SECRET
: Your Mini App's Client Secret . Keep this secret and do not share it publicly. Provided by BAS.BAS_APP_ID=
: Your Mini App ID . Provided by BAS.BAS_MERCHANT_KEY
: Merchant Key used to generate checksum/signature for API requests. Provided by BAS.BAS_ENVIRONMENT
: The environment your application is running in. Set tostaging
for development and testing, orproduction
for live environments.
Important Security Notes:
- Never hardcode your BAS credentials directly into your code or configuration files. Always use environment variables to keep your credentials secure and separate from your codebase.
- Keep your
BAS_CLIENT_SECRET
,BAS_MERCHANT_KEY
secret and protected. Do not commit them to public Git repositories or share them insecurely.
Usage
BAS
: For authentication-related functionalities (Login Flow), payment-related functionalities (Payment Flow) , and general BAS service functionalities.
**Example
PHP (Controller/Service):
Demo for login and payment
- Here we present a simplified model for the process of obtaining the customer’s approval, requesting his data, and registering him as a new user in the system.:
- Create a new order from Bas and show payment methods
- You will find all this inside the BasSuperAppController.php file inside the library.
Steps to prepare the experimental environment on the simulator
Here you should put your system link followed by /bas
try payment