SDK for Atome payment gateway. Can use as standalone package or use with laraditz/bayar
laravel package.
composer require gerbang-bayar/atome
Below are all methods available under this package.
checkConfiguration(string $countryCode, ?string $callbackUrl = null): Response
createPayment(array $args): Response
getPayment(string $referenceId): Response
cancelPayment(string $referenceId): Response
refundPayment(string $referenceId): Response
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.
You can use this package with laraditz/bayar as a provider.
'atome' => [
'username' => env('ATOME_USERNAME'),
'password' => env('ATOME_PASSWORD'),
'sandbox' => env('ATOME_SANDBOX', false),
],
protected $listen = [
\Laraditz\Bayar\Events\AtomeCallbackReceived::class => [
// register your listener here
],
];
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email raditzfarhan@gmail.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.