setId($createProfileResponse->getId()); try { // Execute the delete method $webProfile->delete($apiContext); } catch (\PayPal\Exception\PayPalConnectionException $ex) { ResultPrinter::printError("Deleted Web Profile", "Web Profile", $createProfileResponse->getId(), null, $ex); exit(1); } ResultPrinter::printResult("Deleted Web Profile", "Web Profile", $createProfileResponse->getId(), null, null);