fena/toolkit-php-payment-sdk
最新稳定版本:v1.0.0
Composer 安装命令:
composer require fena/toolkit-php-payment-sdk
包简介
SDK for working with Fena Toolkit payment APIs.
README 文档
README
SDK for working with toolkit payment APIs.
Documentation
Full documentation can be found at: https://toolkit-docs.fena.co/sdk/php-sdk
Requirements
PHP 7.2.0 and later.
Installation
You can install the bindings via Composer. Run the following command:
composer require fena/toolkit-php-payment-sdk
To use the bindings, use Composer's autoload:
require_once('vendor/autoload.php');
Dependencies
Getting Started
Simple new payment looks like:
use Fena\PaymentSDK\Connection; use Fena\PaymentSDK\Payment; $connection = Connection::createConnection( $integrationId = '8afa74ae9fe8be53db50', $integrationSecret = '55d7d5ed-be22-4321-bb3f-aec8524d8be2' ); $payment = Payment::createPayment( $connection, $amount = '10.00' $reference = 'AA-11', $bankId = '8afa74ae9fe8be53db50' ); $payment->process();
Optional: Set User or Pre Selected Provider For New Payment
use Fena\PaymentSDK\Connection; use Fena\PaymentSDK\Payment; use Fena\PaymentSDK\Provider; use Fena\PaymentSDK\User; $connection = Connection::createConnection($terminalId, $terminalSecret); $payment = Payment::createPayment( $connection, $amount = '10.00', $reference = 'AA-11', $bankId = '8afa74ae9fe8be53db50' ); $user = User::createUser( $email = 'john.doe@test.com', $firstName = 'John', $lastName = 'Doe', $contactNumber = '07000845953' ); $payment->setUser($user); $provider = Provider::createProvider( $providerId = 'lloyds-bank', $sortCode = '123456', $accountNumber = '12345678' ); $payment->setProvider($provider);
统计信息
- 总下载量: 1.04k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-03-12