arm092/omnipay-telcell
最新稳定版本:1.0.3
Composer 安装命令:
composer require arm092/omnipay-telcell
包简介
Telcell gateway for Omnipay payment processing library
README 文档
README
Telcell driver for the Omnipay Laravel payment processing library
Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.5+. This package implements Telcell support for Omnipay.
Installation
Omnipay is installed via Composer. To install, simply add it
to your composer.json file:
{
"require": {
"arm092/omnipay-telcell": "~1.0"
}
}
And run composer to update your dependencies:
composer update
Or you can simply run
composer require arm092/omnipay-telcell
Basic Usage
- Use Omnipay gateway class:
use Omnipay\Omnipay;
- Initialize Telcell gateway:
$gateway = Omnipay::create('Telcell'); $gateway->setShopId(env('TELCELL_SHOP_ID')); $gateway->setShopKey(env('TELCELL_SHOP_KEY')); $gateway->setLanguage(\App::getLocale()); // Language $gateway->setAmount(200); // Amount to charge $gateway->setDescription(1); // Product description $gateway->setValidDays(1); // Days during which the invoice is valid $gateway->setTransactionId(XXXX); // Transaction ID from your system
- Call purchase, it will automatically redirect to Telcell's hosted page
$purchase = $gateway->purchase()->send(); $purchase->redirect();
- Create a webhook controller to handle the callback request at your
CALLBACK_URLand catch the webhook as follows
$gateway = Omnipay::create('Telcell'); $gateway->setShopId(env('TELCELL_SHOP_ID')); $gateway->setShopKey(env('TELCELL_SHOP_KEY')); $purchase = $gateway->completePurchase()->send(); // Do the rest with $purchase and response with 'OK' if ($purchase->isSuccessful()) { // Your logic } return new Response('OK');
For general usage instructions, please see the main Omnipay repository.
Support
If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.
If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a mailing list which you can subscribe to.
If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.
统计信息
- 总下载量: 158
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-11-07