Skip to content

Commit

Permalink
Merge pull request #73 from hugofintecture/2.2.6
Browse files Browse the repository at this point in the history
2.2.6
  • Loading branch information
hugofintecture authored Apr 11, 2023
2 parents 59767e4 + b2a3f75 commit 4bc0481
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Controller/Standard/Send.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use chillerlan\QRCode\QRCode as QRCodeGenerator;
use Fintecture\Payment\Controller\FintectureAbstract;
use Fintecture\Util\Crypto;
use Magento\Framework\View\Element\Template;

class Send extends FintectureAbstract
Expand Down Expand Up @@ -39,8 +40,9 @@ public function execute()
throw new \Exception($pisToken->errorMsg);
}

$state = Crypto::encodeToBase64(['order_id' => $quote->getReservedOrderId()]);
/** @phpstan-ignore-next-line */
$apiResponse = $this->paymentMethod->pisClient->requestToPay->generate($data, 'fr');
$apiResponse = $this->paymentMethod->pisClient->requestToPay->generate($data, 'fr', null, $state);
if ($apiResponse->error) {
$this->fintectureLogger->error('Connect session', [
'message' => 'Error building connect URL',
Expand Down
5 changes: 3 additions & 2 deletions Model/Fintecture.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Fintecture extends AbstractMethod
{
public const CODE = 'fintecture';
public const CONFIG_PREFIX = 'payment/fintecture/';
public const MODULE_VERSION = '2.2.5';
public const MODULE_VERSION = '2.2.6';

private const PAYMENT_COMMUNICATION = 'FINTECTURE-';
private const REFUND_COMMUNICATION = 'REFUND FINTECTURE-';
Expand Down Expand Up @@ -788,8 +788,9 @@ private function getQRCodeRedirect(Quote $quote, array $data): array
throw new \Exception($pisToken->errorMsg);
}

$state = Crypto::encodeToBase64(['order_id' => $quote->getReservedOrderId()]);
/** @phpstan-ignore-next-line */
$apiResponse = $this->pisClient->requestToPay->generate($data, 'fr');
$apiResponse = $this->pisClient->requestToPay->generate($data, 'fr', null, $state);
if ($apiResponse->error) {
$this->fintectureLogger->error('Connect session', [
'message' => 'Error building connect URL',
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"email": "[email protected]"
},
"type": "magento2-module",
"version": "2.2.5",
"version": "2.2.6",
"license": [
"GPL-3.0"
],
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Fintecture_Payment" setup_version="2.2.5">
<module name="Fintecture_Payment" setup_version="2.2.6">
</module>
</config>

0 comments on commit 4bc0481

Please sign in to comment.