Closed Swahjak closed 7 years ago
Found another issue in the same method:
$httpResponse = $this->sendRequest(
'POST',
'/orders/' . $data['id'] . '/refunds',
$data
);
This should be
$httpResponse = $this->sendRequest(
'POST',
'/orders/' . $data['id'] . '/refunds',
null,
$data
);
Since the endpoint expects JSON. Added this fix to the pull request as well.
All other Rest Requests seem to use
$httpResponse->json()
. This (RestRefundRequest) causes the following error when usingRestAbstractResponse::isSuccessful
since it expects an array as dataif (! isset($this->data['success'])) {
:PHP Fatal error: Uncaught Error: Cannot use object of type Guzzle\\Http\\Message\\Response as array in /var/www/vendor/omnipay/multisafepay/src/Message/RestAbstractResponse.php:25
Will submit a pull request asap.