Skip to content

Omnipay gateway for the paymaster.ru - a Russian payment gateway

Notifications You must be signed in to change notification settings

xorik/omnipay-paymaster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

$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();
}

About

Omnipay gateway for the paymaster.ru - a Russian payment gateway

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages