trekkpay/omnipay-trekkpay

This package is abandoned and no longer maintained. The author suggests using the payyo/omnipay-payyo package instead.

TrekkPay Gateway for the Omnipay payment processing library

2.0.1 2017-10-31 11:36 UTC

This package is auto-updated.

Last update: 2022-02-01 13:10:42 UTC


README

This repository is deprecated in favor of https://bitbucket.org/payyoag/payyo-omnipay as well as payyo/omnipay-payyo is supposed to be used instead of trekkpay/omnipay-trekkpay

Omnipay: TrekkPay

TrekkPay Gateway for the Omnipay PHP payment processing library.

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

The TrekkPay Omnipay library requires PHP 7.0+.

Installation

Omnipay can be installed using Composer. Installation instructions.

Run the following command to install omnipay and the TrekkPay gateway:

composer require trekkpay/omnipay-trekkpay

Basic Usage

The following parameters are required:

  • apiKey Your TrekkPay API/public key
  • secretKey Your TrekkPay secret key
  • merchantId Your TrekkPay merchant ID
$gateway = Omnipay::create(\TrekkPay\Omnipay\HostedPaymentPageGateway::class);
$gateway->setApiKey('api_...');
$gateway->setSecretKey('sec_...');
$gateway->setMerchantId(1234);

// Send purchase request
$response = $gateway->purchase([
    'transactionId' => '123456',
    'description' => '1x Book',
    'amount' => '10.00',
    'currency' => 'USD',
    'returnUrl' => 'https://example.org/success',
    'cancelUrl' => 'https://example.org/abort',
])->send();

// This is a redirect gateway, so redirect right away
$response->redirect();