Skip to content

Commit

Permalink
2.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Nov 12, 2017
1 parent a5020ad commit 3e437f4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
38 changes: 19 additions & 19 deletions Facade/Charge.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,11 @@ function capturePreauthorized($id, $a) {return (new T)->capture($id);}
* [Square] An example of a response to `POST /v2/customers/{customer_id}/cards`: https://mage2.pro/t/4652
* @override
* @see \Df\StripeClone\Facade\Charge::cardIdPrefix()
* @used-by \Df\StripeClone\Payer::usePreviousCard()
* @used-by \Df\StripeClone\Payer::tokenIsNew()
* @return string
*/
function cardIdPrefix() {return 'icard-';}

/**
* 2017-10-10
* Note 1.
* The method returns:
* `true` if $id is an ID of a previously saved bank card.
* `false` if $id is a new card token.
* Note 2.
* A card ID looks like «82e66bb3-36ab-51cd-45e7-f9f251c73b08» (36 characters)
* A token looks like «CBASENWtEICAkOK1sTnHg48psEAgAQ» (30 characters)
* «[Square] An example of a response to `POST /v2/customers/{customer_id}/cards`»: https://mage2.pro/t/4652
* @override
* @see \Df\StripeClone\Facade\Charge::isCardId()
* @used-by \Df\StripeClone\Payer::usePreviousCard()
* @param string $id
* @return bool
*/
function isCardId($id) {return 36 === strlen($id);}

/**
* 2017-10-08
* 2017-10-09
Expand Down Expand Up @@ -162,6 +144,24 @@ function refund($id, $a) {
]);
}

/**
* 2017-10-10
* Note 1.
* The method returns:
* `true` if $id is an ID of a previously saved bank card.
* `false` if $id is a new card token.
* Note 2.
* A card ID looks like «82e66bb3-36ab-51cd-45e7-f9f251c73b08» (36 characters)
* A token looks like «CBASENWtEICAkOK1sTnHg48psEAgAQ» (30 characters)
* «[Square] An example of a response to `POST /v2/customers/{customer_id}/cards`»: https://mage2.pro/t/4652
* @override
* @see \Df\StripeClone\Facade\Charge::tokenIsNew()
* @used-by \Df\StripeClone\Payer::tokenIsNew()
* @param string $id
* @return bool
*/
function tokenIsNew($id) {return 36 !== strlen($id);}

/**
* 2017-10-09 «Connect API v2 Reference» → «Endpoints» → «Transactions» → «VoidTransaction»
* https://docs.connect.squareup.com/api/connect/v2#endpoint-voidtransaction
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/square"
,"version": "2.0.7"
,"version": "2.0.8"
,"description": "Square Payments integration with Magento 2"
,"type": "magento2-module"
,"homepage": "https://mage2.pro/c/extensions/square"
Expand All @@ -11,7 +11,7 @@
"homepage": "https://mage2.pro/users/dmitry_fedyuk",
"role": "Developer"
}]
,"require": {"mage2pro/core": ">=3.2.40"}
,"require": {"mage2pro/core": ">=3.3.5"}
,"autoload": {"files": ["registration.php"], "psr-4": {"Dfe\\Square\\": ""}}
,"keywords": [
"API"
Expand Down

0 comments on commit 3e437f4

Please sign in to comment.