定制 elvanto/omnipay-tithely 二次开发

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

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

elvanto/omnipay-tithely

最新稳定版本:2.0.0

Composer 安装命令:

composer require elvanto/omnipay-tithely

包简介

Tithe.ly driver for the Omnipay payment processing library

README 文档

README

Tithe.ly driver for the Omnipay payment processing library

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

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

Install

Via Composer

$ composer require elvanto/omnipay-tithely

Versions

Omnipay 3.x is supported starting with v2.0.0 of this package.

Usage

The following gateways are provided by this package:

  • Tithe.ly (Quick Charge)

For general usage instructions, please see the main Omnipay repository.

Specific Usage Instructions

Omnipay tithely is an API middleware to simplify requests to Tithely Quick-Charge v1 and later V2. This Tithely api allows users to create a payment request without creating an account.

Creating the payment request.

Tithely Payment Gateway

Validation data like our tithely organisation id tithely_org_Id, tithely public tithely_public and secret tithely_secret keys exist as part of our gateway request. Additionally the gateway also takes our giving type giving_type field as a string.

The gateway details are set with the functions:

$gateway->setPublicKey($tithely_public);  // Required
$gateway->setPrivateKey($tithely_secret);  // Required
$gateway->setOrganizationId($tithely_org_Id);   // Required
$gateway->setGivingType("Offering");  // Required

Request Body

Unlike regular use of the tithely quick charge api, the omnipay/tithely api object requires a card object within the request to pass our first_name, last_name, and email. The token, description, currency and exist in request objects main body.

Specific to omnipay / tithely the currency field within the $request body is required.

$request["card"] =  new CreditCard(array(  
    "first_name" => $first_name,   // Required
    "last_name" => $last_name,   // Required
    "email" => $email   // Required
));  
  
$request["token"] = $token; // Stripe token. Required
$request["amount"] = "10.00";  // Required
$request["description"] = "Donation to church.";
$request["currency"] = $currency; //e.g. "USD" "CAD" "AUD" Required

$gateway = Omnipay::create('Tithely');

$tithely_public = "pub_*****"; // Required
$tithely_secret = "pri_*****"; // Required
$tithely_org_Id = "org_*****"; // Required

$gateway->setPublicKey($tithely_public);  // Required
$gateway->setPrivateKey($tithely_secret);  // Required
$gateway->setOrganizationId($tithely_org_Id);   // Required
$gateway->setGivingType("Offering");  // Required

$response = $gateway->purchase($request)->send();

Accessing the response object.

The $reponse comes as a protected object. To access the response use the getRequest and getData() odadmnipay functions.

$response->getRequest()->getData()["first_name"];

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 announcements, 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.

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email developers@elvanto.com instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 7
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-08-31