I use PayPal-PHP-Server-SDK. When I make requests from my localhost, I get responses without errors (orders create, orders capture). But on hosting in orders capture, I get the error "broken content-length header". On localhost I use Apache, in hosting nginx. I noticed that the localhost response headers use "transfer-encoding: chunked" instead of "content-length". May be this is reason of the error, but I don't know how I can fix it. This is my simple code for this: function captureOrder($orderID)
{
$client = getClient();
$captureBody = [
'id' => $orderID
];
$apiResponse = $client->getOrdersController()->ordersCapture($captureBody);
return handleResponse($apiResponse);
}
... View more