2017 © Pedro Peláez
 

library omnipay-paymaster

Implement paymaster for the omnipay (Russian payment system)

image

xorik/omnipay-paymaster

Implement paymaster for the omnipay (Russian payment system)

  • Friday, February 24, 2017
  • by xorik
  • Repository
  • 1 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Omnipay gateway for the paymaster

Payment

$gateway = \Omnipay\Omnipay::create('Paymaster');
$gateway->initialize([
    'merchant_id' => 'YOUR_MERCHANT_ID',
    'secret_key' => 'YOUR_SECRET_KEY',
    'hashing_algorithm' => 'sha256' // Default value
]);
$response = $gateway->purchase([
    'currency' => 'RUB',
    'amount' => '1.00',
    'transactionId' => '123',
    'description' => 'Оплата заказа №123'
])->send();

if ($response->isRedirect()) {
    // Return this response to the user
    $response->getRedirectResponse();
}

Callback

Put this on your callback controller, (*1)

$gateway = \Omnipay\Omnipay::create('Paymaster');
$gateway->initialize([
    'secret_key' => 'YOUR_SECRET_KEY',
]);

$response = $gateway->completePurchase($_POST)->send();

if ($response->isSuccessful()) {
    // Your order ID
    echo $response->getTransactionId();
    // Transaction ID
    echo $response->getTransactionReference();
}

The Versions

24/02 2017

dev-master

9999999-dev

Implement paymaster for the omnipay (Russian payment system)

  Sources   Download

MIT

The Requires

 

by Andrey Smelov