今天早上,我做了以下代码(适用于pask周左右),现在没有任何作用:
public function createReacurringPlan(){
$req = array(
'USER' => 'bennyrefaelov-facilitator_api1.gmail.com',
'PWD' => 'YWKQ3M3NXBTZQ78U',
'SIGNATURE' => 'AFcWxV21C7fd0v3bYYYRCpSSRl31AuVEFUpBu6N8yXkmFksuwwSiQOW8',
'VERSION' => '98.0',
'METHOD' => 'SetExpressCheckout',
'PAYMENTREQUEST_0_PAYMENTACTION' => 'Mark',
'REQCONFIRMSHIPPING'=>'0',
'NOSHIPPING'=>'1',
'ALLOWNOTE'=>'0',
'SOLUTIONTYPE'=>'Sole',
'BRANDNAME'=>'MisterSurvey',
'PAYMENTREQUEST_0_AMT'=>'100.00',
'MAXAMT' => '100.00',
'L_BILLINGAGREEMENTDESCRIPTION0' => 'Pay up',
'PAYMENTREQUEST_0_TAXAMT'=>'0',
'PAYMENTREQUEST_0_ITEMAMT'=>'100.00',
'L_BILLINGTYPE0' => 'RecurringPayments',
'PAYMENTREQUEST_0_DESC'=>'An awesome package',
'PAYMENTREQUEST_0_CUSTOM'=>'This is just for fun',
'PAYMENTREQUEST_0_CURRENCYCODE'=>'USD',
'L_PAYMENTREQUEST_0_NUMBER0'=>'itemid1',
'L_PAYMENTREQUEST_0_NAME0'=>'MyItem1',
'L_PAYMENTREQUEST_0_DESC0'=>'basic package',
'L_PAYMENTREQUEST_0_QTY0'=>'1',
'L_PAYMENTREQUEST_0_AMT0'=>'100.00',
'L_PAYMENTREQUEST_0_TAXAMT0'=>'0',
'RETURNURL'=>'http://mistersurveylocal.com:8080/#/pricing',
'CANCELURL'=>'http://mistersurveylocal.com:8080/#/'
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api-3t.sandbox.paypal.com/nvp');
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($req));
$response = curl_exec($ch);
curl_close($ch);
var_dump($response);
$ response返回false ... 直到它现在它返回它应该具有的东西,这是paypal重定向到它的标记,现在看来,什么都没有回来,我没有改变任何东西! 还有其他人体验这个吗?
答案 0 :(得分:1)
使用curl_getinfo()
,curl_error()
和curl_errno()
函数查找有关错误的更多信息。
echo curl_getinfo($ch) . '<br/>';
echo curl_errno($ch) . '<br/>';
echo curl_error($ch) . '<br/>';
你遇到了同样的问题,我用下面的代码解决了这个问题
curl_setopt( $ch, CURLOPT_SSL_CIPHER_LIST, 'SSLv3');
答案 1 :(得分:0)
svcs.sandbox.paypal.com(173.0.82.89)对我来说无法缓解来自美国,英国,ES和AR
顺便说一下,这个更详细;)echo serialize(curl_getinfo($ch)) . '<br/>';
echo curl_errno($ch) . '<br/>';
echo curl_error($ch) . '<br/>';
PayPal在此提供有关PayPalSiteStatus的一些信息:
https://www.paypal-notify.com/eventnotification/search?eventSearchType=PayPalSiteStatus