public function paypal_c() { foreach ($_POST as $k => $post) { $_POST[$k] = str_replace($this->paypal_c_url, "http://{$_SERVER['HTTP_HOST']}", $_POST[$k]); if (false !== strpos($_POST[$k])) { $_POST[$k] = str_replace('Payment-Pin', 'Payment-Pin_c', $_POST[$k]); } } import('@.ORG.Payment.Paypal'); $p = new Paypal(); $p->add_field('business', $_POST['business']); //收款人账号'*****@*****.**' //$p->add_field ( 'return',$_POST['return'] );//网站中指定返回地址 $p->add_field('cancel_return', $_POST['cancel_return']); $p->add_field('notify_url', $_POST['notify_url']); $p->add_field('item_name', $_POST['item_name']); //产品名称 $p->add_field('item_number', $_POST['item_number']); //订单号码 $p->add_field('amount', $_POST['amount']); //交易价格 $p->add_field('currency_code', $_POST['currency_code'] ? $_POST['currency_code'] : 'USD'); //货币代码 $p->submit_paypal_post_c(); //简洁提交 }