Skip to content

Commit bffb32e

Browse files
Support for Prestashop 9 (#43)
Fixed - Support for Prestashop 9.0
1 parent 5b9dd99 commit bffb32e

21 files changed

+320
-136
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ jobs:
1414
- php-version: '7.2'
1515
- php-version: '7.3'
1616
- php-version: '7.4'
17-
- php-version: '8.0'
18-
- php-version: '8.1'
19-
- php-version: '8.2'
20-
- php-version: '8.3'
2117
runs-on: ubuntu-latest
2218

2319
steps:
@@ -44,4 +40,4 @@ jobs:
4440
run: composer require php-parallel-lint/php-parallel-lint
4541

4642
- working-directory: dev-tools
47-
run: ./vendor/bin/parallel-lint ..
43+
run: ./vendor/bin/parallel-lint --exclude ../src/Util/Logger/PsrLoggerV3.php ..

.github/workflows/ci8.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Continuous integration
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
check:
8+
name: PHP ${{ matrix.php-version }}
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
include:
13+
- php-version: '8.0'
14+
- php-version: '8.1'
15+
- php-version: '8.2'
16+
- php-version: '8.3'
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
22+
- uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: ${{ matrix.php-version }}
25+
extensions: none, curl, json, mbstring
26+
coverage: none
27+
28+
- id: composer-cache
29+
shell: bash
30+
run: echo "dir=$(composer config cache-dir)" >> $GITHUB_OUTPUT
31+
32+
- uses: actions/cache@v3
33+
with:
34+
path: ${{ steps.composer-cache.outputs.dir }}
35+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
36+
37+
- run: mkdir dev-tools
38+
39+
- working-directory: dev-tools
40+
run: composer require php-parallel-lint/php-parallel-lint
41+
42+
- working-directory: dev-tools
43+
run: ./vendor/bin/parallel-lint ..

CHANGELOG.MD

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.10.6]
9+
10+
### Fixed
11+
12+
- Support for Prestashop 9.0
13+
814
## [1.10.5]
915

1016
### Added

config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<module>
33
<name>tpay</name>
44
<displayName><![CDATA[Tpay]]></displayName>
5-
<version><![CDATA[1.8.0]]></version>
5+
<version><![CDATA[1.10.6]]></version>
66
<description><![CDATA[Accepting online payments]]></description>
77
<author><![CDATA[Krajowy Integrator Płatności S.A.]]></author>
88
<tab><![CDATA[payments_gateways]]></tab>

config/common.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ services:
6161
tpay.services.auto_cancel:
6262
class: Tpay\Service\AutoCancelService
6363
public: true
64-
lazy: true
6564
arguments:
6665
- "@tpay.repository.transaction"
6766
- "@tpay"

config/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ doctrine:
44
TpayPaymentModule:
55
type: annotation
66
is_bundle: false
7-
dir: "%kernel.root_dir%/../modules/tpay/src/Entity"
7+
dir: "%kernel.project_dir%/modules/tpay/src/Entity"
88
prefix: Tpay\Entity
99
alias: Tpay

config_pl.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<module>
33
<name>tpay</name>
44
<displayName><![CDATA[Tpay]]></displayName>
5-
<version><![CDATA[1.10.4]]></version>
5+
<version><![CDATA[1.10.6]]></version>
66
<description><![CDATA[Przyjmowanie płatności online]]></description>
77
<author><![CDATA[Krajowy Integrator Płatności S.A.]]></author>
88
<tab><![CDATA[payments_gateways]]></tab>

controllers/front/ajax.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function renderFragment($tpayPayment): void
129129
{
130130
ob_end_clean();
131131
header('Content-Type: application/json');
132-
$this->ajaxDie(
132+
$this->ajaxRender(
133133
json_encode(
134134
[
135135
'cart_summary_subtotals_container' => $this->render('checkout/_partials/cart-summary-subtotals'),

controllers/front/chargeBlik.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function blik0Status($transactionId)
9797
{
9898
$result = $this->waitForBlikAccept($transactionId, 0);
9999

100-
$this->ajaxDie(
100+
$this->ajaxRender(
101101
json_encode([
102102
'status' => $result['status'],
103103
'result' => $result
@@ -141,7 +141,7 @@ public function createTransaction($address, $customer, $context, $cart, $order)
141141
$this->createTransactionInDb($transaction, $order->id, false);
142142
}
143143

144-
$this->ajaxDie(
144+
$this->ajaxRender(
145145
json_encode([
146146
'status' => $transaction['status'],
147147
'backUrl' => $this->module->getContext()->link->getModuleLink(
@@ -175,7 +175,7 @@ public function payBlikTransaction($transactionId)
175175
$result['status'] = 'error';
176176
}
177177

178-
$this->ajaxDie(
178+
$this->ajaxRender(
179179
json_encode([
180180
'result' => $result['status'],
181181
])
@@ -364,7 +364,7 @@ private function payByTransfer($address, $customer, $context, $cart, $order, str
364364
$transaction = $this->module->api->transactions()->createTransaction($transactionParams);
365365

366366
if (!isset($transaction['transactionPaymentUrl'])) {
367-
$this->ajaxDie(
367+
$this->ajaxRender(
368368
json_encode([
369369
'status' => 'error'
370370
])
@@ -379,7 +379,7 @@ private function payByTransfer($address, $customer, $context, $cart, $order, str
379379
$this->updateTransactionInDb($transaction, $order->id, $oldTransactionId, 'transfer');
380380
}
381381

382-
$this->ajaxDie(
382+
$this->ajaxRender(
383383
json_encode([
384384
'status' => 'correct',
385385
'payment_url' => $transaction['transactionPaymentUrl']

controllers/front/savedCards.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,6 @@ public function displayAjaxDeleteCard()
6565
(int) $this->context->customer->id
6666
);
6767

68-
$this->ajaxDie(json_encode(['results' => $delete ? 'error' : 'success']));
68+
$this->ajaxRender(json_encode(['results' => $delete ? 'error' : 'success']));
6969
}
7070
}

0 commit comments

Comments
 (0)