GithubHelp home page GithubHelp logo

omnipay-total-apps-gateway's Introduction

Omnipay: Total Apps Gateway

Total Apps Gateway gateway for the Omnipay PHP payment processing library

Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements Total Apps Gateway support for Omnipay.

Install

Via Composer

$ composer require awolacademy/omnipay-total-apps-gateway

Usage

The following gateways are provided by this package:

  • Total Apps Gateway

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

This driver supports following transaction types:

  • authorize($options) - authorize an amount on the customer's card
  • capture($options) - capture an amount you have previously authorized
  • purchase($options) - authorize and immediately capture an amount on the customer's card
  • refund($options) - refund an already processed transaction
  • void($options) - generally can only be called up to 24 hours after submitting a transaction

Gateway instantiation:

    $gateway = Omnipay::create('TotalAppsGateway');
    $gateway->setProcessorId('abcdefg1234567');
    $gateway->setToken('6ef44f261a4a1595cd377d3ca7b57b92');
    $gateway->setTestMode(true);

Driver also supports paying using store cards in the customer vault using cardReference instead of card, use the vault functions with the cardReference parameter.

This driver also supports storing customer data in Total Apps Gateway's customer vault:

  • createCard($options) - Create a entry in the customer vault
  • updateCard($options) - Update an entry in the customer vault
  • deleteCard($options) - Delete an entry in a customer vault
    $formData = array('number' => '4242424242424242', 'expiryMonth' => '8', 'expiryYear' => '2017', 'cvv' => '123');
    
    $response = $gateway->createCard([
        'card'          => $formData
    ])->send();
    
    $cardReference = $response->getCardReference();
  • listCards - Listing customer vault records by criteria
    # Each criteria are optional, no criteria will return no records
    $response = $gateway->listCards([
        'cardReference' => '', # The hash to identify the customer in the vault
        'firstName'     => '', # Portion of cardholder's first name.
        'lastName'      => '', # Portion of cardholder's last name.
        'email'         => '', # Portion of billing email address.
        'last4cc'       => ''  # Last 4 digits of credit card number.
    ]);
    $response_rows = $response->getResponse();

cardReference can be used in the authorize, purchase, and refund requests:

    $gateway->purchase([
        'amount'        => '10.00',
        'cardReference' => '1234567890'
    ]);

This driver also supports subscription management which can be accessed using:

  • subscription_add($options) - Add a subscription
  • subscription_delete($options) - Delete a subscription
    # As an example we will add a subscription the starts on 01/04/2017
    $gateway->subscription_add([
        'cardReference'          => '1234567890',
        'planId'                 => '1234567890',
        'subscriptionStartDay'   => '01',
        'subscriptionStartMonth' => '04',
        'subscriptionStartYear'  => '2017'
    ]);

API Calls on the TODO list which will be implemented eventually:

  • Adding, updating, removing, listing Recurring Plans
  • Listing subscriptions by customer
  • Add a Customer to the Vault while Initiating a Sale/Authorization/Credit/Validate Transaction

We currently have no plans to implement the following calls (Pull requests are accepted for those who wants to add them):

  • Adding a custom subscription - Does not return necessary subscription ID to cancel
  • Adding a customer and subscription - Does not return necessary subscription ID to cancel

Note: Credit API call is implemented but is not enabled by default on merchant accounts, contact Total Apps Gateway if you need this functionality. Please note that this code is untested.

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.

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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

omnipay-total-apps-gateway's People

Contributors

knightar avatar

Watchers

 avatar  avatar

Forkers

inspirean-labs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.