PAYPAL货币不起作用

时间:2011-07-31 19:43:18

标签: php paypal shopping-cart

我正在使用PHP来使用Paypal付款 这是一个购物车系统。 一切都很好,持续了6个月。现在我们想要在其中实现多种货币设施。所以我实现了一个名为

的paypal变量
currency_ code :: EUR

现在我应该可以用EUR代替美元。但是当支付可变通行证但Paypal使用USD而非EUR。这意味着价格是美元而不是欧元。什么是错误?

知道为什么会这样吗?

$invoice= $this->session->userdata('invoice');
$money= $this->session->userdata('tk');
$desc= $this->session->userdata('desc');

$store_owner= $this->session->userdata('store_owner');

$this->paypal_class->add_field('upload', '1');          
$this->paypal_class->add_field('business', $store_owner);
$this->paypal_class->add_field('return', $this->session->userdata('success'));
$this->paypal_class->add_field('cancel_return', $this->session->userdata('store'));
$this->paypal_class->add_field('notify_url', base_url().'ipn/index');
$this->paypal_class->add_field('invoice',$invoice);

$this->paypal_class->add_field('currency_ code', $this->session->userdata ('currency'));

$t = 1;
foreach ($cart as $c)
{
$this->paypal_class->add_field('item_name_'.$i, $c['product_name']);
$this->paypal_class->add_field('item_number_'.$i, $c['option_id']);
$this->paypal_class->add_field('on0_'.$i, 'Option');
$this->paypal_class->add_field('os0_'.$i, $c['option_name']);
$this->paypal_class->add_field('quantity_'.$i, $c['option_quantity']);
$this->paypal_class->add_field('amount_'.$i, $c['option_price']);
$this->paypal_class->add_field('shipping_'.$i, $c['option_shipping']);
$i++;
}

$this->paypal_class->add_field('discount_amount_cart', 5);
$this->paypal_class->add_field('tax_cart', 7.5);

$this->paypal_class->submit_paypal_post();

1 个答案:

答案 0 :(得分:3)

如果我理解正确,请使用add to cart button 要设置货币,您应该使用此代码

<input type="hidden" name="currency_code" value="EUR">

你的按钮是这样吗?

您可以发布按钮的孔码吗?