専門家 ペイパル エクスプレス チェックアウトを ci_merchant に統合し、サンドボックス アカウントをテスト用に使用していました。正常に動作していましたが、突然、「この API 呼び出しを行う権限がありません」などの応答が返されました。私はゴーグルして、API許可を設定し、エクスプレスチェックアウトを有効にする必要があることを発見しましたが、それでも同じ応答です。誰でも私を助けることができますか?
上記のリンクソリューションを試しました。
ここにリクエスト配列があります
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
}
}