Skip to content

Commit

Permalink
0.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Feb 11, 2017
1 parent 0e4b57f commit 7c89f0c
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 35 deletions.
16 changes: 8 additions & 8 deletions Facade/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ final class Card implements \Df\StripeClone\Facade\ICard {
* @used-by \Df\StripeClone\Facade\Card::create()
* @param C|array(string => string) $c
*/
public function __construct($c) {$this->_c = is_object($c) ? $c : (new C)
function __construct($c) {$this->_c = is_object($c) ? $c : (new C)
->setCardHolder($c['card_holder'])
->setCardType($c['card_type'])
->setCountry($c['country'])
Expand All @@ -28,7 +28,7 @@ public function __construct($c) {$this->_c = is_object($c) ? $c : (new C)
* @used-by \Df\StripeClone\CardFormatter::label()
* @return string
*/
public function brand() {return dftr($this->_c->getCardType(), [
function brand() {return dftr($this->_c->getCardType(), [
'amex' => 'American Express'
,'diners' => 'Diners Club'
,'discover' => 'Discover'
Expand All @@ -46,7 +46,7 @@ public function brand() {return dftr($this->_c->getCardType(), [
* @used-by \Df\StripeClone\CardFormatter::country()
* @return string
*/
public function country() {return $this->_c->getCountry();}
function country() {return $this->_c->getCountry();}

/**
* 2017-02-11
Expand All @@ -56,7 +56,7 @@ public function country() {return $this->_c->getCountry();}
* @used-by \Df\StripeClone\CardFormatter::ii()
* @return string
*/
public function expMonth() {return $this->_c->getExpireMonth();}
function expMonth() {return $this->_c->getExpireMonth();}

/**
* 2017-02-11
Expand All @@ -66,7 +66,7 @@ public function expMonth() {return $this->_c->getExpireMonth();}
* @used-by \Df\StripeClone\CardFormatter::ii()
* @return string
*/
public function expYear() {return $this->_c->getExpireYear();}
function expYear() {return $this->_c->getExpireYear();}

/**
* 2017-02-11
Expand All @@ -76,7 +76,7 @@ public function expYear() {return $this->_c->getExpireYear();}
* @used-by \Df\StripeClone\Facade\Customer::cardIdForJustCreated()
* @return string
*/
public function id() {return $this->_c->getId();}
function id() {return $this->_c->getId();}

/**
* 2017-02-11
Expand All @@ -85,7 +85,7 @@ public function id() {return $this->_c->getId();}
* @used-by \Df\StripeClone\CardFormatter::ii()
* @return string
*/
public function owner() {return $this->_c->getCardHolder();}
function owner() {return $this->_c->getCardHolder();}

/**
* 2017-02-11
Expand All @@ -95,7 +95,7 @@ public function owner() {return $this->_c->getCardHolder();}
* @used-by \Df\StripeClone\CardFormatter::label()
* @return string
*/
public function last4() {return $this->_c->getLastFour();}
function last4() {return $this->_c->getLastFour();}

/**
* 2017-02-11
Expand Down
10 changes: 5 additions & 5 deletions Facade/Charge.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class Charge extends \Df\StripeClone\Facade\Charge {
* @param string $id
* @return C
*/
public function capturePreauthorized($id) {return null;}
function capturePreauthorized($id) {return null;}

/**
* 2017-02-10
Expand All @@ -23,7 +23,7 @@ public function capturePreauthorized($id) {return null;}
* @param array(string => mixed) $p
* @return C
*/
public function create(array $p) {return null;}
function create(array $p) {return null;}

/**
* 2017-02-10
Expand All @@ -33,7 +33,7 @@ public function create(array $p) {return null;}
* @param C $c
* @return string
*/
public function id($c) {return $c->getId();}
function id($c) {return $c->getId();}

/**
* 2017-02-10
Expand All @@ -47,7 +47,7 @@ public function id($c) {return $c->getId();}
* Значение готово для применения в запросе API.
* @return object
*/
public function refund($id, $amount) {return null;}
function refund($id, $amount) {return null;}

/**
* 2017-02-10
Expand All @@ -58,7 +58,7 @@ public function refund($id, $amount) {return null;}
* @param string $id
* @return object
*/
public function void($id) {return null;}
function void($id) {return null;}

/**
* 2017-02-11
Expand Down
12 changes: 6 additions & 6 deletions Facade/Customer.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
namespace Dfe\Paymill\Facade;
use Dfe\Paymill\Charge;
use Dfe\Paymill\Charge as _Charge;
use Paymill\Models\Request\Client as iCustomer;
use Paymill\Models\Request\Payment as iCard;
use Paymill\Models\Response\Client as C;
Expand All @@ -19,7 +19,7 @@ final class Customer extends \Df\StripeClone\Facade\Customer {
* @param string $token
* @return string
*/
public function cardAdd($c, $token) {
function cardAdd($c, $token) {
/** @var oCard $oCard */
$oCard = $this->api()->create((new iCard)->setClient($c->getId())->setToken($token));
$c->setPayment(array_merge($c->getPayment(), [$oCard]));
Expand All @@ -34,8 +34,8 @@ public function cardAdd($c, $token) {
* @param array(string => mixed) $p
* @return C
*/
public function create(array $p) {return $this->api()->create((new iCustomer)
->setEmail($p[Charge::C_EMAIL])->setDescription($p[Charge::C_DESCRIPTION])
function create(array $p) {return $this->api()->create((new iCustomer)
->setEmail($p[_Charge::C_EMAIL])->setDescription($p[_Charge::C_DESCRIPTION])
);}

/**
Expand All @@ -47,7 +47,7 @@ public function create(array $p) {return $this->api()->create((new iCustomer)
* @param int $id
* @return C|null
*/
public function get($id) {
function get($id) {
try {return $this->api()->getOne((new iCustomer)->setId($id));}
catch (lException $e) {return null;}
}
Expand All @@ -60,7 +60,7 @@ public function get($id) {
* @param C $c
* @return string
*/
public function id($c) {return $c->getId();}
function id($c) {return $c->getId();}

/**
* 2017-02-11
Expand Down
2 changes: 1 addition & 1 deletion Facade/O.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ final class O extends \Df\StripeClone\Facade\O {
* @param object $o
* @return array(string => mixed)
*/
public function toArray($o) {return dfa_deep($this->m()->api()->getLastResponse(), 'body/data');}
function toArray($o) {return dfa_deep($this->m()->api()->getLastResponse(), 'body/data');}
}
2 changes: 1 addition & 1 deletion Facade/Refund.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ final class Refund extends \Df\StripeClone\Facade\Refund {
* @param object $r
* @return string
*/
public function transId($r) {return '';}
function transId($r) {return '';}
}
2 changes: 1 addition & 1 deletion Method.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ final class Method extends \Df\StripeClone\Method {
* @used-by \Dfe\Paymill\Facade\O::toArray()
* @return API
*/
final public function api() {return dfc($this, function() {return
final function api() {return dfc($this, function() {return
new API($this->s()->privateKey())
;});}

Expand Down
2 changes: 1 addition & 1 deletion Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ final class Settings extends \Df\StripeClone\Settings {
* @used-by \Df\Payment\ConfigProvider\BankCard::config()
* @return string|null
*/
public function prefill() {return $this->v("prefill{$this->test3DS('With', 'Without')}3DS");}
function prefill() {return $this->v("prefill{$this->test3DS('With', 'Without')}3DS");}

/**
* 2017-02-07
Expand Down
4 changes: 2 additions & 2 deletions T/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
use Paymill\Request as API;
final class Card extends TestCase {
/** @test 2017-02-08 */
public function t00() {}
function t00() {}

/** 2017-02-08 */
public function t01() {
function t01() {
/** @var API $api */
$api = $this->api();
/** @var oCard $oCard */
Expand Down
6 changes: 3 additions & 3 deletions T/Charge.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
use Paymill\Request as lRequest;
final class Charge extends TestCase {
/** @test */
public function t00() {}
function t00() {}

/** 2017-02-11 */
public function t01() {
function t01() {
/** @var lRequest $api */
$api = $this->api();
/** @var iCustomer $iCustomer */
Expand Down Expand Up @@ -41,7 +41,7 @@ public function t01() {
}

/** 2017-02-11 */
public function t02_ListAll() {echo "Response data:\n" . df_json_encode_pretty($this->ids());}
function t02_ListAll() {echo "Response data:\n" . df_json_encode_pretty($this->ids());}

/**
* 2017-02-11
Expand Down
12 changes: 6 additions & 6 deletions T/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
use Paymill\Request as API;
final class Customer extends TestCase {
/** @test */
public function t00() {}
function t00() {}

/** 2017-02-11 */
public function t01() {
function t01() {
/** @var API $api */
$api = $this->api();
/** @var iCustomer $iCustomer */
Expand All @@ -25,12 +25,12 @@ public function t01() {
}

/** 2017-02-11 */
public function t02_DeleteAll() {array_map(function($id) {
function t02_DeleteAll() {array_map(function($id) {
$this->api()->delete((new iCustomer)->setId($id));
}, $this->ids());}

/** 2017-02-11 */
public function t03_GetById() {
function t03_GetById() {
/** @var API $api */
$api = $this->api();
/** @var string $id */
Expand All @@ -50,7 +50,7 @@ public function t03_GetById() {
* 2017-02-11
* @expectedException \Paymill\Services\PaymillException
*/
public function t04_GetNonExistent() {
function t04_GetNonExistent() {
/** @var API $api */
$api = $this->api();
/** @var string $id */
Expand All @@ -62,7 +62,7 @@ public function t04_GetNonExistent() {
}

/** 2017-02-11 */
public function t05_AddCard() {
function t05_AddCard() {
/** @var API $api */
$api = $this->api();
/** @var string $id */
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mage2pro/paymill"
,"version": "0.2.5"
,"version": "0.2.6"
,"description": "The «Paymill» payment extension for Magento 2."
,"type": "magento2-module"
,"homepage": "https://mage2.pro/c/extensions/paymill"
Expand Down

0 comments on commit 7c89f0c

Please sign in to comment.