This PR makes sure we merge the configuration defined in the global plugin config (usually a file deployed with the application), with the config of each of the accounts defined for a plugin.
For the cybersource plugin, .the tenant config hash would look like this:
That means we can't just merge the two config hashes (which is pointless, since they both contain a :cybersource key). We have to, instead, extracts the global config in the global_defaults variable, and for each account, merge its configuration with the global_defaults hash. Nothing is overwritten.
This PR makes sure we merge the configuration defined in the global plugin config (usually a file deployed with the application), with the config of each of the accounts defined for a plugin.
For the cybersource plugin, .the tenant config hash would look like this:
While the global config looks like:
That means we can't just merge the two config hashes (which is pointless, since they both contain a
:cybersource
key). We have to, instead, extracts the global config in theglobal_defaults
variable, and for each account, merge its configuration with theglobal_defaults
hash. Nothing is overwritten.