Skip to content

Commit

Permalink
Always return response as raw data
Browse files Browse the repository at this point in the history
  • Loading branch information
boboldehampsink committed Oct 17, 2023
1 parent 450f34a commit 76dc923
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
'yoda_style' => false,
'no_superfluous_phpdoc_tags' => false,
'multiline_whitespace_before_semicolons' => false,
'global_namespace_import' => false,
'single_line_empty_body' => false,
])
->setCacheFile(__DIR__.'/.php_cs.cache')
->setFinder($finder);
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.1.3 - 2023-10-17

### Fixed
- Always return response as raw data

## 1.1.2 - 2022-09-22

### Changed
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "robuust/craft-commerce-pay",
"description": "PAY integration for Craft Commerce 4.0+",
"version": "1.1.2",
"version": "1.1.3",
"type": "craft-plugin",
"keywords": [
"pay",
Expand Down
1 change: 1 addition & 0 deletions src/gateways/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ public function supportsWebhooks(): bool
public function processWebHook(): Response
{
$response = Craft::$app->getResponse();
$response->format = Response::FORMAT_RAW;

$transactionHash = $this->getTransactionHashFromWebhook();
$transaction = Commerce::getInstance()->getTransactions()->getTransactionByHash($transactionHash);
Expand Down

0 comments on commit 76dc923

Please sign in to comment.