Git Product home page Git Product logo

omnipay-rbkmoney's Introduction

Omnipay: RBK.money

RBK.money driver for the Omnipay payment processing library.

Latest Stable Version Total Downloads Daily Downloads Latest Unstable Version License

Installation

The preferred way to install this library is through composer.

Either run

$ php composer.phar require webtoucher/omnipay-rbkmoney "*"

or add

"webtoucher/omnipay-rbkmoney": "*"

to the require section of your composer.json file.

Usage

Configure API client:

    $gateway = \Omnipay\Omnipay::create('RbkMoney');
    $gateway->setShopId('[SHOP_ID]');
    $gateway->setApiKey('[API_PRIVATE_KEY]');
    $gateway->setLogger(function ($message, $level = 'info') {
        // You can add logging for your requests
    });

Then you can create invoice.

    $cart = new \Omnipay\RbkMoney\Cart;
    $cart->addItem(new \Omnipay\RbkMoney\CartItem('Some product', 100));
    $cart->addItem(new \Omnipay\RbkMoney\CartItem('Another product', 200, 1, 20));

    $request = $gateway->createInvoice([
        'cart' => $cart,
        'currency' => 'RUB',
        'transactionId' => 1234,
        'product' => "Заказ 1234",
    ]);

    try {
        $response = $request->send();

        if ($response->isSuccessful()) {
            // Your handler
        }
    } catch (\Omnipay\Common\Exception\OmnipayException $e) {
        // Your handler
    }

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.

omnipay-rbkmoney's People

Contributors

webtoucher avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.