Skip to content

Commit

Permalink
1.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Oct 10, 2017
1 parent e9cb72c commit 156221e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 44 deletions.
29 changes: 7 additions & 22 deletions Facade/Charge.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ final class Charge extends \Df\StripeClone\Facade\Charge {
*/
function capturePreauthorized($id, $a) {return C::retrieve($id)->capture();}

/**
* 2017-02-11
* @override
* @see \Df\StripeClone\Facade\Charge::cardIdPrefix()
* @used-by \Df\StripeClone\Payer::usePreviousCard()
* @return string
*/
function cardIdPrefix() {return 'card';}

/**
* 2017-02-10
* @override
Expand Down Expand Up @@ -55,6 +46,7 @@ function id($c) {return $c['id'];}
* @override
* @see \Df\StripeClone\Facade\Charge::pathToCard()
* @used-by \Df\StripeClone\Block\Info::prepare()
* @used-by \Df\StripeClone\Facade\Charge::cardData()
* @return string
*/
function pathToCard() {return 'card';}
Expand Down Expand Up @@ -82,21 +74,14 @@ function refund($id, $a) {return C::retrieve($id)->refunds()->create(['amount' =
* @param string $id
* @return C
*/
function void($id) {
/** @var C $result */
$result = C::retrieve($id);
$result->reverse();
return $result;
}
function void($id) {/** @var C $r */ $r = C::retrieve($id); $r->reverse(); return $r;}

/**
* 2017-02-11 The bank card data.
* 2017-02-11
* @override
* @see \Df\StripeClone\Facade\Charge::cardData()
* @used-by \Df\StripeClone\Facade\Charge::card()
* @param C $c
* @return array(string => string)
* @see \Dfe\Omise\Facade\Customer::cardsData()
* @see \Df\StripeClone\Facade\Charge::cardIdPrefix()
* @used-by \Df\StripeClone\Payer::usePreviousCard()
* @return string
*/
protected function cardData($c) {return $c['card'];}
protected function cardIdPrefix() {return 'card_';}
}
36 changes: 17 additions & 19 deletions Facade/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,6 @@
use OmiseCustomer as C;
// 2017-02-10
final class Customer extends \Df\StripeClone\Facade\Customer {
/**
* 2017-02-10
* https://github.com/omise/omise-php/issues/43
* @override
* @see \Df\StripeClone\Facade\Customer::_get()
* @used-by \Df\StripeClone\Facade\Customer::get()
* @param int $id
* @return C
*/
function _get($id) {
// 2017-02-18
// К сожалению, нельз просто написать:
// return ($c = C::retrieve($id))->isDestroyed() ? null : $c;}
// На PHP 5.6 будет сбой: [E_PARSE] syntax error, unexpected '->' (T_OBJECT_OPERATOR)
/** @var C $c */
$c = C::retrieve($id);
return $c->isDestroyed() ? null : $c;
}

/**
* 2017-02-10
* @override
Expand Down Expand Up @@ -56,6 +37,23 @@ function create(array $p) {return C::create($p);}
*/
function id($c) {return $c['id'];}

/**
* 2017-02-10 https://github.com/omise/omise-php/issues/43
* @override
* @see \Df\StripeClone\Facade\Customer::_get()
* @used-by \Df\StripeClone\Facade\Customer::get()
* @param int $id
* @return C
*/
protected function _get($id) {
// 2017-02-18
// К сожалению, нельз просто написать:
// return ($c = C::retrieve($id))->isDestroyed() ? null : $c;}
// На PHP 5.6 будет сбой: [E_PARSE] syntax error, unexpected '->' (T_OBJECT_OPERATOR)
$c = C::retrieve($id); /** @var C $c */
return $c->isDestroyed() ? null : $c;
}

/**
* 2017-02-11
* Ключ $o['cards']['data'] присутствует в объекте даже при отсутствии карт.
Expand Down
2 changes: 1 addition & 1 deletion P/Charge.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
final class Charge extends \Df\StripeClone\P\Charge {
/**
* 2017-02-11
* 2017-02-18 Ключ, значением которого является токен банковской карты.
* 2017-10-09 The key name of a bank card token or of a saved bank card ID.
* @override
* @see \Df\StripeClone\P\Charge::k_CardId()
* @used-by \Df\StripeClone\P\Charge::request()
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mage2pro/omise"
,"version": "1.10.2"
,"version": "1.11.0"
,"description": "The «Omise» payment extension for Magento 2."
,"type": "magento2-module"
,"homepage": "https://mage2.pro/c/extensions/omise"
Expand All @@ -11,7 +11,7 @@
"homepage": "https://mage2.pro/users/dmitry_fedyuk",
"role": "Developer"
}]
,"require": {"mage2pro/core": ">=2.11.36", "omise/omise-php": "^2.5.0"}
,"require": {"mage2pro/core": ">=3.1.0", "omise/omise-php": "^2.5.0"}
,"autoload": {"files": ["registration.php"], "psr-4": {"Dfe\\Omise\\": ""}}
,"keywords": [
"3D Secure"
Expand Down

0 comments on commit 156221e

Please sign in to comment.