If you configure dinero like this:
dinero.configure({
'default': {
'type': 'dinero.gateways.AuthorizeNet',
# ...
}
})
and then switch gateways:
dinero.configure({
'default': {
'type': 'dinero.gateways.Braintree',
# ...
}
})
Oops, now all of your existing transactions won't work any more.
What if instead of using the name of the gateway to determine the default, it was something like:
dinero.configure({
'braintree': {
'type': 'dinero.gateways.Braintree',
'default': True,
# ...
},
'authorize.net': {
'type': 'dinero.gateways.AuthorizeNet',
# ...
}
})
Then the default could be safely changed without invalidating all existing transactions.
If you configure dinero like this:
and then switch gateways:
Oops, now all of your existing transactions won't work any more.
What if instead of using the name of the gateway to determine the default, it was something like:
Then the default could be safely changed without invalidating all existing transactions.