我的Drupal网站有一个捐款表格,会在提交时重定向到Paypal以处理捐款。但是,当广告系列(您可以捐赠的节点)的名称为“ ”时,PP会将其显示为HTML字符。下面的屏幕截图应该让我的查询更清晰。
示例广告系列。 http://screencast.com/t/FhlgSgZJU
这就是PP登陆页面的样子。 http://screencast.com/t/T8jTcxLtKo
这些示例代码位于函数内部,将值从我的捐款表单传递到Paypal并重定向到那里。
$paypal = array(
'cmd' => '_donations',
'business' => $client_paypal_acct, // PayPal account email
'bn' => 'GM_Donate_WPS_US',
'page_style' => 'primary',
'item_name' => $this->params['campain_title'], // all other may need not be placed here as this variable is only needed for my query.
);
$query = http_build_query($paypal, '', '&');
$url = 'https://www.paypal.com/cgi-bin/webscr?' . $query;
drupal_goto($url);