Jump to content

Recommended Posts

Posted

I think what this thread should be requesting is the ability to show currency equivalence.

For example, package is $100 USD, user uses GBP, so they could see on the order form:

$100 USD (approx. £78.73).

 

Yes, this is an interesting ideia :)

 

+ 1 for this :)

Posted

in the fact , equivalance currency is not the solution .

let say we have just one currency . this curency is not supported in paypal . the goal or the idea is to show all available gateway to the user , then if the gateway is not supporting the user currency , it should convert the currency to a default or accepted currency like USD or EUR . then pass the amount to the currency .

i have searched all the code , i don't see or maybe i have not arrived to found the class that responsible for showing gateway . normally the gateway appear only if the user currency is listed in the accepted currencies for that gateway .

another time, V2.5 was this possiblity and we have changed some gateways to convert the currencies in the proccess .

Posted

i hope the staff can do something for that . paypal available in 203 markets(countries) and just 26 currencies is supported .

so is more than 150 country/currency cannot use international gateways in blesta like paypal .

i have see also in the database a table for the supported currencies for given gateway . so a plugin to add more currencies can do the trick , now what is missed is how to make the conversion without changing the CORE FILES .

  • 4 weeks later...
Posted

Hello,

 

like I promisse (a litle late :P) here is what I found out :)

 

If we do this below we can change the currency for a default one if it dosent support on the Gateway.

 

(now it only needs a Summary->Total function to convert the choosen currency total to the default gateway currency. It will take more time for me to detect and implement the conversion rate)

 

 

Open: plugins/order/order_form_controller.php
 
line 592 find:
		if ($currency == null)
Change to:
$default_currency = "USD"; // put here your default gateway currency to convert if it dosent exists

if ($currency == null)

on line 606 find:

		// Fetch merchant gateway for this currency
		$merchant_gateway = $this->GatewayManager->getInstalledMerchant($this->company_id, $currency, null, true);

Replace with:

// Fetch merchant gateway for this currency
$merchant_gateway = $this->GatewayManager->getInstalledMerchant($this->company_id, $currency, null, true);

if (!$merchant_gateway)
     $merchant_gateway = $this->GatewayManager->getInstalledMerchant($this->company_id, $default_currency, null, true);
            $currency = $default_currency;

Find on line 624:

			$gw = $this->GatewayManager->getInstalledNonmerchant($this->company_id, null, $gateway->gateway_id, $currency);
			if ($gw)
				$nonmerchant_gateways[] = $gw;

Replace with:

			$gw = $this->GatewayManager->getInstalledNonmerchant($this->company_id, null, $gateway->gateway_id, $currency);

            if (!$gw)
                $gw = $this->GatewayManager->getInstalledNonmerchant($this->company_id, null, $gateway->gateway_id, $default_currency);
                $currency = $default_currency;

			if ($gw)
				$nonmerchant_gateways[] = $gw;
 
I hope that helps :)
 
But ofcourse with ould be great to have a defaul option to select a "default" currency for each Payment gatway that make the convertion from the client choosent currency and display on the order summary and on the invoice something like:
 
$100 USD (converted to £78.73 for payment gateway support)
  • 2 weeks later...
Posted

Hello PaulV

 

today i get time to test this hack , but i have touth is just for the order plugin . from the client side will not work .

 

but , thanks another time , i will re-check again for the full system solution . maybe i need to see the gateways class.

Posted

i have back again .

 

the final solution will be as we have doit in v2.5 , a custom gateway for paypal and the others .

 

the only probleme we have here , is we can't show any message to the client that the curency/amount to pay has been changed to a new amount/currency .

 

but is better than we can't use paspay , stripe , payza ..... )

 

tomorrow i will share the paypal gateway with the community .

 

EDIT : we can pass a message in the proccess.pdt file :)

  • 2 months later...
Posted

the module has been tested and working as we want : )

 

we will make some more test to ensure if there are a bug or not  .

 

So It only works In v2.5, thats sad... :( .. I just hope we get this feature in by default with blesta.

  • 7 years later...
Posted

I want this feature too. My domains are billed to me in USD and I've listed them as packages in USD, but my clients are paying in INR and I use CCAvenue and the gateway does not process payments in USD. So I need something that will convert the amount to INR and allow to be paid via the gateway that doesn't supports the billing currency.

How to do ? Earlier if i remember that when generating invoices blesta used to calculate the exchange and created invoices according to user's currency, but i guess it works only when generating invoices for renewal. When user is placing a new order then the conversion is not happening and invoice is generated in usd. Weird.

Thanks.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...