razorpay / razorpay-php

Razorpay PHP Library
MIT License
183 stars 126 forks source link

Array to string conversion Error on src/Request.php #338

Closed iankitpundir closed 1 year ago

iankitpundir commented 1 year ago

While creating order via order->create, It throw error "Array to string conversion" On file src/Request.php , throwServerError function on line number 147. protected function throwServerError($body, $httpStatusCode) { $description = "The server did not send back a well-formed response. " . PHP_EOL . "Server Response: $body"; // Here error through

    throw new Errors\ServerError(
        $description,
        ErrorCode::SERVER_ERROR,
        $httpStatusCode);
}

I think some how body should be treat as string but here is a array or object. checkErrors($response) -> throwServerError

ankitdas13 commented 1 year ago

@iankitpundir could you please provide us with the code snippet so we can debug the issue. also let us know what version of SDK you are using.

ankitdas13 commented 1 year ago

@iankitpundir Could you please let me know if it is resolved?

ankitdas13 commented 1 year ago

Closing this issue for now, due to not getting any response. let us know if you need any help and if the issue still persists then please reopen the issue