elvanto / omnipay-tithely
Tithe.ly driver for the Omnipay payment processing library
Installs: 25 439
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 8
Forks: 0
Open Issues: 0
Requires
- php: >=5.6.0
- omnipay/common: ~3.0
Requires (Dev)
- omnipay/tests: ~3.0
- scrutinizer/ocular: ~1.1
This package is auto-updated.
Last update: 2024-11-21 23:47:05 UTC
README
Tithe.ly driver for the Omnipay payment processing library
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.