大家好,我是贝宝的新手,但现在是 cakephp 的基础知识,现在我正在与 cakephp 进行贝宝集成,但无法将值传递给贝宝。我给你看我的代码。如果我做错了什么,请告诉我。
function paypal()
{
if($this->request->is('post'))
{
echo $item_name_1=$this->request->data['Choose']['item_name_1'];
echo"<br>";
echo $amount_1=$this->request->data['Choose']['amount_1'];echo"<br>";
echo $item_name_2=$this->request->data['Choose']['item_name_2'];echo"<br>";
echo $amount_2=$this->request->data['Choose']['amount_2'];echo"<br>";
echo $cmd=$this->request->data['Choose']['cmd'];echo"<br>";
echo $business=$this->request->data['Choose']['business'];echo"<br>";
echo $upload=$this->request->data['Choose']['upload'];echo"<br>";
echo $currency_code=$this->request->data['Choose']['currency_code'];echo"<br>";
echo $item_number_1=$this->request->data['Choose']['item_number_1'];echo"<br>";
echo $item_number_2=$this->request->data['Choose']['item_number_2'];echo"<br>";
$this->redirect('https://www.paypal.com/cgi-bin/webscr?cmd='.$cmd.'&upload='.$upload.'&business='.$business.
'¤cy_code='.$currency_code.'&item_number_1='.$item_number_1.'&item_name_1='.$item_name_1.
'&'.'amount_1='.$amount_1.'&item_number_2='.$item_number_2.'&item_name_2='.$item_name_2.'&'.'amount_2='.$amount_2);
}
}
我将所有视图值(包括隐藏字段)传递给我的控制器(所有值都正确显示)并将其重定向到贝宝网站。在这里我发送多个值,但我收到这样的错误:
This recipient is currently unable to receive money.
如果我在 corephp 中编写相同的代码,那么值会到达贝宝并且一切正常,请告诉我哪里出错了。