Skip to content

CorvusPay driver for the Omnipay payment processing PHP library

License

Notifications You must be signed in to change notification settings

Eoler/omnipay-corvuspay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Omnipay: CorvusPay

CorvusPay driver for the Omnipay payment processing PHP library

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

Installation

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

{
    "require": {
        "eoler/omnipay-corvuspay": "~1.0"
    }
}

And run composer to update your dependencies:

composer update

Or you can simply run:

composer require eoler/omnipay-corvuspay

Basic Usage

  1. Use Omnipay gateway class:
    use Omnipay\Omnipay;
  1. Initialize CorvusPay gateway:
    $gateway = Omnipay::create('CorvusPay');
    $gateway->initialize([
        'apiKey'   => env('API_KEY'),
        'storeId'  => env('STORE_ID'),
        'testMode' => env('APP_DEBUG'),
        'language' => \App::getLocale(),
    ]);
  1. Call purchase, it will send user to CorvusPay checkout endpoint:
    $response = $gateway->purchase([
        'transactionId' => $order->id,
        'amount'      => $order->amount,
        'currency'    => $order->currencyCode,
        'description' => $order->products->list(),
        'email'       => $order->customer->email,
    ])->send();
    return $response->getRedirectResponse();
  1. Create a webhook to handle the callback request at your RESULT_URL and catch notification with:
    $gateway = Omnipay::create('CorvusPay');
    $gateway->initialize([
        'apiKey'   => env('API_KEY'),
        'storeId'  => env('STORE_ID'),
        'testMode' => env('APP_DEBUG'),
        'language' => \App::getLocale(),
    ]);

    $purchase = $gateway->completePurchase()->send();   
    if ($purchase->isSuccessful()) {
        // Bookkeeping: save completed status, etc.
    }

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.

About

CorvusPay driver for the Omnipay payment processing PHP library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages