2017 © Pedro Peláez
 

library omnipay-qiwi

Qiwi driver for the Omnipay payment processing library

image

antonis0490/omnipay-qiwi

Qiwi driver for the Omnipay payment processing library

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Qiwi: Qiwi

Qiwi driver for the Qiwi PHP payment processing library, (*1)

Installation

Qiwi is installed via Composer. To install, simply add it to your composer.json file:, (*2)

{
    "require": {
        "antonis0490/omnipay-qiwi": "dev-master"
    }
}

And run composer to update your dependencies:, (*3)

$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update

Basic Usage

To make a request:, (*4)

use Omnipay\Omnipay;
use Omnipay\Qiwi\Message\StatusCallback;

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


$gateway->initialize(array(
    'qiwiApiId' => "",
    'qiwiApiPass' => "",
    'qiwiApiNotifyPass' => "", 
    'qiwiWallet' => qiwi Wallet,
    'testMode' => 1, // Or false when you are ready for live transactions
));

$options = array
(

    'user' => "Users Phone number",
    'comment' => "",
    'ccy' => "currency",
    'amount' => "",
    "lifetime" => "how long will this be valid? data here",
    "shop" => "qiwi Wallet",
    "transaction" => "transaction id",
    "target" => "",
    'successUrl' => "",
    'failUrl' => "",
    'cancel_url' => "",

);

$transaction = $gateway->purchase($options);
$response = $transaction->send();

if (gettype($response) == "object" && $response->isRedirect()) {
    //redirect
} else {
   //error
}

Notify function:, (*5)

$status = new StatusCallback($_REQUEST);

if ($status->UserFilled()) {
    //do whats needed
}

//reply with 200
$this->response->statusCode(200);
$this->response->type("text/xml");

$dom = new \DOMDocument('1.0');
$root = $dom->createElement('result');
$dom->appendChild($root);
$root->appendChild( $dom->createElement('result_code', 0) );
$dom->formatOutput = false;
$reply_xml = $dom->saveXML();


$this->response->body($reply_xml);
return $this->response;

The following gateways are provided by this package:, (*6)

  • Qiwi

For general usage instructions, please see the main Omnipay site., (*7)

The Versions

19/04 2018

dev-master

9999999-dev https://github.com/antonis0490/omnipay-qiwi

Qiwi driver for the Omnipay payment processing library

  Sources   Download

MIT

The Requires

 

cakephp payment pay gateway merchant omnipay symfony wallet qiwi