alal / alal-sdk
Official PHP SDK to interact with Alal's API
dev-main
2024-08-04 11:08 UTC
Requires
- php: ^8.1
- php-http/client-common: ^2.3
- php-http/discovery: ^1.12
- php-http/guzzle7-adapter: ^v1.0
- phpunit/php-file-iterator: ^3.0.5
- phpunit/phpunit: 9.6.12
- psr/http-client: ^1.0
- psr/http-factory: ^1.0
- symfony/options-resolver: ^5.2
Requires (Dev)
- laminas/laminas-diactoros: ^2.4
- mockery/mockery: 2.0.x-dev
- pestphp/pest: 1.x-dev
- php-http/curl-client: ^2.1
- php-http/mock-client: ^1.4
- symfony/var-dumper: ^5.1
This package is not auto-updated.
Last update: 2024-11-15 16:19:22 UTC
README
A PHP sdk to interact with Alal's API
Installation
With Composer
composer require alal/alal-sdk
REQUIREMENTS
- PHP 8.0+
Usage
Authentication
Generate an API KEY from the Alal dashboard
Setup
<?php include "vendor/autoload.php"; use Alal\Client\Options; use Alal\Client\AlalSdk; $env = 'production'; or // sandbox $apikey = 'sk.8fcdc.a23474b7d2612534df'; $options = new Options($env); $AlalSdk = new AlalSdk($apikey, $options);
Example
$showCard = $AlalSdk->cards()->showCard('792c6cf2-f5cf-46c8-bf8c-699a9028010e'); $createCard = $AlalSdk->cards()->createCard('visa', 'virtual', 'd282e4a6-1fb6-4827-a6ae-a780263287d7')
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/ALAL-Community/alal-node. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct. Simply create a new branch and raise a Pull Request, we would review and merge.
License
The library is available as open source under the terms of the MIT License