eoler/omnipay-corvuspay
最新稳定版本:1.0.0
Composer 安装命令:
composer require eoler/omnipay-corvuspay
包简介
CorvusPay driver for Omnipay payment processing library
README 文档
README
CorvusPay driver for the Omnipay payment processing PHP library
Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.6+. This package implements CorvusPay support for Omnipay.
Installation
Omnipay is installed via Composer. To install, add it to your
composer.json file:
{
"require": {
"eoler/omnipay-corvuspay": "~1.0"
}
}
And run composer to update your dependencies:
composer update
Or you can simply run:
composer require eoler/omnipay-corvuspay
Basic Usage
- Use Omnipay gateway class:
use Omnipay\Omnipay;
- Initialize CorvusPay gateway:
$gateway = Omnipay::create('CorvusPay'); $gateway->initialize([ 'apiKey' => env('API_KEY'), 'storeId' => env('STORE_ID'), 'testMode' => env('APP_DEBUG'), 'language' => \App::getLocale(), ]);
- Call purchase, it will send user to CorvusPay checkout endpoint:
$response = $gateway->purchase([ 'transactionId' => $order->id, 'amount' => $order->amount, 'currency' => $order->currencyCode, 'description' => $order->products->list(), 'email' => $order->customer->email, ])->send(); return $response->getRedirectResponse();
- Create a webhook to handle the callback request at your
RESULT_URLand catch notification with:
$gateway = Omnipay::create('CorvusPay'); $gateway->initialize([ 'apiKey' => env('API_KEY'), 'storeId' => env('STORE_ID'), 'testMode' => env('APP_DEBUG'), 'language' => \App::getLocale(), ]); $purchase = $gateway->completePurchase()->send(); if ($purchase->isSuccessful()) { // Bookkeeping: save completed status, etc. }
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.
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 2
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-02-03