PAYPAL 貨幣不起作用 (PAYPAL currency is not working)


問題描述

PAYPAL 貨幣不起作用 (PAYPAL currency is not working)

I'm using PHP to payment using Paypal It's a shoping cart system. Everything went fine for 6 months. Now we want to implement multiple currency facility in it. So I implemented one paypal variable called

currency_ code :: EUR

now I should be able to use EUR in place of USD. But when paying variable passes but Paypal uses USD not EUR. That means the price is in Dollar not Euro. What's the error?

Any idea why is this?

$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:

If I understand right, you use add to cart button To set currency you should use this code 

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

Is it so in your button?

Could you post hole code of your button? 

(by Mazhar AhmedRuslan Polutsygan)

參考文件

  1. PAYPAL currency is not working (CC BY-SA 3.0/4.0)

#shopping-cart #PHP #paypal






相關問題

PHP PDO - 無法序列化或反序列化 PDO 實例 (PHP PDO - cannot serialize or unserialize PDO instances)

Prestashop 在註冊表單中添加額外字段 (Prestashop Add extra fields to registration form)

接近購物車存儲,帶有 sessionID 的數據庫 (Approach shopping cart storage, database with sessionID)

購物車不工作,我想哭 (Shopping cart won't work and I want to cry)

如何在 UITableView 中使用 dequeueReusableCellWithIdentifier 快速管理購物車? (How to manage shopping cart in UITableView with dequeueReusableCellWithIdentifier in swift?)

如何區分 Rs 和 % 值? (How to differentiate Rs and % values?)

貝寶購物車的運費之一 (One of delivery charge for paypal shopping cart)

ZenCart 中的優惠券問題 (Coupon problem in ZenCart)

PAYPAL 貨幣不起作用 (PAYPAL currency is not working)

RESTful 購物車網絡服務 (RESTful Shopping Cart web service)

Gravity Form 不適用於結帳頁面 (Gravity Form doesn't work with Checkout Page)

帶有對象的數組,單擊按鈕後增加/減少對像中的值之一 (Array with objects, increasing/decreasing one of the value in object after click on button)







留言討論