blutekic/emola-sdk
最新稳定版本:v1.0.1
Composer 安装命令:
composer require blutekic/emola-sdk
包简介
online payment manager using emola gateway
README 文档
README
Dependency for consumption of the Emola WebService
Installation
To install this dependency, just run the command below:
composer require blutekic/emola-sdk
Usage
To use this manager, just follow the example below:
C2B
<?php require __DIR__.'/../../vendor/autoload.php'; use \Bluteki\Sdk\Emola; // configuring api access credentials Emola::config( 'Emola WSDL', 'Your Username', 'Your Password', 'You Key', 'Partner Code', 'Language (pt | en)' ); $transactionID = strtoupper(bin2hex(random_bytes(8))); $transactionReference = strtoupper(bin2hex(random_bytes(8))); $response = Emola::c2b( 10, '877777777', $transactionID, $transactionReference, 'SMS CONTENT WITHOUT AMOUNT'); echo '<pre>'; print_r($response->toArray());
B2C
<?php require __DIR__.'/../../vendor/autoload.php'; use \Bluteki\Sdk\Emola; // configuring api access credentials Emola::config( 'Emola WSDL', 'Your Username', 'Your Password', 'You Key', 'Partner Code', 'Language (pt | en)' ); $transactionID = strtoupper(bin2hex(random_bytes(8))); $transactionReference = strtoupper(bin2hex(random_bytes(8))); $response = Emola::b2c( 10, '877777777', $transactionID, 'SMS CONTENT'); echo '<pre>'; print_r($response->toArray());
FAKE TRANSACTIONS (C2B & B2C)
<?php require __DIR__.'/../../vendor/autoload.php'; use \Bluteki\Sdk\Emola; // configuring api access credentials Emola::config( 'Emola WSDL', 'Your Username', 'Your Password', 'You Key', 'Partner Code', 'Language (pt | en)' ); Emola::fake(); $transactionID = strtoupper(bin2hex(random_bytes(8))); $transactionReference = strtoupper(bin2hex(random_bytes(8))); // start c2b fake transaction $response = Emola::c2b( 10, '877777777', $transactionID, $transactionReference, 'SMS CONTENT WITHOUT AMOUNT'); // start b2c fake transaction $response = Emola::b2c( 10, '877777777', $transactionID, 'SMS CONTENT'); echo '<pre>'; print_r($response->toArray());
Requirements
- PHP 8.0 or higher required
统计信息
- 总下载量: 26
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2024-10-18