fusionbox / dinero Goto Github PK
View Code? Open in Web Editor NEWGateway-agnostic payment processing for Python
Home Page: http://dinero.readthedocs.org
Gateway-agnostic payment processing for Python
Home Page: http://dinero.readthedocs.org
The authorize.net gateway tries to auto-detect the correct endpoint url based on the credentials provided. This requires sending them a test request, which can take 5 seconds when they're having a bad day. This makes the development server annoyingly slow, and means reloading code on the live server takes a long time as well.
If dinero was django specific, it would be very easy to cache this information, so authorize.net was only contacted when the credentials changed. I don't want to depend on django, though, so is there some other way to cache or make this faster?
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.
I thought it would be nice to do something like this:
>>> customer = dinero.Customer.retrieve('xxx')
>>> card = customer.cards[0]
>>> print 'Card on File:'
>>> print '{} ({})'.format(card.card_type, card.last_4)
But it doesn't work. This seems to be a limitation on the Authorize.net side though.
I thought I would just report this in case anybody else was having this problem.
args[0]
, args[0][0][1]
... this is kind a of unreadable.
It would be nice to have explicit __init__
on DineroException
so that we know what's happening.
Like:
class DineroException:
def __init__(self, message):
self.message = message
super().__init__(message)
dinero
needs to support the Braintree S2S payment gateway.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.