gerbang-bayar/atome 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

Latest Version on Packagist Total Downloads GitHub Actions

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): Response
  • createPayment(array $args): Response
  • getPayment(string $referenceId): Response
  • cancelPayment(string $referenceId): Response
  • refundPayment(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
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固