jazzband / django-payments

Universal payment handling for Django.
https://django-payments.readthedocs.io
Other
1.05k stars 282 forks source link

Question: new provider with modeled merchant support #161

Closed WhyNotHugo closed 3 years ago

WhyNotHugo commented 6 years ago

First of all, this is more of a question than an actual issue. I apologize if this is the wrong place (didn't find any place better in the docs).

I'd like to work on integrating to new providers to django-payments: MercadoPago (works on many latinamerican countries) and TodoPago (works in Argentina).

I've a standalone django app for the former, and a working implementation in a few closed apps for the latter. I'd like to move these into django-payments. Mostly because I'm looking to use saleor, which uses django-payments, but and also open-source the latter.

However, the approach I've taken for these is slightly different to what django-payments does: My approach has generally been to have an Account/ Merchant object, which has the API keys, etc for communicating with the gateway, and relate payments to it. On the other hand, django-payments seems to keep this in the settings file.

The approach I've taken has a couple of advantages:

I assume this approach hasn't been considered before, but, would a PR implementing new gateways that uses this approach be acceptable? Or, to ask for it the opposite way: is the current approach set in stone?

Thanks, and sorry for such a long issue. 🙂 Looking forward to contributing.

mattaereal commented 2 years ago

May I ask how you ended up integrating MercadoPago to Saleor?

WhyNotHugo commented 2 years ago

I'm not using Saleor.