Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Discount info will be added to all payments
Krzysztof Wolskiedb88f612cbb
diff --git a/saleor/order/models.py b/saleor/order/models.pyindex 57b8ac7fb3..e6f965e104 100644--- a/saleor/order/models.py+++ b/saleor/order/models.py@@ -9,7 +9,7 @@ from django.core.exceptions import ObjectDoesNotExistfrom django.core.urlresolvers import reversefrom django.core.validators import MaxValueValidator, MinValueValidatorfrom django.db import models-from django.utils.encoding import python_2_unicode_compatible, smart_text+from django.utils.encoding import python_2_unicode_compatiblefrom django.utils.timezone import nowfrom django.utils.translation import pgettext_lazyfrom django_prices.models import PriceField@@ -438,10 +438,8 @@ class Payment(BasePayment):currency=settings.DEFAULT_CURRENCY)for item in self.order.get_items()]- # PayPal require discount info as item with negative price.- provider, _ = settings.PAYMENT_VARIANTS.get(self.variant, (None, None))voucher = self.order.voucher- if provider and 'PaypalProvider' in provider and voucher is not None:+ if voucher is not None:items.append(PurchasedItem(name=self.order.discount_name,sku='DISCOUNT',