Index: main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/payments/payment.py
===================================================================
--- main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/payments/payment.py	(revision 12695)
+++ main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/payments/payment.py	(revision 12696)
@@ -25,5 +25,7 @@
 from zope.component import getUtilitiesFor
 from zope.event import notify
+from waeup.ikoba.interfaces import MessageFactory as _
 from waeup.ikoba.utils.helpers import attrs_to_fields
+from waeup.ikoba.utils.logger import Logger
 from waeup.ikoba.payments.interfaces import (
     IPayment, STATE_UNPAID, STATE_FAILED, STATE_PAID,
@@ -31,5 +33,25 @@
     IPaymentGatewayServicesLister,
     )
-from waeup.ikoba.utils.logger import Logger
+
+
+def format_payment_item_values(payment_item_values, currency):
+    """Format tuples (description, currency, amount) for output.
+
+    `currency` passed in is the 'target' currency.
+
+    Returns a list of formated values. Last item is total sum.
+    XXX: we do not really respect currency. If different items
+         have different currencies, we are choked.
+    """
+    result = []
+    total = decimal.Decimal("0.00")
+    for descr, item_currency, amount in payment_item_values:
+        total += amount
+        if item_currency != currency:
+            raise ValueError(
+                "Different currencies in payment items not supported.")
+        result.append((descr, '%s %0.2f' % (item_currency, amount)))
+    result.append((_('Total'), '%s %0.2f' % (currency, total)))
+    return result
 
 
Index: main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/payments/tests/test_payment.py
===================================================================
--- main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/payments/tests/test_payment.py	(revision 12695)
+++ main/waeup.ikoba/branches/uli-payments/src/waeup/ikoba/payments/tests/test_payment.py	(revision 12696)
@@ -28,5 +28,5 @@
     )
 from waeup.ikoba.payments.payment import (
-    Payment, get_payment_providers, PaymentItem,
+    Payment, get_payment_providers, PaymentItem, format_payment_item_values,
     )
 from waeup.ikoba.testing import (FunctionalLayer, FunctionalTestCase)
@@ -61,4 +61,25 @@
         assert result['some_name'] is fake_util
 
+    def test_format_payment_item_values(self):
+        # we can format lists of payment item values
+        result = format_payment_item_values(
+            [(u'Item 1', 'USD', decimal.Decimal("12.123")),
+             (u'Item 2', 'USD', decimal.Decimal("12.002")),
+             ], 'USD')
+        self.assertEqual(
+            result, [(u'Item 1', 'USD 12.12'),
+                     (u'Item 2', 'USD 12.00'),
+                     (u'Total', 'USD 24.12')]
+            )
+
+    def test_format_payment_item_values_req_single_currency(self):
+        # we require one currency for all items, yet.
+        self.assertRaises(
+            ValueError, format_payment_item_values,
+            [(u'Item 1', 'USD', decimal.Decimal("12.12")),
+             (u'Item 2', 'EUR', decimal.Decimal("50")),
+             ],
+            'USD')
+
 
 class FunctionalHelperTests(FunctionalTestCase):
