Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2E update #992

Merged
merged 111 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
f465a4b
Merge pull request #937 from mollie/develop
GytisZum Jun 10, 2024
0fc66b8
PIPRES-427: ideal v2 improvements
GytisZum Jun 11, 2024
853065e
PIPRES-427: related data with issuers deleted
GytisZum Jun 11, 2024
9200e40
PIPRES-427: removed issuers from payment data
GytisZum Jun 11, 2024
0d61764
PIPRES-443: performance improvements
GytisZum Jun 18, 2024
f103a6f
Merge pull request #938 from GytisZum/PIPRES-427/ideal-v2
GytisZum Jun 18, 2024
162eb30
Update Upgrade-6.2.1.php
GytisZum Jun 25, 2024
b119af5
Update mollie.php
GytisZum Jun 25, 2024
98c174e
PIPRES-445: HTTP status handling improvements
GytisZum Jun 26, 2024
1ecdcdc
cs fixer file reverted
GytisZum Jun 26, 2024
084001d
PIPRES-441: new payment methods added and giropay method deleted
GytisZum Jul 3, 2024
0cb9e13
Merge pull request #945 from mollie/release-6.2.1
GytisZum Jul 3, 2024
16143fe
not needed changes deleted
GytisZum Jul 3, 2024
d788296
PIPRES-449: mobile phone fix then field is removed
GytisZum Jul 8, 2024
9dd7463
removed unused use statement
GytisZum Jul 8, 2024
3b88829
php cs fixer fix
GytisZum Jul 8, 2024
dfccc8c
cs fixer
GytisZum Jul 8, 2024
3a0c25c
Merge pull request #951 from GytisZum/PIPRES-449/mobile-phone-format-fix
GytisZum Jul 9, 2024
0a51a8e
Merge pull request #950 from GytisZum/new-methods-implementation
GytisZum Jul 9, 2024
c7b945c
Merge branch 'release-6.2.2' into PIPRES-445/http-status
GytisZum Jul 9, 2024
ebe09a3
Merge pull request #946 from GytisZum/PIPRES-445/http-status
GytisZum Jul 9, 2024
9724683
Merge pull request #954 from GytisZum/PIPRES-443/performance-improvement
GytisZum Jul 9, 2024
a585439
logs added to track installation progress
GytisZum Jul 16, 2024
b5d1c8e
logs added
GytisZum Jul 16, 2024
29643e0
Merge branch 'release-6.2.2' of github.com:mollie/PrestaShop into PIP…
GytisZum Jul 16, 2024
5629bb8
Merge pull request #957 from GytisZum/PIPRES-442/upgrade-logs
GytisZum Jul 16, 2024
8a25f8b
version bump and changelog updated
GytisZum Jul 16, 2024
e8a08ed
Merge pull request #958 from GytisZum/version-bump
GytisZum Jul 16, 2024
68f873d
component link fix
GytisZum Jul 16, 2024
bbb0fc1
Merge pull request #959 from GytisZum/PIPRES-453/component-link-fix
GytisZum Jul 22, 2024
0e95a5f
Merge pull request #955 from mollie/release-6.2.2
GytisZum Jul 30, 2024
7357931
fix order states installation
GytisZum Jul 30, 2024
99da2a5
Merge branch 'master' of github.com:GytisZum/mollie into release-6.2.3
GytisZum Jul 30, 2024
e72d8d4
version bump
GytisZum Jul 30, 2024
ba6ca1b
Merge pull request #960 from GytisZum/release-6.2.3
GytisZum Jul 30, 2024
4d844cc
invalid format for phone field fix
GytisZum Aug 5, 2024
8b53c01
PIPRES-461: Number utility service refactoring
GytisZum Aug 13, 2024
eea16d9
Merge pull request #962 from GytisZum/PIPRES-450/phone-input-validati…
GytisZum Aug 19, 2024
9731aa2
multishop improvements
GytisZum Aug 28, 2024
118987d
italian transklations
GytisZum Aug 28, 2024
ff78ed5
translations updated
GytisZum Aug 28, 2024
440d9fd
deleted not needed files
GytisZum Aug 28, 2024
6f7b317
Go through all combination attributes to check subscription interval
zorrobiwan Aug 28, 2024
a83b36d
Cs fixer
GytisZum Sep 3, 2024
3fe458c
Merge pull request #964 from mollie/PIPRES-457/it-translations
GytisZum Sep 3, 2024
3460fe1
Merge pull request #963 from GytisZum/multishop-improvements
GytisZum Sep 3, 2024
15a4699
PIPRES-462: Logging improvements
GytisZum Sep 3, 2024
87706d6
fixed modal view
GytisZum Sep 3, 2024
dadd12c
cs fixer
GytisZum Sep 3, 2024
0e227b1
cs fixer
GytisZum Sep 3, 2024
c34ac74
stan fix
GytisZum Sep 3, 2024
a177540
cs fixer
GytisZum Sep 3, 2024
4633e38
stan fix
GytisZum Sep 3, 2024
42147bf
Merge pull request #967 from GytisZum/PIPRES-6.2.3/number-utility-ser…
GytisZum Sep 4, 2024
aeccb84
Merge branch 'release-6.2.3' of github.com:mollie/PrestaShop into PIP…
GytisZum Sep 4, 2024
6d60a26
apple pay fix
GytisZum Sep 9, 2024
0ad2305
export logs functionality
GytisZum Sep 10, 2024
13cbbc9
Merge pull request #969 from mollie/apple-pay-fix
GytisZum Sep 16, 2024
b634575
front controller logging added
GytisZum Sep 16, 2024
92a2704
logging improvements
GytisZum Sep 17, 2024
2ebd7d2
it translations updated
GytisZum Sep 17, 2024
74fbdb2
licence header added
GytisZum Sep 17, 2024
b6ea02e
php stan fix
GytisZum Sep 17, 2024
27c7b9c
php cs fixer
GytisZum Sep 17, 2024
28fd607
Merge pull request #971 from mollie/PIPRES-457/updated-it-translations
GytisZum Sep 17, 2024
3f2bd2c
Merge pull request #970 from mollie/PIPRES-462/front_controllers_logg…
GytisZum Sep 17, 2024
0c34870
PHP formating and add default for $interval
zorrobiwan Sep 17, 2024
edd67a6
apple pay fix
GytisZum Sep 24, 2024
1312a11
cs fixer and stan fixes
GytisZum Sep 24, 2024
3cf3664
Merge pull request #975 from mollie/PIPRES-471/apple-pay
GytisZum Oct 1, 2024
3aed3c9
Merge pull request #966 from zorrobiwan/master
GytisZum Oct 1, 2024
7b44c00
Merge pull request #968 from mollie/PIPRES-462/logger-feature
GytisZum Oct 1, 2024
652487a
changelog updated
GytisZum Oct 1, 2024
7784bf1
tabs fix during upgrade
GytisZum Oct 1, 2024
5c8b1d3
cs fix
GytisZum Oct 1, 2024
4616009
Merge pull request #976 from mollie/tab-register-fix
GytisZum Oct 1, 2024
0b35b93
tab position fix
GytisZum Oct 1, 2024
2d85c6c
allow alma to have order api
GytisZum Oct 1, 2024
b123cd3
improved payment api request
GytisZum Oct 2, 2024
d6f8efa
stan fix
GytisZum Oct 2, 2024
1cd57dc
Merge pull request #977 from mollie/PIPRES-473/alma-order-api
GytisZum Oct 2, 2024
611d5c7
PIPRES-475: delivery address column name in subscription tab
GytisZum Oct 7, 2024
60e656c
Merge pull request #979 from mollie/PIPRES-475/column-name
GytisZum Oct 7, 2024
a0f29a3
PIPRES-459: Github workflow improvements
GytisZum Oct 7, 2024
cc8410f
changelog added
GytisZum Oct 7, 2024
1a2c12c
cancel workflow removed due to permission issues
GytisZum Oct 7, 2024
9ec3976
htaccess copy removed
GytisZum Oct 7, 2024
1e68eff
removed not needed file from workflow zip creation
GytisZum Oct 7, 2024
2b91db7
Merge pull request #981 from mollie/test-pr
GytisZum Oct 7, 2024
dbcf634
fixed number utility for low ps version
GytisZum Oct 9, 2024
091fe1c
Merge pull request #982 from mollie/number-utility-fix
GytisZum Oct 15, 2024
2e34177
Merge pull request #961 from mollie/release-6.2.3
GytisZum Oct 15, 2024
53ec4d7
PIPRES-483/ satispay payment method added
GytisZum Nov 5, 2024
b07edec
PIPRES:482/paybybank payment method added
GytisZum Nov 5, 2024
7a5db6a
php cs fixer fix
GytisZum Nov 5, 2024
27fbd81
php cs fixer
GytisZum Nov 5, 2024
f5685dd
Merge pull request #986 from mollie/PIPRES-483/satispay-implementation
GytisZum Nov 6, 2024
440d2d6
Merge pull request #987 from mollie/PIPRES-482/paybybank-method-imple…
GytisZum Nov 6, 2024
8efb374
updated pull request template
GytisZum Nov 6, 2024
57b9dad
Merge branch 'PIPRES-459/github-workflow-improvements' of github.com:…
GytisZum Nov 6, 2024
9da9071
Update pull_request_template.md
GytisZum Nov 6, 2024
5e06bd1
Merge pull request #980 from mollie/PIPRES-459/github-workflow-improv…
GytisZum Nov 7, 2024
78a59b3
changlog and version bump
GytisZum Nov 7, 2024
02aa8a6
removed conflicting dependency
GytisZum Nov 11, 2024
d45dd80
modified zip creation
GytisZum Nov 12, 2024
0fd6926
upload artifact version increase
Nov 15, 2024
02a0ca4
fix
Nov 15, 2024
874d2b6
fix
Nov 15, 2024
507dcc9
fix
Nov 15, 2024
a619c24
test przelewy24 update
Nov 15, 2024
2501eff
fix
Nov 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PIPRES-445: HTTP status handling improvements
  • Loading branch information
GytisZum committed Jun 26, 2024
commit 98c174e7b4c430627c1456392dcda907b8d4228f
15 changes: 0 additions & 15 deletions .php-cs-fixer.dist.php

This file was deleted.

3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ npm-package-install:
prepare-zip:
composer install --no-dev --optimize-autoloader --classmap-authoritative
composer dump-autoload --no-dev --optimize --classmap-authoritative
cp .github/.htaccess vendor/.htaccess
rm -rf .git .docker .editorconfig .github tests .php-cs-fixer.php Makefile cypress .docker cypress.config.js cypress.env.json docker-compose*.yml .gitignore bin codeception.yml package-lock.json package.json .php_cs.dist .php-cs-fixer.dist
rm -rf .git .docker .editorconfig .github tests .php-cs-fixer.php Makefile cypress .docker cypress.config.js cypress.env.json docker-compose*.yml .gitignore bin codeception.yml package-lock.json package.json .php_cs.dist .php-cs-fixer.dist .php-cs-fixer.dist.php



Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

# Changelog #

## Changes in release 6.2.2 ##
+ Error handling improvements

## Changes in release 6.2.1 ##
+ Ideal v2 payment method improvement

Expand Down
44 changes: 28 additions & 16 deletions controllers/front/webhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
*/

use Mollie\Adapter\ToolsAdapter;
use Mollie\Api\Exceptions\ApiException;
use Mollie\Controller\AbstractMollieController;
use Mollie\Errors\Http\HttpStatusCode;
use Mollie\Exception\TransactionException;
use Mollie\Handler\ErrorHandler\ErrorHandler;
use Mollie\Infrastructure\Response\JsonResponse;
use Mollie\Logger\PrestaLoggerInterface;
Expand Down Expand Up @@ -50,9 +52,6 @@ public function initContent(): void
/** @var PrestaLoggerInterface $logger */
$logger = $this->module->getService(PrestaLoggerInterface::class);

/** @var ErrorHandler $errorHandler */
$errorHandler = $this->module->getService(ErrorHandler::class);

/** @var ToolsAdapter $tools */
$tools = $this->module->getService(ToolsAdapter::class);

Expand Down Expand Up @@ -95,20 +94,12 @@ public function initContent(): void

try {
$this->executeWebhook($transactionId);
} catch (ApiException $exception) {
$this->handleException($exception, HttpStatusCode::HTTP_BAD_REQUEST, 'Api request failed');
} catch (TransactionException $exception) {
$this->handleException($exception, $exception->getCode(), 'Failed to handle transaction');
} catch (\Throwable $exception) {
$logger->error('Failed to handle webhook', [
'Exception message' => $exception->getMessage(),
'Exception code' => $exception->getCode(),
]);

$errorHandler->handle($exception, $exception->getCode(), false);

$this->releaseLock();

$this->ajaxResponse(JsonResponse::error(
$this->module->l('Failed to handle webhook', self::FILE_NAME),
$exception->getCode()
));
$this->handleException($exception, HttpStatusCode::HTTP_BAD_REQUEST, 'Failed to handle webhook');
}

$this->releaseLock();
Expand Down Expand Up @@ -158,4 +149,25 @@ private function setContext(int $cartId): void

$this->context->cart = $cart;
}

private function handleException(\Throwable $exception, int $httpStatusCode, string $logMessage): void
{
/** @var PrestaLoggerInterface $logger */
$logger = $this->module->getService(PrestaLoggerInterface::class);

/** @var ErrorHandler $errorHandler */
$errorHandler = $this->module->getService(ErrorHandler::class);

$logger->error($logMessage, [
'Exception message' => $exception->getMessage(),
'Exception code' => $httpStatusCode
]);

$errorHandler->handle($exception, $httpStatusCode, false);
$this->releaseLock();
$this->ajaxResponse(JsonResponse::error(
$this->module->l('Failed to handle webhook', self::FILE_NAME),
$httpStatusCode
));
}
}