-
-
Notifications
You must be signed in to change notification settings - Fork 283
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
Add external Payments (BankTransfer, DirectPayment) #152
base: main
Are you sure you want to change the base?
Conversation
…s (allows much more freedom) and adjust all providers for the change use create_test_payment for tests, TestPayment is now a Mock use unittest mocks when python3
Codecov Report
@@ Coverage Diff @@
## master #152 +/- ##
==========================================
+ Coverage 79.13% 80.97% +1.83%
==========================================
Files 27 30 +3
Lines 1649 1819 +170
Branches 190 204 +14
==========================================
+ Hits 1305 1473 +168
+ Misses 245 239 -6
- Partials 99 107 +8
Continue to review full report at Codecov.
|
I have been waiting for this. @devkral thank you. |
@devkral , great job. Can you provide an external repository with this PR yet merged in the latest version of django_payments so I can clone it as is and use in my saleor project? |
the state is also very unsatisfying for me. I solved all problems but no feedback (may I changed too much). I can do and think about a fork. |
Would you mind submitting the API changes as a separate pull request? We generally encourage third-party payment gateway to release separate packages (as we usually have no way to test and maintain them) but it seems that you've also refactored parts of the existing API which we'll be happy to review. See https://github.com/esistgut/django-payments-bnlepos for an example of a payment implementation that lives in a separate package. |
I really would like to but I depend on some pull requests which were not integrated: |
I started my fork. I think it is the best thing because I can eliminate bad design decisions this way. |
@patrys I pushed the PRs I required separately and waited 6 months now with no response. |
And anyway the changes I would really like to integrate are too heavy weight. It is not realistic that you will ever integrate them (breaking api into small chunks, renaming payments to web_payments because of name conflicts, non-django framework support) |
HI, any update? |
yes, integration will unlikely happen, so I put all my efforts into my fork (see above), which is stable now. |
Just to reiterate: there is no reason for all backends to live in this repository. The code was built in a way that makes loading third party backends no different from loading the first party ones. You don't need to fork to maintain a custom backend. If the core needs to change for a backend to work then we're looking forward to patches but we can't possibly take over maintenance of all possible bank and payment gateway integrations as we're only humans, I hope that does not surprise anyone 😄 |
that's absolutely true but I was too headstrong with my ideas :). |
Sometimes it is useful to have placeholders for certain payments (BankTransfer and manual cashing process).
I provide here two Providers for this purpose:
DirectPaymentProvider: versatile Provider, for e.g. voucher systems or cash on delivery.
BankTransferProvider: for normal bank transfers. Some other logic has to validate payments
This pull request depends on the pull requests: #148, #149