fomvasss/omnipay-interkassa

This package is abandoned and no longer maintained. No replacement package was suggested.

InterKassa driver for the Omnipay PHP payment processing library

0.1.1 2017-03-19 14:12 UTC

This package is auto-updated.

Last update: 2020-08-19 22:51:56 UTC


README

InterKassa driver for the Omnipay PHP payment processing library

Latest Stable Version Total Downloads Build Status Scrutinizer Code Quality Dependency Status

Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.3+.

This package implements InterKassa support for Omnipay.

Installation

The preferred way to install this library is through composer.

Either run

php composer.phar require "ange007/omnipay-interkassa"

or add

"ange007/omnipay-interkassa": "*"

to the require section of your composer.json.

Basic Usage

The following gateway is provided by this package:

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

Example

public function payResponse( $serviceID, $status, $data )
{
	// Load Gateway
	$gateway = Omnipay::gateway( $serviceID );

	// Read data
	if( $status === 'notify' && $gateway->supportsAcceptNotification( ) ) { $request = $gateway->acceptNotification( $data ); }
	else if( $gateway->supportsCompleteAuthorize( ) ) { $request = $gateway->completeAuthorize( $data ); }
	else if( $gateway->supportsCompletePurchase( ) ) { $request = $gateway->completePurchase( $data ); }

	// Send request
	try { $response = $request->send( ); }
	catch( Exception $ex ) { }

	// Need wait server notification
	if( $response->isPending( ) )
	{
		//...
	}
	// Paid successful
	else if( $response->isSuccessful( ) )
	{
		$payID = $response->getTransactionId( );
		//...
	}
	// Pay cancelled from user
	else if( $request->isCancelled( ) ) 
	{
		//...
	}
	// Error or other
	else 
	{ 
		$message = $response->getMessage( );
		//...
	}
}

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.

License

This project is released under the terms of the MIT license. Read more here.

Copyright © 2017, ange007 (original author: HiQDev - hiqdev/omnipay-interkassa).