Skip to content

Commit

Permalink
code style
Browse files Browse the repository at this point in the history
  • Loading branch information
dtorras committed Mar 16, 2024
1 parent 9afd10a commit 79fda57
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
__DIR__ . '/src',
__DIR__ . '/tests',
])
->notName([
'RequestParameters.php',
'NotificationParameters.php',
])
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
Expand Down
1 change: 1 addition & 0 deletions src/RedsysRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public function sendPostRequest(): NotificationParameters|PostRequestError

try {
$redsysResponse->setParametersFromResponse($responseContents);

return $redsysResponse->checkResponse();
} catch (RedsysCodeException $exception) {
return new PostRequestError(
Expand Down
2 changes: 0 additions & 2 deletions src/RedsysResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ public function setParametersFromResponse(array $data): void
$this->originalEncodedMerchantParameters = $data['Ds_MerchantParameters'];
$this->merchantParametersArray = json_decode(urldecode(base64_decode(strtr($data['Ds_MerchantParameters'], '-_', '+/'))), true);
$this->receivedSignature = $data['Ds_Signature'];
// var_dump($this->merchantParametersArray);
// die('a');
$this->parameters = NotificationParameters::fromArray($this->merchantParametersArray);
}

Expand Down
3 changes: 1 addition & 2 deletions src/Support/PostRequestError.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ class PostRequestError
public function __construct(
public string $code,
public ?string $message,
)
{
) {
}
}
4 changes: 2 additions & 2 deletions tests/CredentialOnFileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@
);

$this->markTestSkipped('todo mock response');
// $postResponse = $redsysRequest->sendPostRequest();
// $this->assertTrue($postResponse instanceof \Creagia\Redsys\Support\NotificationParameters);
// $postResponse = $redsysRequest->sendPostRequest();
// $this->assertTrue($postResponse instanceof \Creagia\Redsys\Support\NotificationParameters);
});

0 comments on commit 79fda57

Please sign in to comment.