Help Article

Why did I get a fatal error when using the Call API button in the PHP SDK Web Console?

Issue
You got a fatal error message - Call to undefined function: getapiusername().

Cause
The path for profile certificates is incorrectly specified.

Solution
Using the Web Console, change the path to the WebTester folder (this is a folder you have control over) and create a folder called tmp; make sure that folder has "777" permissions.

Edit the WebConsole/lib/functions.inc.php file, and change the return path where the profile certificate is saved. Include the following code:
  • /** *
This returns the path where profile certificates should be saved, taken from * the PayPal SDK configuration file with checks to make sure it's correct.
  • * * @internal * @return mixed
This is a string containing the path to save the certificate files at * or a PayPal error object on failure.
  • */ function _getProfileCertSavePath() { $package_root = Services_PayPal::getPackageRoot(); $path = '/var/www/html/paypal_php_sdk/WebConsole/WebTester';

In addition, name the path when using the console to /tmp.
We’re sorry. The page you’re looking for is no longer available. To search again or contact us, please visit our Help Centre.