ptuchik / omnipay-yandex
Yandex Money gateway for Omnipay payment processing library
Installs: 11 968
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 3
Open Issues: 0
Requires
Requires (Dev)
- omnipay/tests: ^3
This package is auto-updated.
Last update: 2024-12-14 03:49:03 UTC
README
Yandex Money driver for the Omnipay Laravel payment processing library
Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.5+. This package implements Yandex Money support for Omnipay.
Installation
Omnipay is installed via Composer. To install, simply add it
to your composer.json
file:
{ "require": { "ptuchik/omnipay-yandex": "~1.0" } }
And run composer to update your dependencies:
composer update
Or you can simply run
composer require ptuchik/omnipay-yandex
Basic Usage
- Use Omnipay gateway class:
use Omnipay\Omnipay;
- Initialize Yandex gateway and make a purchase:
$gateway = Omnipay::create('Yandex'); $gateway->setShopId(env('SHOP_ID')); $gateway->setSecretKey(env('SECRET_KEY')); $gateway->setReturnUrl(env('RETURN_URL')); $gateway->setAmount(10); // Amount to charge $gateway->setCurrency('RUB'); // Currency $purchase = $gateway->purchase()->send(); if ($purchase->isSuccessful()) { // Do your logic } else { throw new Exception($purchase->getMessage()); }
- Initialize Yandex gateway and make a refund:
$gateway = Omnipay::create('Yandex'); $gateway->setShopId(env('SHOP_ID')); $gateway->setSecretKey(env('SECRET_KEY')); $gateway->setReturnUrl(env('RETURN_URL')); $gateway->setAmount(10); // Amount to refund $gateway->setTransactionReference(10); // Payment ID $refund = $gateway->refund()->send(); if ($refund->isSuccessful()) { // Do your logic } else { throw new Exception($refund->getMessage()); }
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 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.