Download the PHP package basgate/laravel-payment-sdk without Composer

On this page you can find all versions of the php package basgate/laravel-payment-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-payment-sdk

Laravel Payment Gateway SDK for BAS Platform

This SDK provides API-only payment integration with the BAS Super App platform for Laravel applications. It allows merchants to accept payments through BAS wallet and various payment methods supported by the BAS platform without requiring a Mini App implementation.

Features

Installation

  1. Require the package via Composer:

  2. The service provider will be automatically registered via Laravel's package auto-discovery.

Requirements

This package uses modern PHP features including typed properties, union types, and return type declarations.

Configuration

  1. Add your BAS credentials to your .env file:

  2. Environment Variable Descriptions:

    • BAS_BASE_URL: The base URL for the BAS API platform
      • Staging: https://api-tst.basgate.com
      • Production: https://api.basgate.com
    • BAS_CLIENT_ID: Your Client ID provided by BAS
    • BAS_CLIENT_SECRET: Your Client Secret (keep this secure)
    • BAS_APP_ID: Your App ID provided by BAS
    • BAS_MERCHANT_KEY: Merchant Key for signature generation
    • BAS_IV: (Optional) 16-byte Initialization Vector - uses BAS default if not set
    • BAS_ENVIRONMENT: Set to staging or production

    Security Notes:

    • Never hardcode credentials in your code
    • Keep your merchant key secure and never commit it to version control
    • The IV uses a default constant provided by BAS - only override if instructed by BAS support
    • Keep BAS_CLIENT_SECRET and BAS_MERCHANT_KEY secure
    • Do not commit credentials to version control

Usage

Using the Facade

Check Transaction Status

Process Refund

Send Notification

API Methods

initiateTransaction($orderId, $amount, $currency)

Initiates a new payment transaction.

Parameters:

Returns: Array with transaction details including trxToken

checkTransactionStatus($orderId)

Checks the status of a payment transaction.

Parameters:

Returns: Array with transaction status

refund($trxToken, $reason = 'test')

Processes a refund for a completed transaction.

Parameters:

Returns: Array with refund status

Response Format

All API responses follow this structure:

Complete Example

Security

This SDK uses AES-256-CBC encryption with HMAC-SHA256 for signature generation and verification. All API requests are authenticated using bearer tokens that are automatically managed by the SDK.

Conflict Prevention

This SDK is designed to coexist with the BAS Mini App SDK (basgate/laravel-sdk). Both packages can be installed in the same Laravel application without conflicts:

Requirements

Updating

To update to the latest version:

Changelog

See CHANGELOG.md for release notes and version history.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details.

Security

If you discover any security vulnerabilities, please review our Security Policy.

License

This package is open-sourced software licensed under the MIT license.

Support


All versions of laravel-payment-sdk with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package basgate/laravel-payment-sdk contains the following files

Loading the files please wait ...