Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Remove several FIXMEs
Pacu227a1d846863f
diff --git a/saleor/dashboard/order/forms.py b/saleor/dashboard/order/forms.pyindex 9bb9450214..5f8e342963 100644--- a/saleor/dashboard/order/forms.py+++ b/saleor/dashboard/order/forms.py@@ -352,7 +352,6 @@ class OrderMarkAsPaidForm(forms.Form):'Orders with payments can not be manually marked as paid'))def save(self):- # FIXME add more fields to the payment methoddefaults = {'total': self.order.total.gross.amount,'captured_amount': self.order.total.gross.amount,diff --git a/saleor/graphql/order/mutations/orders.py b/saleor/graphql/order/mutations/orders.pyindex 6537e2df6a..4714d894c6 100644--- a/saleor/graphql/order/mutations/orders.py+++ b/saleor/graphql/order/mutations/orders.py@@ -290,7 +290,6 @@ class OrderMarkAsPaid(BaseMutation):clean_order_mark_as_paid(order, errors)if errors:return OrderMarkAsPaid(errors=errors)- # FIXME add more fields to the payment methoddefaults = {'total': order.total.gross.amount,'captured_amount': order.total.gross.amount,diff --git a/saleor/payment/__init__.py b/saleor/payment/__init__.pyindex 46ac1eff11..ee7eee6cba 100644--- a/saleor/payment/__init__.py+++ b/saleor/payment/__init__.py@@ -71,7 +71,6 @@ class ChargeStatus:FULLY_REFUNDED = 'fully-refunded'# FIXME# We could probably support other statuses, like:- # partially charged# partially refunded# fully charged# ...?diff --git a/saleor/payment/gateways/braintree/__init__.py b/saleor/payment/gateways/braintree/__init__.pyindex 25f73e506d..d768c59572 100644--- a/saleor/payment/gateways/braintree/__init__.py+++ b/saleor/payment/gateways/braintree/__init__.py@@ -22,8 +22,6 @@ CONFIRM_MANUALLY = FalseTHREE_D_SECURE_REQUIRED = False# FIXME: Provide list of visible errors and messages translations-# FIXME: We should also store universal visible errors for all payment-# gateways, and parse gateway-specific errors to the unified version# Error codes whitelist should be a dict of code: error_msg_override# if no error_msg_override is provided,diff --git a/saleor/payment/gateways/braintree/forms.py b/saleor/payment/gateways/braintree/forms.pyindex 6efa3402ef..20c586dc6c 100644--- a/saleor/payment/gateways/braintree/forms.py+++ b/saleor/payment/gateways/braintree/forms.py@@ -19,7 +19,8 @@ class BraintreePaymentForm(PaymentForm):def __init__(self, *args, **kwargs):super().__init__(*args, **kwargs)self.fields['amount'].initial = self.payment.total- # FIXME if environment is Sandbox, we could provide couple of predefined+ # FIXME IMPROVEMENT:+ # if environment is Sandbox, we could provide couple of predefined# nounces for easier testingdef clean(self):diff --git a/saleor/payment/gateways/dummy/forms.py b/saleor/payment/gateways/dummy/forms.pyindex 6b2d5e22fe..a771964ec9 100644--- a/saleor/payment/gateways/dummy/forms.py+++ b/saleor/payment/gateways/dummy/forms.py@@ -13,7 +13,6 @@ class DummyPaymentForm(PaymentForm):def process_payment(self):- # FIXME add tests# Dummy provider requires no real tokenfake_token = self.gateway.get_client_token(**self.gateway_params)self.payment.authorize(fake_token)diff --git a/saleor/payment/models.py b/saleor/payment/models.pyindex db7d5c3b7b..deaa8b5da0 100644--- a/saleor/payment/models.py+++ b/saleor/payment/models.py@@ -27,7 +27,7 @@ class Payment(models.Model):Several payment methods can be used within a single order."""# FIXME we should provide an option to store the card for later usage- # FIXME probably we should have pending status+ # FIXME probably we should have pending status for 3d securegateway = models.CharField(max_length=255)is_active = models.BooleanField(default=True)#: Creation date and time@@ -125,7 +125,7 @@ class Payment(models.Model):self.is_active and self.charge_status == ChargeStatus.NOT_CHARGED)def can_capture(self):- # FIXME should have auth transaction+ # FIXME should also have an auth transactionnot_charged = self.charge_status == ChargeStatus.NOT_CHARGEDnot_fully_charged = (self.charge_status == ChargeStatus.CHARGEDdiff --git a/tests/gateway/test_braintree.py b/tests/gateway/test_braintree.pyindex 2b9daa64a6..b26776caec 100644--- a/tests/gateway/test_braintree.py+++ b/tests/gateway/test_braintree.py@@ -493,7 +493,6 @@ def test_braintree_payment_form(settings, payment_dummy):data=data, payment=payment, gateway=payment_gateway,gateway_params=gateway_params)assert form.is_valid()- # FIXME check if appropriate methods were calledform.process_payment()diff --git a/tests/test_order.py b/tests/test_order.pyindex cadcf900a6..7cc9419b34 100644--- a/tests/test_order.py+++ b/tests/test_order.py@@ -449,7 +449,7 @@ def test_order_payment_flow(# Select paymenturl = reverse('order:payment', kwargs={'token': order.token})- data = {'gateway':settings.DUMMY}+ data = {'gateway': settings.DUMMY}response = client.post(url, data, follow=True)assert len(response.redirect_chain) == 1