lexik / LexikPayboxBundle

LexikPayboxBundle eases the implementation of the Paybox payment system
MIT License
40 stars 47 forks source link

Why are currencies enforced in ParameterResolver.php ? #43

Closed grimmlink closed 9 years ago

grimmlink commented 9 years ago

Hello there,

I'm working on an application that allows administrators to enable/disable currencies in a backoffice, but the problem is that the allowed currencies for paybox are set in the config.

What is the point of enforcing the list of currencies in the config file ? Also, i couldn't find out which currencies are supported by paybox, any idea ?

Thanks for the great work !

Olineuve commented 9 years ago

Hello, The currencies' list specified in the configuration, is just the list of authorized currencies. The actual currency of a transaction is specified in the parameter "DEVISE" for DirectPlus or "PBX_DEVISE" for System. You can find currencies' iso code on http://en.wikipedia.org/wiki/ISO_4217 Good luck :moneybag:

grimmlink commented 9 years ago

yeah i know this, i have a service to get the numeric code from the text code.

You mean my only solution is to put all the currency codes in the config ? I can already use many currencies, i was just wondering what was the point of limiting the currencies from config file ?

Olineuve commented 9 years ago

The point is just to validate currency code. Juste a simple way to avoid error due to a bad currency code.

You're right, with the current implementation, you have to set all the currencies' code you whant to use. As an evolution, it could be interresting to be able to set the "currencies" parameter to "false" to disable this validation.