Skip to content

Commit

Permalink
Merge branch 'v2.22.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
zalazdi committed Feb 7, 2024
2 parents 7eb537c + 99e5041 commit f7d3c2a
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Co nowego w BluePayment?

## Wersja 2.22.5
- Poprawiliśmy wsparcie dla Magneto 2.4.6 (zmiana Zend -> Laminas).
- Poprawiliśmy problem z wyścigiem statusów.

## Wersja 2.22.4
- Od teraz skrypty JS nie są dołączane w przypadku wyłączonej metody płatności Autopay.
- Dodaliśmy tłumaczenie kanałów płatności w szczegółach zamówienia.
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG_EN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# What's new in BluePayment?

## Version 2.22.5
- We have fixed support for Magneto 2.4.6 (Zend -> Laminas change).
- We have fixed the problem with status race.

## Version 2.22.4
- From now on, JS scripts are not included when the Autopay payment method is disabled.
- We have added a translation of the payment channels in the order details.
Expand Down
14 changes: 8 additions & 6 deletions Helper/Webapi.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
use Magento\Store\Model\Store;
use Magento\Store\Model\StoreManagerInterface;
use SimpleXMLElement;
use Zend\Uri\Http;

/**
* Class Webapi
Expand All @@ -30,7 +29,7 @@ class Webapi extends Data
{
public const DEFAULT_HASH_SEPARATOR = '|';

/** @var Http */
/** @var \Zend\Uri\Http | \Laminas\Uri\Http */
public $zendUri;

/** @var CacheInterface */
Expand All @@ -53,7 +52,6 @@ class Webapi extends Data
* @param StoreManagerInterface $storeManager
* @param CacheInterface $cache
* @param SerializerInterface $serializer
* @param Http $zendUri
*/
public function __construct(
Context $context,
Expand All @@ -66,8 +64,7 @@ public function __construct(
Logger $logger,
StoreManagerInterface $storeManager,
CacheInterface $cache,
SerializerInterface $serializer,
Http $zendUri
SerializerInterface $serializer
) {
parent::__construct(
$context,
Expand All @@ -81,9 +78,14 @@ public function __construct(
$storeManager
);

$this->zendUri = $zendUri;
$this->cache = $cache;
$this->serializer = $serializer;

if (class_exists('\\Laminas\Uri\Http')) {
$this->zendUri = new \Laminas\Uri\Http();
} else {
$this->zendUri = new \Zend\Uri\Http();
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Model/Metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class Metadata
{
private const VERSION = '2.22.4';
private const VERSION = '2.22.5';

/** @var ProductMetadataInterface */
private $productMetadata;
Expand Down
7 changes: 1 addition & 6 deletions Model/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -1472,12 +1472,7 @@ private function hasOnlyFailureStatuses(
'transactions' => json_decode(json_encode($response), true),
]);

$transactions = $response->transactions->transaction;
if (!is_array($response->transactions->transaction)) {
$transactions = [$response->transactions->transaction];
}

foreach ($transactions as $transaction) {
foreach ($response->transactions->transaction as $transaction) {
$status = (string) $transaction->paymentStatus;

$this->bmLooger->info('PAYMENT:' . __LINE__, [
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "bluepayment-plugin/module-bluepayment",
"description": "Autopay payment gateway for Magento 2.",
"type": "magento2-module",
"version": "2.22.4",
"version": "2.22.5",
"require": {
"magento/framework": "^102||^103",
"magento/module-config": "^101.1",
Expand Down

0 comments on commit f7d3c2a

Please sign in to comment.