<?php
namespace Srmklive\PayPal\Tests\Mocks\Requests;
use GuzzleHttp\Utils;
trait PaymentCaptures
{
/**
* @return array
*/
private function mockRefundCapturedPaymentParams(): array
{
return Utils::jsonDecode('{
"amount": {
"value": "10.99",
"currency_code": "USD"
},
"invoice_id": "INVOICE-123",
"note_to_payer": "Defective product"
}', true);
}
}
In case of an error, the API will return an error response containing a specific error code 400, 403 Failed and a user-friendly message. Refer to our API documentation for a comprehensive list of error codes and their descriptions.