leonardjke/omnipay-yoomoney

Yoomoney driver for Omnipay PHP payment library

1.6 2022-03-19 11:52 UTC

This package is auto-updated.

Last update: 2024-04-19 15:59:24 UTC


README

YooMoney driver for Omnipay PHP payment library

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

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

Install

Install the gateway using require. Require the league/omnipay base package and this gateway.

$ composer require league/omnipay leonardjke/omnipay-yoomoney

Usage

Create purchase

$gateway = Omnipay::create('Yoomoney');

$gateway->setReceiver('410011122244470');
$gateway->setPaymentType('PC');
$gateway->setQuickpayForm('shop');
$gateway->setSuccessUrl('https://example.com');

$response = $gateway->purchase([
    'amount' => $payment->price,
    'transactionId' => $payment->id,
    'description' => 'Оплата товара',
    'currency' => 'RUB',
])->send();

###Continue purchase

$gateway = Omnipay::create('Yoomoney');

$gateway->setReceiver('410011122244470');
$gateway->setPaymentType('PC');
$gateway->setQuickpayForm('shop');
$gateway->setSuccessUrl('https://example.com');

$response = $gatewayManager->acceptNotification();

// Impotant! Verify hash of the request
if (!$response->isValid()) {
  // return error
}

$data   = $response->getData();
$status = $response->getTransactionStatus();
$id     = $response->getTransactionReference();

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 announcements, 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.

Testing

$ composer test

Security

If you discover any security related issues, please email a@minedonate.ru instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.