xfrocks / bdPaygates

4 stars 8 forks source link

Other currencies implementation #10

Open lifehome opened 8 years ago

lifehome commented 8 years ago

Currently Stripe is opening private and public beta on several other countries, while I am the lucky one who available to test out in Hong Kong, is it possible to let us customize the currency in the admin panel, instead of checkboxes?

daohoangson commented 8 years ago

It is possible, however for testing purpose, you can edit the file library/bdPaygateStripe/Processor/Common.php, replace these lines:

public function getSupportedCurrencies()
    {
        return array(
            bdPaygate_Processor_Abstract::CURRENCY_USD,
            bdPaygate_Processor_Abstract::CURRENCY_CAD,
            bdPaygate_Processor_Abstract::CURRENCY_AUD,
            bdPaygate_Processor_Abstract::CURRENCY_GBP,
            bdPaygate_Processor_Abstract::CURRENCY_EUR,
        );
    }

With something like these:

public function getSupportedCurrencies()
    {
        return array(
            bdPaygate_Processor_Abstract::CURRENCY_USD,
            bdPaygate_Processor_Abstract::CURRENCY_CAD,
            bdPaygate_Processor_Abstract::CURRENCY_AUD,
            bdPaygate_Processor_Abstract::CURRENCY_GBP,
            bdPaygate_Processor_Abstract::CURRENCY_EUR,
            'hkd',
        );
    }
lifehome commented 8 years ago

Thanks for the solution, however adding that line seems can't get the option ticked.

daohoangson commented 8 years ago

It should show up in the option to be enabled. You don't see it after editing the file?

lifehome commented 8 years ago

No it didn't show up. By what I mean checkbox, it should be the page at /admin.php?options/list/bdPaygate

lifehome commented 8 years ago

Also it makes me confusing, while bdPaygate provides a PayPal gateway, it also supports extensions gateway. It is confusing that I have no idea which gateway is using if I have installed more gateways. D:

Maybe the ability to specify which currency to be supported/processed by which gateway, or a united selection, gives the admins a less confusing way to understand?