Skip to content

Commit

Permalink
1.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Dec 3, 2021
1 parent 819a51e commit 84bded3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
42 changes: 21 additions & 21 deletions Result.php
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
<?php
namespace Dfe\Qiwi;
use Magento\Framework\App\Response\Http as HttpResponse;
use Magento\Framework\App\Response\HttpInterface as IHttpResponse;
# 2017-09-12
/** @final Unable to use the PHP «final» keyword here because of the M2 code generation. */
class Result extends \Df\Framework\W\Result {
class Result extends \Df\Framework\W\Result\Xml {
/**
* 2017-09-13
* 2017-11-17
* We can use the PHP «final» keyword here,
* because the method is absent in @see \Magento\Framework\Controller\ResultInterface
* 2021-12-03
* @override
* @see \Df\Framework\W\Result::__toString()
* @used-by render()
* @used-by \Df\Payment\W\Action::execute()
* @return string
* @see \Df\Framework\W\Result\Xml::contents()
* @used-by \Df\Framework\W\Result\Xml::__toString()
* @return array(string => mixed)
*/
final function __toString() {return df_xml_g('result', ['result_code' => $this->_code]);}
protected function contents() {return ['result_code' => $this->_code];}

/**
* 2017-09-13
* 2017-09-13, 2021-12-03
* QIWI Wallet requires it to be «text/xml», not «application/xml»:
* https://github.com/QIWI-API/pull-payments-docs/blob/40d48cf0/_notification_en.html.md#requirements-to-the-response-for-notification
* @override
* @see \Df\Framework\W\Result::render()
* @used-by \Df\Framework\W\Result::renderResult()
* @param IHttpResponse|HttpResponse $r
* @see \Df\Framework\W\Result\Xml::contentType()
* @used-by \Df\Framework\W\Result\Xml::render()
* @return string
*/
protected function contentType() {return 'text/xml';}

/**
* 2021-12-03
* @override
* @see \Df\Framework\W\Result\Xml::tag()
* @used-by \Df\Framework\W\Result\Xml::__toString()
* @return string
*/
final protected function render(IHttpResponse $r) {
$r->setBody($this->__toString());
df_response_content_type('text/xml', $r);
}
final protected function tag() {return 'result';}

/**
* 2017-09-13
* @used-by __toString()
* @used-by contents()
* @used-by i()
* @var int
*/
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/qiwi"
,"version": "1.1.4"
,"version": "1.1.5"
,"description": "Visa QIWI Wallet (QIWI Кошелёк) integration with Magento 2"
,"type": "magento2-module"
,"homepage": "https://mage2.pro/c/extensions/qiwi"
Expand All @@ -11,7 +11,7 @@
"homepage": "https://mage2.pro/users/dmitry_fedyuk",
"role": "Developer"
}]
,"require": {"mage2pro/core": ">=4.3.2", "mage2pro/phone": ">=1.0.11"}
,"require": {"mage2pro/core": ">=8.0.0", "mage2pro/phone": ">=1.0.11"}
,"autoload": {"files": ["registration.php"], "psr-4": {"Dfe\\Qiwi\\": ""}}
,"keywords": [
"API"
Expand Down

0 comments on commit 84bded3

Please sign in to comment.