PHP code example of elvanto / omnipay-tithely
1. Go to this page and download the library: Download elvanto/omnipay-tithely library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
elvanto / omnipay-tithely example snippets
$gateway->setPublicKey($tithely_public); // Required
$gateway->setPrivateKey($tithely_secret); // Required
$gateway->setOrganizationId($tithely_org_Id); // Required
$gateway->setGivingType("Offering"); // 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();
$response->getRequest()->getData()["first_name"];