douhanxujiuji6098 2016-10-08 14:45
浏览 46
已采纳

响应500创建WebProfile

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.

  • 写回答

1条回答 默认 最新

  • dongyuan1870 2016-10-11 07:51
    关注

    It was an bug on PayPal side, now fixed. Issue tracked here.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 matlab解优化问题代码
  • ¥15 写论文,需要数据支撑
  • ¥15 identifier of an instance of 类 was altered from xx to xx错误
  • ¥100 反编译微信小游戏求指导
  • ¥15 docker模式webrtc-streamer 无法播放公网rtsp
  • ¥15 学不会递归,理解不了汉诺塔参数变化
  • ¥15 基于图神经网络的COVID-19药物筛选研究
  • ¥30 软件自定义无线电该怎样使用
  • ¥15 R语言mediation包做中介分析,直接效应和间接效应都很小,为什么?
  • ¥15 Jenkins+k8s部署slave节点offline