Skip to content

Commit

Permalink
Fix way of getting blik code from request
Browse files Browse the repository at this point in the history
  • Loading branch information
Grzegorz Kozinski authored and Grzegorz Kozinski committed Sep 27, 2023
1 parent 864fcc1 commit 69b7515
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Provider/BlikModel/BlikModelProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ public function provideDataToBlikModel(?string $blikCode): BlikModelInterface
if (null !== $blikCode) {
return $this->blikModelFactory->create($blikCode, $request->getClientIp());
}

/** @var array $requestData */
$requestData = $request->request->all();
/** @var array $blikData */
$blikData = $request->request->get('sylius_checkout_complete');
$blikData = $requestData['sylius_checkout_complete'];
$blikCode = $blikData['blik_code'];
if (!$blikCode) {
throw new BlikNoDataException('The Blik data has not been entered');
Expand Down

0 comments on commit 69b7515

Please sign in to comment.