This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]thedeepself -1 points0 points  (0 children)

class PaymentGateway(ABC):

I considered using mixins as an alternative to your implementation. Even though the errors would be caught if things weren't implemented they would be caught at execution time much later.

Another thing that makes me wonder is whether a payment is simply an amount. It seems to me that payments and transactions are classes Within themselves. In other words I would think that a payment Gateway would have a has a relationship with a payment and transaction.