In our webabb we ask user to preauth the total amount of an order. Then the order is evaded a small piece at time, and at each step it is captured only a portion of the total. We actually cannot capture server side in php. We got { "name":"NOT_AUTHORIZED", "message":"Authorization failed due to insufficient permissions.", "debug_id":"45a665de305d5", "details":[ { "issue":"PERMISSION_DENIED", "description":"You do not have permission to access or perform operations on this resource." } ], "links":[ { "href":"https://developer.paypal.com/docs/api/payments/v2/#error-PERMISSION_DENIED", "rel":"information_link" } ] } What does this mean!? The PHP code is $paypal_request = new AuthorizationsCaptureRequest($paypal_authorization_id); $paypal_request->prefer('return=representation'); $paypal_request->body = json_encode([ 'invoice_id' => $order->full_number, 'note_to_payer' => "Order " . $order->full_number, "amount" => [ "currency_code" => "EUR", "value" => $order->gross_evaded ], "final_capture" => $final_capture_flag ]); $client = $this->paypalClient(); $response = $client->execute($paypal_request); THE SAME CALL IS WORKING USING POSTMAN ---- I tried to call {{HOST}}/v2/payments/authorizations/{{AUTHORIZATION_ID}}/capture using postman. I used basic auth with same client id and client secret used in webapp. Used sandbox host and same authorization_id I sent this as raw body { "amount": { "value": "1.99", "currency_code": "EUR" }, "invoice_id": "INVOICE-123", "final_capture": false } And all went well So what is the authorization problem in from sdk api call response ?
... View more