diff --git a/Facade/Charge.php b/Facade/Charge.php index 696063f..b3269c6 100644 --- a/Facade/Charge.php +++ b/Facade/Charge.php @@ -20,15 +20,6 @@ final class Charge extends \Df\StripeClone\Facade\Charge { */ function capturePreauthorized($id, $a) {return C::retrieve($id)->capture(['amount' => $a]);} - /** - * 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 @@ -56,6 +47,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 'source';} @@ -97,15 +89,13 @@ function refund($id, $a) {return R::create(df_clean([ function void($id) {return $this->refund($id, null);} /** - * 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 \Stripe\Card - * @see \Dfe\Stripe\Facade\Customer::cardsData() + * @see \Df\StripeClone\Facade\Charge::cardIdPrefix() + * @used-by \Df\StripeClone\Payer::usePreviousCard() + * @return string */ - protected function cardData($c) {return $c->{'source'};} + protected function cardIdPrefix() {return 'card_';} /** * 2016-03-18 diff --git a/Facade/Customer.php b/Facade/Customer.php index 27fa41f..c58dc1d 100644 --- a/Facade/Customer.php +++ b/Facade/Customer.php @@ -3,20 +3,6 @@ use Stripe\Customer as C; // 2017-02-10 final class Customer extends \Df\StripeClone\Facade\Customer { - /** - * 2017-02-10 - * «When requesting the ID of a customer that has been deleted, - * a subset of the customer’s information will be returned, - * including a deleted property, which will be true.» - * https://stripe.com/docs/api/php#retrieve_customer - * @override - * @see \Df\StripeClone\Facade\Customer::get() - * @used-by \Df\StripeClone\Facade\Customer::get() - * @param int $id - * @return C|null - */ - function _get($id) {/** @var C $c */return dfo($c = C::retrieve($id), 'deleted') ? null : $c;} - /** * 2017-02-10 * @override @@ -48,6 +34,20 @@ function create(array $p) {return C::create($p);} */ function id($c) {return $c->id;} + /** + * 2017-02-10 + * «When requesting the ID of a customer that has been deleted, + * a subset of the customer’s information will be returned, + * including a deleted property, which will be true.» + * https://stripe.com/docs/api/php#retrieve_customer + * @override + * @see \Df\StripeClone\Facade\Customer::_get() + * @used-by \Df\StripeClone\Facade\Customer::get() + * @param int $id + * @return C|null + */ + protected function _get($id) {/** @var C $c */return dfo($c = C::retrieve($id), 'deleted') ? null : $c;} + /** * 2017-02-11 * @override diff --git a/P/Address.php b/P/Address.php index dfddecc..74fae71 100644 --- a/P/Address.php +++ b/P/Address.php @@ -10,10 +10,9 @@ final class Address extends \Df\Payment\Operation { */ static function p() { $i = new self(dfpm(__CLASS__)); /** @var self $i */ - /** @var A|null $a */ /** @var @var array(string => mixed) $shipping */ + /** @var A|null $a */ return !($a = $i->addressS()) ? [] : [ - // 2016-03-14 hipping address. - // https://stripe.com/docs/api/php#charge_object-shipping-address + // 2016-03-14 Shipping address https://stripe.com/docs/api/php#charge_object-shipping-address 'address' => [ // 2016-03-14 City/Suburb/Town/Village. // https://stripe.com/docs/api/php#charge_object-shipping-address-city diff --git a/P/Charge.php b/P/Charge.php index f85a357..50385fa 100644 --- a/P/Charge.php +++ b/P/Charge.php @@ -4,7 +4,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() diff --git a/Settings.php b/Settings.php index d57f624..bb63d85 100644 --- a/Settings.php +++ b/Settings.php @@ -1,21 +1,28 @@ privateKey());} - /** @return bool */ + /** + * 2016-03-08 + * @used-by \Dfe\Stripe\ConfigProvider::config() + * @used-by \Dfe\Stripe\Method::minimumAmount() + * @return bool + */ function isMerchantInUS() {return 'US' === $this->account()->{'country'};} /** - * 2016-03-08 - * https://stripe.com/docs/api/php#retrieve_account + * 2016-03-08 https://stripe.com/docs/api/php#retrieve_account + * @used-by isMerchantInUS() * @return \Stripe\Account */ private function account() {return dfc($this, function() { diff --git a/composer.json b/composer.json index 2a0a4cf..df03d55 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "mage2pro/stripe" - ,"version": "1.12.4" + ,"version": "1.12.5" ,"description": "The «Stripe» payment extension for Magento 2." ,"type": "magento2-module" ,"homepage": "https://mage2.pro/c/extensions/stripe" @@ -11,7 +11,7 @@ "homepage": "https://mage2.pro/users/dmitry_fedyuk", "role": "Developer" }] - ,"require": {"mage2pro/core": ">=2.11.36", "stripe/stripe-php": "3.*"} + ,"require": {"mage2pro/core": ">=3.1.0", "stripe/stripe-php": "3.*"} ,"autoload": {"files": ["registration.php"], "psr-4": {"Dfe\\Stripe\\": ""}} ,"keywords": [ "API"