Very strange issue, if I do this request through PHP, using: $request = new \PayPalCheckoutSdk\Orders\OrdersCreateRequest();
$request->prefer('return=minimal');
$request->body = [
"intent" => "CAPTURE",
"purchase_units" => [
[
'description' => 'Example request',
'soft_descriptor' => 'Example',
'amount' => [
"currency_code" => "USD",
'value' => "3.00",
],
]
],
]; Like so: NOTICE: The total is NOT there! However, if I do the same request in JavaScript, it goes as I expect: return actions.order.create({
purchase_units: [
{
description: "Example request.",
amount: {
currency_code: "USD",
value: "3.00"
}
}
]
}); Notice; TOTAL is there, and clicking on it shows the description. And if I specify the FULL message with items (but not nice) it also shows the amount. $request = new \PayPalCheckoutSdk\Orders\OrdersCreateRequest();
$request->prefer('return=minimal');
$request->body = [
"intent" => "CAPTURE",
"purchase_units" => [
[
'description' => 'Example request',
'soft_descriptor' => 'Example',
'amount' => [
"currency_code" => "USD,
'value' => "3.00",
'breakdown' => [
'item_total' => [
"currency_code" => "USD,
'value' => "3.00",
],
],
],
'items' => [
[
'name' => "Item",
'description' => 'Example item',
'quantity' => 1,
'unit_amount' => [
"currency_code" => "USD,
'value' => "3.00",
],
]
],
]
],
]; But the result is not very nice (notice the multiple lines basically saying the same): NOTICE: Total is there, but also with (unnecessary) item details. I doubt this is intentional? Does anyone know why the total does NOT show with the minimal request?
... View more