您好我想在我的 Zend FW 1 应用程序中集成 Paypal API。
我的代码是
$this->setHeaders(
array(
'Authorization' => '<REMOVED>',
'content-type' => 'application/json',
)
);
$this->setMethod('POST');
$this->setParameterGet('payer_id', $company_id);
$this->setParameterGet('number', $cc_number);
$this->setParameterGet('type', $type);
$this->setParameterGet('exp_month', $exp_month);
$this->setParameterGet('exp_year', $exp_year);
$this->setParameterGet('payer_id', $company_id);
$this->setParameterGet('first_name', $first_name);
$this->setParameterGet('last_name', $last_name);
return $this->request();
调试显示这个
string(364) "POST /v1/vault/credit-card?number=4417119669820331&type=visa&exp_month=05&exp_year=2019&first_name=john&last_name=travolta HTTP/1.1
Host: api.sandbox.paypal.com
Connection: close
Accept-encoding: gzip, deflate
User-Agent: Zend_Http_Client
Authorization: Bearer <REMOVED>
content-type: application/json
Content-Length: 0
但是当我运行时,我从 PayPal “方法不允许”中收到此错误
问题出在哪里?我做POST,他说不允许?允许的方法是 POST、GET、HEAD、OPTIONS。我在哪里犯错误?我想存储信用卡