From 62031b72fd1578971ca0b72d45d4a5389db9ca55 Mon Sep 17 00:00:00 2001 From: Nathan Chapman Date: Sun, 15 May 2022 07:44:11 -0600 Subject: [PATCH] Change grind details location to name --- src/storefront/payments.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/storefront/payments.py b/src/storefront/payments.py index 8879c8c..e31da49 100644 --- a/src/storefront/payments.py +++ b/src/storefront/payments.py @@ -74,11 +74,11 @@ class CreateOrder(PayPalClient): """Method to create body with CAPTURE intent""" processed_items = [{ # Shows within upper-right dropdown during payment approval - 'name': f'{item["product"]}', + 'name': f'{item["product"]}: ' + ', '.join([next((f"{value['quantity']} x {v[1]}" for i, v in enumerate(CoffeeGrind.GRIND_CHOICES) if v[0] == key), None) + for key, value in item['variations'].items()])[:100], # Item details will also be in the completed paypal.com transaction view - 'description': ', '.join([next((f"{value['quantity']} x {v[1]}" for i, v in enumerate(CoffeeGrind.GRIND_CHOICES) if v[0] == key), None) - for key, value in item['variations'].items()]), + 'description': item['product'].subtitle, 'unit_amount': { 'currency_code': settings.DEFAULT_CURRENCY, 'value': f'{item["price"]}'