Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default gateway can not be changed #1

Open
gavinwahl opened this issue Jan 25, 2012 · 4 comments
Open

default gateway can not be changed #1

gavinwahl opened this issue Jan 25, 2012 · 4 comments

Comments

@gavinwahl
Copy link
Member

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.

@rockymeza
Copy link
Contributor

This also raises the issue of switching accounts on a gateway. You would be unable to refund payments within the same gateway company, but on a different account. Is there anyway to avoid this problem, or are we stuck at telling developers to be careful?

@gavinwahl
Copy link
Member Author

You can still switch accounts -- configure authorize.net and when you get a new account add authorize.net.1.

@rockymeza
Copy link
Contributor

That's what I meant by careful.

@colinta
Copy link
Contributor

colinta commented Feb 22, 2012

working on this on the customer branch. using 'default': True as described above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants