Reputation: 21
I create new payment gatway module in magento in that i add protected $_supportedCurrencyCodes = array('USD');
line in standard.php file in mymodule/Model.
So anyone explain me what is use for that?
If it's allow only USD curruncy than i chnage my store curruncy and than do payment process but it accept this.
So help me to accept only USD curruncy in my store.
If default curruncy is not in USD than how convert it.
Upvotes: 0
Views: 258
Reputation: 1686
You need to have a function called canUseForCurrency($currencyCode)
inside the Standard.php
file that returns true or false depending on support.
This function will usually check the module config set in the backend for accepted currencies.
The array you have there is probably just part of the model that the backend config uses as options to choose from. So if that array contains ('USD','CAD','AUD')
you can present it in the module configuration as a multi-select between those accepted currencies. And then later compare that config to $currencyCode
inside the function canUseForCurrency()
.
Upvotes: 1