Post by darksecu » Fri May 10, 2013 8:15 pm

Hello Every One,
I am new here, trying to build a shopping portal.
Most Of my friends recommended OpenCart for this.

Just came up with a problem, when ever user try to checkout with currency as INR (Not supported by paypal) then it doesn't show paypal for checkout. (Modifying catalog/model/payment/paypal_standard.php Makes It Work)

instead i want to do something like showing all payment gateways, but if paypal standard is selected then automatically convert the total amount visible on confirm page into USD.

I have been doing php coding since a long time but i am familiar with fetching codes of opencart so not able to get it to work.

Piece Of Work I Thought Of
======================================
if ($selected_currency == 'INR' && $selected_gateway == 'paypal_standard') {
// 0.022 is conversion rate from inr to usd
// proceeding all values in inr to usd this way
$values_in_inr=$value_in_inr*0.022;
}
======================================

Waiting For Reply,
Rahul Shandilya

Newbie

Posts

Joined
Fri May 10, 2013 8:03 pm

Post by darksecu » Sun May 12, 2013 3:07 am

No one ??

Newbie

Posts

Joined
Fri May 10, 2013 8:03 pm

Post by ahmedfawzi55 » Sun Jun 02, 2013 8:30 pm

Hello
i find this Solution here in Forum
http://forum.opencart.com/viewtopic.php?f=136&t=65005
Re: Q: How can I use paypal if my currency isn't supported?

Postby Qphoria » Fri Feb 22, 2013 7:56 pm
Alternatively, and this works for other payments too.... you can add code to force your currency to switch to a gateway supported currency


(v1.5.x)
1. EDIT: catalog/controller/payment/<payment>.php

2. FIND (FIRST INSTANCE ONLY):

Code: Select all

$order_info = $this->model_checkout_order->getOrder


3. AFTER, ADD (Replace USD with your choice of valid currency):

Code: Select all

$order_info['currency_code'] = 'USD';


Whatever currency you choose to use, be sure you have it in your list of currencies on your store in the Admin->System->Localisation->Currency page. It doesn't need to be enabled, just has to exist so that the conversion calculation can be done.

This will then auto convert the amount before it is sent to the gateway. The customer won't likely notice this.
They will see, for example, 1000 AED on the checkout page
But you will see $272.25 USD (based on the current conversion rate) in your paypal account.
i hope that help you
Best Regards

Newbie

Posts

Joined
Wed Nov 28, 2012 5:14 am

Post by ashras99 » Thu Jun 16, 2016 11:21 pm

will this still working, because i tried and that's not working. even after adding $order_info['currency_code'] = 'USD';
in 2.1.0.2

because i also wanted to show all payment gateways and when paypal standard is selected then automatically convert the total amount visible on confirm page into USD.

New member

Posts

Joined
Mon Jun 06, 2016 2:24 am

Post by phamxuanvinh2110 » Sat Dec 17, 2016 12:16 am

2.3.0.2, how can i fix it? the same topic

New member

Posts

Joined
Mon Nov 28, 2016 11:41 am
Who is online

Users browsing this forum: No registered users and 131 guests