atlantic/atlantic-gateway 问题修复 & 功能扩展

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

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

atlantic/atlantic-gateway

Composer 安装命令:

composer require atlantic/atlantic-gateway

包简介

Web based gateway

README 文档

README

Atlantic Gateway is a PHP library that provides an interface to integrate payment transactions with the Atlantic Payment Gateway.

Features

  • Easy integration with Atlantic Payment Gateway.
  • Supports test and live modes.
  • Handles payment transactions securely.
  • Allows flexible configuration for payer information.

Installation

You can install this package using Composer:

composer require atlantic/atlantic-gateway

#Configuration

Set up the gateway configuration:

$config = [  
    'mode' => 'test', // or 'live'  
    'transaction_id' => 'gateway-transaction-id',  
    'transaction_password' => 'gateway-transaction-password',  
    'currency' => '840', // USD  
    'pageset' => 'pageset',  
    'pagename' => 'pageset',  
];  

$atlantic = new Atlantic($config);

#Usage

Making a Transaction

You can initiate a transaction by providing the payment amount, payer information, and a callback URL:

$data = [  
    'payment_amount' => 100,  
    'payer_information' => json_encode([  
        'name' => 'Ra Rashed',  
        'email' => 'rnrashedrn@gmail.com',  
        'phone' => '+8801827801715',  
        // Optional  
        // "Line1" => "1200 Whitewall Blvd.",  
        // "Line2" => "Unit 15",  
        // "City" => "Boston",  
        // "State" => "NY",  
        // "PostalCode" => "200341",  
        // "CountryCode" => "840",  
    ]),  
    'callback' => 'return_url',  
];  

try {  
    $response = $atlantic->makeTransaction($data);  
    if (isset($response['RedirectData'])) {  
        echo $response['RedirectData'];  
    }  
} catch (Exception $e) {  
    return $e->getMessage();  
}  

#Checking a Transaction

You can check the status of a transaction using its SpiToken: you can get SpiToken in your callback

$transactionCheck = $atlantic->checkTransaction($SpiToken);  

print_r($transactionCheck); 

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-11