Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author dimitrov.adrian

    (@dimitrovadrian)

    Hi,

    I have make some tests and unfortunately, this seems to be an bug in my part of code.
    I didn’t check with real transaction, but on demo servers BGN is forced to be used regardless currency which is send from plugin.

    I had issued the ePay.bg team but still waiting for response.

    I’ll update this topic when have response from ePay.bg

    Plugin Author dimitrov.adrian

    (@dimitrovadrian)

    Hi,

    I just receive an response from ePay.bg and seems that there is error in their documentation, so currently supported currencies are only BGN.
    USD and EUR are NOT SUPPORTED right now.

    I will update the plugin ASAP to trim down the unsupported currencies.

    Sorry for any inconveniences.

    Здравейте,
    Дали имате вече решение на проблема.
    В конкретния случай става дума за сайт който е multi-currency в зависимост от езика, и бих искал метода за плащане да не се появява ако ордера е в EUR.

    To describe better my case – we have woocommerce + woocommerce multilingual (WPML) which gives us the possibility to use different currencies for different languages. All payment gateways we use check the supported currency using main currency configuration of woocommerce. That’s why the site is set to main currency EUR because the other gateways don’t support BGN and cannot be activated. With this setting and BGN as additional currency all other installed gateways are working as expected:
    1. they are active because the main currency is EUR
    2. they are available when the order is in EUR because the currency is supported
    3. They are not available when the order is in BGN because the currency is not supported.
    ———————–
    For ePay.bg gateway the supported currencies are BGN EUR USD.
    1. This makes the gateway enabled with main currency EUR
    2. the gateway is available when the order currency is BGN
    3. WRONG – The gateway is available when the order currency is EUR.
    The function is_currency_supported cannot be changed because it will disable the gateway in my configuration

    To be able to fix this I added one more function to class-wc-gateway-epaybg.php
    —————-
    public function is_currency_valid() {
    return in_array(get_woocommerce_currency(), array( ‘BGN’));
    }
    —————-
    And changed is_valid_for_use to
    —————-
    public function is_valid_for_use() {
    //return $this->client_id && $this->secret_key && $this->is_currency_supported();
    return $this->client_id && $this->secret_key && $this->is_currency_valid();
    }
    —————-
    Now everything is working as needed for us

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problems with other currencies (Euro)’ is closed to new replies.