1

我的 Drupal 网站有一个捐赠表格,它会在提交时重定向到 Paypal 以处理捐赠。但是,当活动(您可以捐赠的节点)名称为“ 's ”时,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);
4

0 回答 0