Unable to capture a preauthorized amount
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
{
"message":"Authorization failed due to insufficient permissions.",
"debug_id":"45a665de305d5",
"details":[
"description":"You do not have permission to access or perform operations on this resource."
"links":[
"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);
I add more info.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello ,
I have the same situation , i'm using smart buttons in my front application to create the order , but i have implemented the capture process server side , i wasn't able to do negative testing so i tried to use a real bank generated visa card to do a test with insufficient funds , and i got this error , it sounds like it's related to business account configuration but couldn't find a solution .
did you resolve this problem ?
Thanks for your help.
Ines
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Add Others data in SDKs
- Change the button from Sandbox to Production in REST APIs
- User is asked for shipping address when creating a credit card order in REST APIs
- PAYER_ACTION_REQUIRED returned for Capture intent when calling v2 checkout orders in Sandbox Environment
- How to redirect user to paypal checkout form for card payment? in PayPal Payments Standard