gerbang-bayar/atome
最新稳定版本:0.0.2
Composer 安装命令:
composer require gerbang-bayar/atome
包简介
Simple SDK package for Atome Payment API. Use as standalone or with Laravel
关键字:
README 文档
README
SDK for Atome payment gateway. Can use as standalone package or use with laraditz/bayar laravel package.
Installation
composer require gerbang-bayar/atome
Available Request Methods
Below are all methods available under this package.
checkConfiguration(string $countryCode, ?string $callbackUrl = null): ResponsecreatePayment(array $args): ResponsegetPayment(string $referenceId): ResponsecancelPayment(string $referenceId): ResponserefundPayment(string $referenceId): Response
Usage
Create Payment
To create payment and get the payment URL to be redirected to.
use GerbangBayar\Atome\Atome; // Instantiate connector $atome = new Atome(username: $username, password: $password, sandbox: false); $response = $atome->createPayment( referenceId: 'someuniquereferenceid', currency: 'MYR', amount: 1000, // in cents callbackUrl: 'https://callbackurl.here', paymentResultUrl: 'https:/returnurl.here', customerInfo: [ 'name' => 'Raditz Farhan', 'phone' => '6012345678', 'email' => 'raditzfarhan@gmail.com' ], shippingAddress: [ 'countryCode' => 'MY', 'lines' => [ 'No 1, Taman ABC', 'Jalan DCEF' ], 'postCode' => '12345' ], items: [ [ 'itemId' => 'ITEMSKU', 'name' => 'Item 1', 'quantity' => 1, 'price' => 1000, ] ] );
See the documentation for more details.
Use with Laravel
You can use this package with laraditz/bayar as a provider.
Add configuration to config/services.php
'atome' => [
'username' => env('ATOME_USERNAME'),
'password' => env('ATOME_PASSWORD'),
'sandbox' => env('ATOME_SANDBOX', false),
],
Add provider event listener
protected $listen = [
\Laraditz\Bayar\Events\AtomeCallbackReceived::class => [
// register your listener here
],
];
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email raditzfarhan@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 22
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-08-30