Skip to content

Commit

Permalink
https://github.com/mage2pro/core/issues/136
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Aug 19, 2020
1 parent a89be11 commit 09519eb
Show file tree
Hide file tree
Showing 21 changed files with 71 additions and 71 deletions.
18 changes: 9 additions & 9 deletions API/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace Dfe\TBCBank\API;
use Df\Payment\Settings\Proxy;
use Dfe\TBCBank\Settings as S;
// 2018-11-09
# 2018-11-09
final class Client extends \Df\API\Client {
/**
* 2018-11-11
Expand All @@ -12,12 +12,12 @@ final class Client extends \Df\API\Client {
*/
protected function _construct() {
parent::_construct();
// 2018-11-14
// A response looks like:
// «TRANSACTION_ID: jiqiowN8jjPx5+8+BLfZwv3PAhs=
// RESULT: FAILED
// RESULT_CODE: 102»
// It contains newlines.
# 2018-11-14
# A response looks like:
# «TRANSACTION_ID: jiqiowN8jjPx5+8+BLfZwv3PAhs=
# RESULT: FAILED
# RESULT_CODE: 102»
# It contains newlines.
$this->addFilterResBV('df_parse_colon'); /** @uses df_parse_colon() */
}

Expand Down Expand Up @@ -70,9 +70,9 @@ protected function verifyCertificate() {return false;}
* @return array(string => mixed)
*/
protected function zfConfig() {$s = dfps($this); /** @var S $s */ return [
// 2018-11-11 «Path to a PEM encoded SSL certificate»
# 2018-11-11 «Path to a PEM encoded SSL certificate»
'sslcert' => $s->certificate()
// 2018-11-11 «Path to a PEM encoded SSL certificate»
# 2018-11-11 «Path to a PEM encoded SSL certificate»
,'sslpassphrase' => $s->password()
/**
* 2018-11-11 «SSL transport layer (eg. 'sslv2', 'tls')».
Expand Down
2 changes: 1 addition & 1 deletion API/Facade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace Dfe\TBCBank\API;
use Df\Core\Exception as DFE;
use Dfe\TBCBank\W\Event;
// 2018-11-11
# 2018-11-11
/** @method static Facade s() */
final class Facade extends \Df\API\Facade {
/**
Expand Down
2 changes: 1 addition & 1 deletion API/Validator.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
namespace Dfe\TBCBank\API;
// 2018-11-09
# 2018-11-09
/** @used-by \Dfe\TBCBank\API\Client::responseValidatorC() */
final class Validator extends \Df\API\Response\Validator {
/**
Expand Down
2 changes: 1 addition & 1 deletion Block/Info.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Dfe\TBCBank\Block;
use Dfe\TBCBank\W\Event as E;
// 2018-11-12
# 2018-11-12
/** @final Unable to use the PHP «final» keyword here because of the M2 code generation. */
class Info extends \Df\StripeClone\Block\Info {
/**
Expand Down
2 changes: 1 addition & 1 deletion CardFormatter.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Dfe\TBCBank;
use Dfe\TBCBank\Facade\Card as C;
// 2018-11-12
# 2018-11-12
/** @method C c() */
final class CardFormatter extends \Df\StripeClone\CardFormatter {
/**
Expand Down
58 changes: 29 additions & 29 deletions Charge.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ protected function textFilter($s) {return df_translit($s);}
* @return array(string => mixed)
*/
private function common() {return [
// 2018-09-26 «transaction amount in fractional units, mandatory (up to 12 digits)»
# 2018-09-26 «transaction amount in fractional units, mandatory (up to 12 digits)»
'amount' => $this->amountF()
// 2018-11-22
// https://mail.google.com/mail/u/0/#inbox/KtbxLrjVmhsgbmXmbPwfTZjlgrJSSKJsVB
// https://www.upwork.com/messages/rooms/room_dedb1119e1f5f4d8e506b963f506d8e4/story_61f60dab05ae5325df50dbaaf6d28d03
# 2018-11-22
# https://mail.google.com/mail/u/0/#inbox/KtbxLrjVmhsgbmXmbPwfTZjlgrJSSKJsVB
# https://www.upwork.com/messages/rooms/room_dedb1119e1f5f4d8e506b963f506d8e4/story_61f60dab05ae5325df50dbaaf6d28d03
,'biller' => $this->description()
// 2018-09-26 «client’s IP address, mandatory (15 characters)»
# 2018-09-26 «client’s IP address, mandatory (15 characters)»
,'client_ip_addr' => df_visitor_ip()
// 2018-09-26 «transaction currency code (ISO 4217), mandatory, (3 digits)»
# 2018-09-26 «transaction currency code (ISO 4217), mandatory, (3 digits)»
,'currency' => df_currency_num($this->currencyC())
// 2018-09-26 «transaction details, optional (up to 125 characters)»
# 2018-09-26 «transaction details, optional (up to 125 characters)»
,'description' => $this->description()
];}

Expand All @@ -49,7 +49,7 @@ private function pCharge() {
$c = Action::sg($this->m())->preconfiguredToCapture();
$t = $this->s()->tokenization(); /** @var bool $t */
return $this->common() + [
// 2018-09-26 «identifies a request for transaction registration»
# 2018-09-26 «identifies a request for transaction registration»
'command' => !$c ? 'a' : ($t ? 'z' : 'v')
/**
* 2018-10-06
Expand All @@ -72,22 +72,22 @@ private function pCharge() {
*/
,'msg_type' => $c ? 'SMS' : 'DMS'
] + (!$t ? [] : [
// 2018-11-13
// «Выбранный ТСП идентификатор регулярного платежа.
// Окончательное значение идентификатора регулярных платежей
// формируется с помощью Merchant ID ТСП и значения указанного biller_client_id идентификатора.»
// Mandatory.
// https://mage2.pro/t/5740
# 2018-11-13
# «Выбранный ТСП идентификатор регулярного платежа.
# Окончательное значение идентификатора регулярных платежей
# формируется с помощью Merchant ID ТСП и значения указанного biller_client_id идентификатора.»
# Mandatory.
# https://mage2.pro/t/5740
'biller_client_id' => df_uid(10)
// 2018-11-13
// «Предельный срок действия регулярного платежа в формате ММГГ»
// Mandatory.
// https://mage2.pro/t/5740
# 2018-11-13
# «Предельный срок действия регулярного платежа в формате ММГГ»
# Mandatory.
# https://mage2.pro/t/5740
,'perspayee_expiry' => '1299'
// 2018-11-13
// «Используется для генерации нового шаблона регулярного (рекуррентного) платежа»
// Mandatory.
// https://mage2.pro/t/5740
# 2018-11-13
# «Используется для генерации нового шаблона регулярного (рекуррентного) платежа»
# Mandatory.
# https://mage2.pro/t/5740
,'perspayee_gen' => 1
]);
}
Expand All @@ -107,13 +107,13 @@ static function p(Method $m = null) {return (new self($m ?: dfpm(__CLASS__)))->p
* @return array(string => mixed)
*/
static function pNew(Method $m) {$i = new self($m); /** @var self $i */ return $i->common() + [
// 2018-11-13
// «Выбранный ТСП идентификатор регулярного платежа.
// Окончательное значение идентификатора регулярных платежей
// формируется с помощью Merchant ID ТСП и значения указанного biller_client_id идентификатора.»
// Mandatory.
// https://mage2.pro/t/5740
# 2018-11-13
# «Выбранный ТСП идентификатор регулярного платежа.
# Окончательное значение идентификатора регулярных платежей
# формируется с помощью Merchant ID ТСП и значения указанного biller_client_id идентификатора.»
# Mandatory.
# https://mage2.pro/t/5740
'biller_client_id' => $i->token()
,'command' => 'e' // 2018-11-14 «Повторное списание регулярного платежа»
,'command' => 'e' # 2018-11-14 «Повторное списание регулярного платежа»
];}
}
2 changes: 1 addition & 1 deletion Facade/Card.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Dfe\TBCBank\Facade;
use Dfe\TBCBank\W\Event as E;
// 2018-11-12
# 2018-11-12
final class Card extends \Df\StripeClone\Facade\Card {
/**
* 2018-11-12
Expand Down
2 changes: 1 addition & 1 deletion Facade/Charge.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use Df\API\Operation;
use Dfe\TBCBank\API\Facade as F;
use Dfe\TBCBank\W\Event as Ev;
// 2018-11-09
# 2018-11-09
/** @method \Dfe\TBCBank\Method m() */
final class Charge extends \Df\StripeClone\Facade\Charge {
/**
Expand Down
2 changes: 1 addition & 1 deletion Facade/Customer.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
namespace Dfe\TBCBank\Facade;
// 2018-11-09
# 2018-11-09
/** @method \Dfe\TBCBank\Settings ss() */
final class Customer extends \Df\StripeClone\Facade\Customer {
/**
Expand Down
2 changes: 1 addition & 1 deletion Facade/O.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Dfe\TBCBank\Facade;
use Df\API\Operation;
// 2018-11-09
# 2018-11-09
final class O extends \Df\StripeClone\Facade\O {
/**
* 2018-11-09
Expand Down
2 changes: 1 addition & 1 deletion Facade/Refund.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Dfe\TBCBank\Facade;
use Df\API\Operation;
// 2018-11-09
# 2018-11-09
final class Refund extends \Df\StripeClone\Facade\Refund {
/**
* 2018-11-09
Expand Down
2 changes: 1 addition & 1 deletion Init.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Magento\Quote\Api\Data\PaymentInterface as IQP;
use Magento\Quote\Model\Quote\Address as QA;
use Magento\Quote\Model\Quote\Payment as QP;
// 2018-09-28
# 2018-09-28
final class Init {
/**
* 2018-09-28 $cartId is a string like «63b25f081bfb8e4594725d8a58b012f7» for guests.
Expand Down
2 changes: 1 addition & 1 deletion Method.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace Dfe\TBCBank;
use Df\Payment\Token;
use Magento\Sales\Model\Order\Payment\Transaction as T;
// 2018-09-26
# 2018-09-26
/** @method Settings s() */
final class Method extends \Df\StripeClone\Method {
/**
Expand Down
2 changes: 1 addition & 1 deletion Settings.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Dfe\TBCBank;
use Df\Payment\Settings\Proxy;
// 2018-09-26
# 2018-09-26
/** @method static Settings s() */
final class Settings extends \Df\Payment\Settings\BankCard {
/**
Expand Down
2 changes: 1 addition & 1 deletion Test/CaseT/CheckResult.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Dfe\TBCBank\Test\CaseT;
use Dfe\TBCBank\API\Facade as F;
// 2018-09-27
# 2018-09-27
final class CheckResult extends \Dfe\TBCBank\Test\CaseT {
/** @test 2018-09-27 */
function t00() {}
Expand Down
18 changes: 9 additions & 9 deletions Test/CaseT/Init.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace Dfe\TBCBank\Test\CaseT;
use Dfe\TBCBank\API\Facade as F;
use Zend_Http_Client as Z;
// 2018-09-26
# 2018-09-26
final class Init extends \Dfe\TBCBank\Test\CaseT {
/** 2018-09-26 */
function t00() {}
Expand Down Expand Up @@ -31,13 +31,13 @@ function t03() {echo df_currency_num('GEL') . ' ' . gettype(df_currency_num('GEL

/** @test 2018-11-11 */
function t04() {echo F::s()->init([
// 2018-09-26 «transaction amount in fractional units, mandatory (up to 12 digits)»
# 2018-09-26 «transaction amount in fractional units, mandatory (up to 12 digits)»
'amount' => 100
// 2018-09-26 «client’s IP address, mandatory (15 characters)»
# 2018-09-26 «client’s IP address, mandatory (15 characters)»
,'client_ip_addr' => df_visitor_ip()
,'command' => 'v'
,'currency' => 981 // 2018-09-26 «transaction currency code (ISO 4217), mandatory, (3 digits)»
,'description' => 'UFCTEST' // 2018-09-26 «transaction details, optional (up to 125 characters)»
,'currency' => 981 # 2018-09-26 «transaction currency code (ISO 4217), mandatory, (3 digits)»
,'description' => 'UFCTEST' # 2018-09-26 «transaction details, optional (up to 125 characters)»
,'msg_type' => 'SMS'
]);}

Expand All @@ -48,13 +48,13 @@ function t04() {echo F::s()->init([
* @return string
*/
private function transId() {return F::s()->init([
// 2018-09-26 «transaction amount in fractional units, mandatory (up to 12 digits)»
# 2018-09-26 «transaction amount in fractional units, mandatory (up to 12 digits)»
'amount' => 100
// 2018-09-26 «client’s IP address, mandatory (15 characters)»
# 2018-09-26 «client’s IP address, mandatory (15 characters)»
,'client_ip_addr' => df_visitor_ip()
,'command' => 'v'
,'currency' => 981 // 2018-09-26 «transaction currency code (ISO 4217), mandatory, (3 digits)»
,'description' => 'UFCTEST' // 2018-09-26 «transaction details, optional (up to 125 characters)»
,'currency' => 981 # 2018-09-26 «transaction currency code (ISO 4217), mandatory, (3 digits)»
,'description' => 'UFCTEST' # 2018-09-26 «transaction details, optional (up to 125 characters)»
,'msg_type' => 'SMS'
]);}
}
14 changes: 7 additions & 7 deletions Test/CaseT/Regular.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Dfe\TBCBank\Test\CaseT;
use Dfe\TBCBank\API\Facade as F;
// 2018-11-09
# 2018-11-09
final class Regular extends \Dfe\TBCBank\Test\CaseT {
/** @test 2018-11-09 */
function t00() {}
Expand Down Expand Up @@ -30,15 +30,15 @@ function t04() {echo df_json_encode([df_year(), df_month()]);}
* @return string
*/
private function transId() {return F::s()->initRegular([
// 2018-09-26 «transaction amount in fractional units, mandatory (up to 12 digits)»
# 2018-09-26 «transaction amount in fractional units, mandatory (up to 12 digits)»
'amount' => 100
,'biller_client_id' => df_uid() // 2018-11-09 «merchant-selected regular payment identifier»
// 2018-09-26 «client’s IP address, mandatory (15 characters)»
,'biller_client_id' => df_uid() # 2018-11-09 «merchant-selected regular payment identifier»
# 2018-09-26 «client’s IP address, mandatory (15 characters)»
,'client_ip_addr' => df_visitor_ip()
,'command' => 'z'
,'currency' => 981 // 2018-09-26 «transaction currency code (ISO 4217), mandatory, (3 digits)»
,'description' => 'UFCTEST' // 2018-09-26 «transaction details, optional (up to 125 characters)»
,'perspayee_expiry' => '0199' // 2018-11-09 «preferred deadline for a regular payment MMYY»
,'currency' => 981 # 2018-09-26 «transaction currency code (ISO 4217), mandatory, (3 digits)»
,'description' => 'UFCTEST' # 2018-09-26 «transaction details, optional (up to 125 characters)»
,'perspayee_expiry' => '0199' # 2018-11-09 «preferred deadline for a regular payment MMYY»
,'perspayee_gen' => 1
,'perspayee_overwrite' => 1
,'msg_type' => 'SMS'
Expand Down
2 changes: 1 addition & 1 deletion Test/CaseT/Validator.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
namespace Dfe\TBCBank\Test\CaseT;
// 2018-11-11
# 2018-11-11
final class Validator extends \Dfe\TBCBank\Test\CaseT {
/** @test 2018-11-11 */
function t00() {}
Expand Down
2 changes: 1 addition & 1 deletion W/Event.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Dfe\TBCBank\W;
use Df\Payment\Init\Action as A;
// 2018-09-27
# 2018-09-27
final class Event extends \Df\StripeClone\W\Event {
/**
* 2018-11-12
Expand Down
2 changes: 1 addition & 1 deletion W/Handler.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
namespace Dfe\TBCBank\W;
// 2018-11-13
# 2018-11-13
final class Handler extends \Df\Payment\W\Handler {
/**
* 2018-11-13
Expand Down
2 changes: 1 addition & 1 deletion W/Reader.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Dfe\TBCBank\W;
use Dfe\TBCBank\API\Facade as F;
// 2018-09-27
# 2018-09-27
final class Reader extends \Df\Payment\W\Reader {
/**
* 2018-09-27
Expand Down

0 comments on commit 09519eb

Please sign in to comment.