django-payments icon indicating copy to clipboard operation
django-payments copied to clipboard

Split logic from Model, split address into billing, shipping, use functions instead prefixed fields

Open devkral opened this issue 6 years ago • 1 comments

Instead of using prefixed address fields in Model, use functions to retrieve the data. This way different data sources can be used and a fallback can be provided (BasePaymentWithAddress) in case only one address is available. BasePayment is split in Logic and Model. This allows better tests with less rendundancy. The resulting testmock is in testcommon (test_common would be executed)

devkral avatar Oct 06 '17 21:10 devkral

Codecov Report

Merging #149 into master will increase coverage by 1.68%. The diff coverage is 89.2%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #149      +/-   ##
==========================================
+ Coverage   79.13%   80.81%   +1.68%     
==========================================
  Files          27       28       +1     
  Lines        1649     1757     +108     
  Branches      190      194       +4     
==========================================
+ Hits         1305     1420     +115     
+ Misses        245      237       -8     
- Partials       99      100       +1
Impacted Files Coverage Δ
payments/sofort/__init__.py 87.71% <ø> (-1.17%) :arrow_down:
payments/testcommon.py 100% <100%> (ø)
payments/braintree/forms.py 93.1% <100%> (+0.51%) :arrow_up:
payments/stripe/forms.py 96.92% <100%> (+0.09%) :arrow_up:
payments/cybersource/__init__.py 66.56% <100%> (+0.1%) :arrow_up:
payments/authorizenet/__init__.py 79.54% <100%> (ø) :arrow_up:
payments/sagepay/__init__.py 90.76% <66.66%> (+2.05%) :arrow_up:
payments/models.py 84.12% <72.91%> (+9.33%) :arrow_up:
payments/utils.py 91.66% <90%> (-8.34%) :arrow_down:
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 49c93aa...0ec5816. Read the comment docs.

codecov-io avatar Oct 06 '17 21:10 codecov-io