定制 k3rnel/omnipay-arca 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

k3rnel/omnipay-arca

最新稳定版本:v1.2.0

Composer 安装命令:

composer require k3rnel/omnipay-arca

包简介

Arca gateway for Omnipay payment processing library

README 文档

README

Arca driver for the Omnipay Laravel payment processing library

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.5+. This package implements Arca support for Omnipay.

Installation

Omnipay is installed via Composer. To install, simply add it to your composer.json file:

{
    "require": {
        "k3rnel/omnipay-arca": "dev-master"
    }
}

And run composer to update your dependencies:

composer update

Or you can simply run

composer require k3rnel/omnipay-arca

Basic Usage

  1. Use Omnipay gateway class:
    use Omnipay\Omnipay;
  1. Initialize Arca gateway:
    $gateway = Omnipay::create('Arca');
    $gateway->setUsername(env('ARCA_USERNAME'));
    $gateway->setPassword(env('ARCA_PASSWORD'));
    $gateway->setReturnUrl(env('ARCA_RETURN_URL')); // Return url, that should be point to your arca webhook route
    $gateway->setLanguage(\App::getLocale()); // Language
    $gateway->setAmount(10); // Amount to charge
    $gateway->setTransactionId(XXXX); // Transaction ID from your system
  1. Call purchase, it will automatically redirect to Arca's hosted page
    $purchase = $gateway->purchase()->send();
    $purchase->redirect();
  1. Create a webhook controller to handle the callback request at your ARCA_RESULT_URL and catch the webhook as follows
    $gateway = Omnipay::create('Arca');
    $gateway->setUsername(env('ARCA_USERNAME'));
    $gateway->setPassword(env('ARCA_PASSWORD'));
    
    $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.

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-12-29