我对paypal的支持感到非常不满。我只是想用php curl整合它。
我像这样整合了它,
$postData = json_encode(array(
'USER' => 'developer-facilitator_api1.example.com',
'PWD' => 'T2EZG7CVAPWRWER9SHZKK',
'SIGNATURE' => 'An5ns1Kso7MWUdW4ErQKJJsdadaJ4qi4-APXpHmjsOPnzMnURUt4CdX1ua-BZ',
'VERSION' => '86',
'PAYMENTREQUEST_0_PAYMENTACTION' => 'SALE',
'RETURNURL' => 'https://example.com/thank-you',
'CANCELURL' => 'https://texample.com',
'METHOD' => 'DoReferenceTransaction',
'PAYMENTREQUEST_0_CURRENCYCODE' =>'USD',
'PAYMENTREQUEST_0_AMT' => 1,
));
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'https://api-3t.sandbox.paypal.com/nvp');
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_POST,true);
curl_setopt($ch,CURLOPT_POSTFIELDS,$postData);
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true);
$output = urldecode(curl_exec($ch));
print_r($output);
当我运行它时,它显示错误,如
ACK=Failure&L_ERRORCODE0=81002&L_SHORTMESSAGE0=Unspecified Method&L_LONGMESSAGE0=Method Specified is not Supported&L_SEVERITYCODE0=Error
I don't know where i did mistake.it is classic api of paypal. I am selecting this api because i want to receive payment from buyer account in future using transaction id. Is there any other method for future transaction from buyer account.
其实我有提供app(教育)的服务。导师和学生在我的应用程序中互动,一旦导师提供课程,学生付款将继续进行而不依赖学生。
当学生选择最初付款方式时,他/她将登录他/她的paypal帐户,那时我只想获取一些信息,如(交易ID),然后当学生将来从导师那里上课时,付款将继续并从他/她的帐户中扣除金额,因为它就像在线课程,所以一旦课程完成,付款将继续进行。 任何人都可以帮我解决。
答案 0 :(得分:0)
您的PayPal沙盒帐户developer-facilitator@example.com尚未启用参考交易功能。您必须联系PayPal技术支持以启用此功能,然后才能解决此错误问题。