toJSON(); $call = new PPRestCall($apiContext); $json = $call->execute( array('PayPal\Rest\RestHandler'), "/v1/payments/payment", "POST", $payLoad, [ 'Paypal-Application-Correlation-Id' => $correlationId, 'PAYPAL-CLIENT-METADATA-ID' => $correlationId ] ); $this->fromJson($json); return $this; } }