2015-02-07 31 views

回答

0

默认情况下,贝宝不支持INR,如果你想PayPal作为INR使用已修改的核心文件,也可以创建自定义模块,贝宝

INR货币转换问题与贝宝付款方式magento

很多人在使用INR货币在PayPal支付网关重定向客户时面临此问题,PayPal不会将印度货币转换为USD或任何货币。这是我所提到的小解决方案......

转到应用程序/代码/核心/法师/贝宝/座/标准/ Redirect.php

你可以看到下面的foreach循环在这个文件

foreach ($standard->getStandardCheckoutFormFields() as $field=>$value) { 

    $form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value)); 

} 

只需更换上述foreach循环与此

foreach ($standard->getStandardCheckoutFormFields() as $field=>$value) { 
    if($field == 'amount_1'): 
    $from = 'INR'; 
    $to = 'USD'; 
    $price = $value; 
    $newPrice = number_format(Mage::helper('directory')->currencyConvert($price, $from, $to),2); 
    $form->addField($field, 'hidden', array('name'=>$field, 'value'=>$newPrice)); 
    elseif($field == 'amount_2'): 
    $from = 'INR'; 
    $to = 'USD'; 
    $price = $value; 
    $newPrice = number_format(Mage::helper('directory')->currencyConvert($price, $from, $to),2); 
    $form->addField($field, 'hidden', array('name'=>$field, 'value'=>$newPrice)); 
    else: 
      $form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value)); 
    endif; 
     } 

哟你可以使用下面的扩展名

http://www.magentocommerce.com/magento-connect/paypal-all-currencies.html