PayPal\Common\PayPalResourceModel::executeCall PHP Method

executeCall() protected static method

Execute SDK Call to Paypal services
protected static executeCall ( string $url, string $method, string $payLoad, array $headers = [], ApiContext $apiContext = null, PayPalRestCall $restCall = null, array $handlers = ['PayPal\Handler\RestHandler'] ) : string
$url string
$method string
$payLoad string
$headers array
$apiContext PayPal\Rest\ApiContext
$restCall PayPal\Transport\PayPalRestCall
$handlers array
return string json response of the object
    protected static function executeCall($url, $method, $payLoad, $headers = array(), $apiContext = null, $restCall = null, $handlers = array('PayPal\\Handler\\RestHandler'))
    {
        //Initialize the context and rest call object if not provided explicitly
        $apiContext = $apiContext ? $apiContext : new ApiContext(self::$credential);
        $restCall = $restCall ? $restCall : new PayPalRestCall($apiContext);
        //Make the execution call
        $json = $restCall->execute($handlers, $url, $method, $payLoad, $headers);
        return $json;
    }