专家我已经集成了贝宝快速结账与ci_merchant,我正在使用沙箱帐户进行测试。它工作得很好,但突然它给出了类似“您没有权限进行此API调用”的响应。我仔细查看了一下,发现我需要设置api权限并启用快速结帐。我这样做了,但仍然有相同的响应。有谁可以帮我?
http://help.tictail.com/customer/portal/articles/1063813-paypal-error-%22you-do-not-have-permissions-to-make-this-api-call%22
我已经尝试了上面的链接解决方案。
下面是请求数组
Array ( [METHOD] => SetExpressCheckout [VERSION] => 85.0
[USER] => takeout_api1.rest.com
[PWD] => 1369227981
[SIGNATURE] => AnOQDpMvzNQqHN5u7vb9BKLaKYLoALq6R0g3ohOwD4RQgO0DQDI5l7V4
[PAYMENTREQUEST_0_PAYMENTACTION] => Authorization
[PAYMENTREQUEST_0_AMT] => 121.00
[PAYMENTREQUEST_0_CURRENCYCODE] => USD
[PAYMENTREQUEST_0_DESC] =>
[SOLUTIONTYPE] => Sole
[LANDINGPAGE] => Billing
[NOSHIPPING] => 1
[ALLOWNOTE] => 0
[RETURNURL] => https://www.mealordering.net/payment/pay/2/265
[CANCELURL] => https://www.mealordering.net/payment/pay/2/265
[PAYMENTREQUEST_0_SHIPTONAME] =>
[PAYMENTREQUEST_0_SHIPTOSTREET] =>
[PAYMENTREQUEST_0_SHIPTOSTREET2] =>
[PAYMENTREQUEST_0_SHIPTOCITY] =>
[PAYMENTREQUEST_0_SHIPTOSTATE] =>
[PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE] =>
[PAYMENTREQUEST_0_SHIPTOZIP] =>
[PAYMENTREQUEST_0_SHIPTOPHONENUM] =>
[EMAIL] => )
HERE CONTROLLER NAME IS PAYMENT and paypal and pay methods I am using for making php api or ci-merchant library call
public function paypal($rest_id,$orderid)
{
$this->merchant->load('paypal_express');
$settings = $this->merchant->default_settings();
$settings = array(
'username' => $get_payapl->LoginId,
'password' => $get_payapl->SecretKey,
'signature' => $get_payapl->Signature,
'test_mode' => true,
);
$this->merchant->initialize($settings);
$return_url=site_url('payment/pay/'.$rest_id.'/'.$orderid);
$cancel_url=site_url('payment/pay/'.$rest_id.'/'.$orderid);
$params = array(
'amount' => $payable_amt,
'currency' => $cuurency_code->CurrencyCode,
'return_url' => $return_url,
'cancel_url' => $cancel_url
);
$response = $this->merchant->purchase($params);
}
public function pay($rest_id,$orderid)
{
$this->merchant->load('paypal_express');
settings = $this->merchant->default_settings();
$settings = array(
'username' => $get_payapl->LoginId,
'password' => $get_payapl->SecretKey,
'signature' => $get_payapl->Signature,
'test_mode' => true,
);
$return_url=site_url('payment/pay/'.$rest_id.'/'.$orderid);
$cancel_url=site_url('payment/pay/'.$rest_id.'/'.$orderid);
$params = array(
'amount' => $payable_amt,
'currency' => $cuurency_code->CurrencyCode,
'return_url' => $return_url,
'cancel_url' => $cancel_url
);
$response = $this->merchant->purchase_return($params);//final response this is
if ($response->success())
{
//success message and code
}
else
{
//fail messages and code
}
}
发布于 2015-01-09 16:01:19
Express Checkout通常不会出现这种错误,除非从中提取API凭据的帐户是个人帐户,而不是企业帐户。您是否有可能将凭据更改为其他帐户,而该帐户不是企业帐户?
https://stackoverflow.com/questions/27840084
复制相似问题