getId(), $apiContext); } catch (\PayPal\Exception\PayPalConnectionException $ex) { // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY ResultPrinter::printError("Get Web Profile", "Web Profile", $webProfile->getId(), null, $ex); exit(1); } // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY ResultPrinter::printResult("Get Web Profile", "Web Profile", $webProfile->getId(), null, $webProfile); return $webProfile;