PayPal\Api\Invoice::deleteExternalPayment PHP Method

deleteExternalPayment() public method

Delete external payment.
public deleteExternalPayment ( $transactionId, ApiContext $apiContext = null, PayPalRestCall $restCall = null ) : boolean
$apiContext PayPal\Rest\ApiContext is the APIContext for this call. It can be used to pass dynamic configuration and credentials.
$restCall PayPal\Transport\PayPalRestCall is the Rest Call Service that is used to make rest calls
return boolean
    public function deleteExternalPayment($transactionId, $apiContext = null, $restCall = null)
    {
        ArgumentValidator::validate($this->getId(), "Id");
        ArgumentValidator::validate($transactionId, "TransactionId");
        $payLoad = "";
        self::executeCall("/v1/invoicing/invoices/{$this->getId()}/payment-records/{$transactionId}", "DELETE", $payLoad, null, $apiContext, $restCall);
        return true;
    }