I'am trying to create WebProfile. The code below worked for me for the last 8 days, and since today it returns response 500.
PHP
$flowConfig = new \PayPal\Api\FlowConfig();
$flowConfig->setLandingPageType("Billing");
$flowConfig->setBankTxnPendingUrl($this->referer);
$presentation = new \PayPal\Api\Presentation();
$inputFields = new \PayPal\Api\InputFields();
$inputFields->setAllowNote(false)
->setNoShipping(1)
->setAddressOverride(0);
// #### Payment Web experience profile resource
$webProfile = new \PayPal\Api\WebProfile();
// Name of the web experience profile. Required. Must be unique
$webProfile->setName(uniqid())
// Parameters for flow configuration.
->setFlowConfig($flowConfig)
// Parameters for style and presentation.
->setPresentation($presentation)
// Parameters for input field customization.
->setInputFields($inputFields);
try {
// Use this call to create a profile.
$createProfileResponse = $webProfile->create($this->apiContext);
$createProfileResponse = json_decode($createProfileResponse);
$web_profile_id = $createProfileResponse->id;
return $web_profile_id;
} catch (\PayPal\Exception\PayPalConnectionException $ex) {
return FALSE;
}
paypal.log:
[08-10-2016 02:33:16] PayPal\Core\PayPalHttpConnection : INFO: Response
Status : 500
[08-10-2016 02:33:16] PayPal\Core\PayPalHttpConnection : DEBUG: Response
Headers : HTTP/1.1 500 Internal Server Error, Date: Sat, 08 Oct 2016
14:33:06 GMT, Server: Apache, PROXY_SERVER_INFO:
host=slcsbplatformapiserv3002.slc.paypal.com;threadId=495, Paypal-
Debug-Id: c6d80d6e1ffc8, Connection: close, Paypal-Debug-Id:
c6d80d6e1ffc8, Set-Cookie:X-
PP-SILOVER=name%3DSANDBOX3.API.1%26silo_version%3D1880%26app%3Dplatformapiserv%26TIME%3D2718169431%26HTTP_X_PP_AZ_LOCATOR%3D; Expires=Sat, 08 Oct 2016 15:03:06 GMT; domain=.paypal.com; path=/; Secure; HttpOnly, Set-Cookie: X-PP-SILOVER=; Expires=Thu, 01 Jan 1970 00:00:01 GMT, Vary: Authorization, Content-Length: 145, Content-Type: application/json, ,
[08-10-2016 02:33:16] PayPal\Core\PayPalHttpConnection : ERROR: Got Http
response code 500 when accessing https://api.sandbox.paypal.com/v1/payment-
experience/web-profiles/. {"name":"INTERNAL_SERVICE_ERROR","information_link":"https://api.sandbox.paypal.com/docs/api/#INTERNAL_SERVICE_ERROR","debug_id":"c6d80d6e1ffc8"}
[08-10-2016 02:33:16] PayPal\Core\PayPalHttpConnection : DEBUG:
I've tryed this example and got same error. Creating end executing payments works perfectly, so the problem is only with the web profiles. Any ideas how to solve it? Thanks in advance.
It was an bug on PayPal side, now fixed. Issue tracked here.