Skip to content

Commit

Permalink
0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Sep 3, 2017
1 parent f688976 commit 13a081d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
9 changes: 6 additions & 3 deletions Charge.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
namespace Dfe\Qiwi;
use Df\Payment\Source\Identification;
/**
* 2017-09-03
* @method Method m()
Expand All @@ -9,15 +10,17 @@ final class Charge extends \Df\Payment\Charge {
/**
* 2017-09-03
* @used-by p()
* @return array(string => mixed)
* @return array(string, array(string => mixed))
*/
private function pCharge() {$s = $this->s(); return [];}

/**
* 2017-09-03
* @used-by \Dfe\Qiwi\Init\Action::req()
* @param Method $m
* @return array(string, array(string => mixed))
*/
static function p(Method $m) {return (new self($m))->pCharge();}
static function p() {
$i = new self(dfpm(__CLASS__)); /** @var self $i */
return [Identification::get($i->o()), $i->pCharge()];
}
}
14 changes: 10 additions & 4 deletions Init/Action.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
namespace Dfe\Qiwi\Init;
use Dfe\Qiwi\API\Bill;
use Dfe\Qiwi\Charge;
use Dfe\Qiwi\Method as M;
use Dfe\Qiwi\W\Event as Ev;
Expand Down Expand Up @@ -39,16 +40,21 @@ protected function transId() {return $this->e2i('', Ev::T_INIT);}
*/
private function req() {return dfc($this, function() {
/** @var M $m */ /** @var array(string => mixed) $result */
df_sentry_extra($m = $this->m(), 'Request Params', $result = Charge::p($m));
df_sentry_extra($m = $this->m(), 'Request Params', $result = Charge::p());
$m->iiaSetTRR($result);
return $result;
});}

/**
* 2017-09-03
* 2017-09-04
* @used-by redirectUrl()
* @used-by transId()
* @return array(string => mixed)
*/
private function res() {return [];}
private function res() {return dfc($this, function() {
$m = $this->m(); /** @var M $m */
$m->iiaSetTRR(null, $r = Bill::s()->put($this->req())); /** @var array(string => mixed) $r */
dfp_report($m, $r, 'response');
return $r;
});}
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mage2pro/qiwi"
,"version": "0.1.2"
,"version": "0.1.3"
,"description": "The «Visa QIWI Wallet» (QIWI Кошелёк) payment extension for Magento 2."
,"type": "magento2-module"
,"homepage": "https://mage2.pro/c/extensions/qiwi"
Expand All @@ -11,7 +11,7 @@
"homepage": "https://mage2.pro/users/dmitry_fedyuk",
"role": "Developer"
}]
,"require": {"mage2pro/core": ">=2.11.11"}
,"require": {"mage2pro/core": ">=2.11.12"}
,"autoload": {"files": ["registration.php"], "psr-4": {"Dfe\\Qiwi\\": ""}}
,"keywords": [
"API"
Expand Down

0 comments on commit 13a081d

Please sign in to comment.