Soft Wholesale Posted April 22, 2021 Share Posted April 22, 2021 (edited) HI, My country, Serbia, is not supported with the PayPal module. If I set the store country to be USA, can I use my Serbian PayPal with it? I tried to connect my account and that worked, but I do not know if I can actually use my website that way. Will my purchases be accepted from every country or just USA or Serbia by the PayPal. What does that actually mean, list of supported countries by the module, if I can connect any other, not supported country with the PayPal if I set as a Shop country any supported country from the list. Thanks in advance! Edited April 22, 2021 by Soft Wholesale (see edit history) Link to comment Share on other sites More sharing options...
Eolia Posted April 22, 2021 Share Posted April 22, 2021 Paypal restrictions are not on countries but on currencies. In process.php i have add this // Eolia add to force currency if current currency is not accepted by Paypal // See https://developer.paypal.com/docs/classic/api/currency_codes/ $paypal_currencies = array('AUD', 'BRL', 'CAD', 'CZK', 'DKK', 'EUR', 'HKD', 'HUF', 'ILS', 'JPY', 'MYR', 'MXN', 'NOK', 'NZD', 'PHP', 'PLN', 'GFP', 'RUB', 'SGD', 'SEK', 'CHF', 'TWD', 'THB', 'TRY', 'USD'); $currency_module = $this->getCurrency((int)$this->context->cart->id_currency); if(!in_array($currency_module->iso_code, $paypal_currencies)) { $default_currency = 'EUR'; $this->context->cart->id_currency = Currency::getIdByIsoCode($default_currency); } // End of Eolia add before this line $this->currency = new Currency((int)$this->context->cart->id_currency); if (!Validate::isLoadedObject($this->currency)) $this->_errors[] = $this->l('Not a valid currency'); .... Link to comment Share on other sites More sharing options...
Soft Wholesale Posted April 23, 2021 Author Share Posted April 23, 2021 Thank you so much ! However, I am not so versed in coding, so I assume the file process.php is located in Prestashop files or maybe in module files. Prices on my website are in USD and if somene buys from Russia for example with your code that is converted to rubels or is paid in USD. I sell software addons and I have no need for any other currency but the USD. PayPal always converts the currency if it is not in USD in my case? If I do not change anything, I also assume that all pyments are then in USD. Is this correct? Link to comment Share on other sites More sharing options...
Eolia Posted April 23, 2021 Share Posted April 23, 2021 Ok, in Modules ->Payments, Force Paypal to use $USD currency, never choose customer currency Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now