Index: /main/waeup.ikoba/trunk/src/waeup/ikoba/payments/paypal.py
===================================================================
--- /main/waeup.ikoba/trunk/src/waeup/ikoba/payments/paypal.py	(revision 12495)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/payments/paypal.py	(revision 12496)
@@ -300,5 +300,5 @@
         )
 
-    payer_id = schema.TextLine(
+    external_customer_id = schema.TextLine(
         title=u'Payer ID',
         description=(u'A unique identifier for the credit card. This '
@@ -390,6 +390,6 @@
           data. Required if using a stored credit card.
 
-    `payer_id`: Unique identifier. If none is given, we assign a
-          uuid. The uuid reads 'PAYER_<32 hex digits>'.
+    `external_customer_id`: Unique identifier. If none is given, we
+          assign a uuid. The uuid reads 'PAYER_<32 hex digits>'.
 
     `number`: Credit card number. Numeric characters only with no
@@ -426,15 +426,16 @@
     grok.implements(ICreditCard)
 
-    def __init__(self, paypal_id=None, payer_id=None, number=None,
-                 credit_card_type=None, expire_month=1, expire_year=2000,
-                 cvv2=None, first_name=None, last_name=None,
-                 billing_address=None, state=None, paypal_valid_until=None):
+    def __init__(self, paypal_id=None, external_customer_id=None,
+                 number=None, credit_card_type=None, expire_month=1,
+                 expire_year=2000, cvv2=None, first_name=None,
+                 last_name=None, billing_address=None, state=None,
+                 paypal_valid_until=None):
         if not re.match('^[0-9]+$', number):
             raise ValueError("Credit card number may "
                              "not contain non-numbers.")
-        if payer_id is None:
-            payer_id = u'PAYER_' + unicode(uuid.uuid4().hex)
+        if external_customer_id is None:
+            external_customer_id = u'PAYER_' + unicode(uuid.uuid4().hex)
         self.paypal_id = paypal_id
-        self.payer_id = payer_id
+        self.external_customer_id = external_customer_id
         self.number = number
         self.credit_card_type = credit_card_type
@@ -1189,4 +1190,11 @@
 
     def create_payment(self, payer, payment_item,  payee=None):
+        """Create a creditcard payment.
+
+        XXX: payer_id is deprecated by paypal: use
+        XXX: external_customer_id instead (also when creating credit cards).
+        XXX: This is a Good Thing(tm) because `payer_id` is already used in
+        XXX: some parts of the API for PayPal-assigned values.
+        """
         if not IPayer.providedBy(payer):
             payer = IPayer(payer)
Index: /main/waeup.ikoba/trunk/src/waeup/ikoba/payments/tests/test_paypal.py
===================================================================
--- /main/waeup.ikoba/trunk/src/waeup/ikoba/payments/tests/test_paypal.py	(revision 12495)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/payments/tests/test_paypal.py	(revision 12496)
@@ -286,5 +286,5 @@
             )
         assert credit_card.paypal_id is None
-        assert credit_card.payer_id is not None
+        assert credit_card.external_customer_id is not None
         assert credit_card.number == u"12345678"
         assert credit_card.credit_card_type == "visa"
@@ -298,6 +298,6 @@
         assert credit_card.paypal_valid_until is None
 
-    def test_payer_id_given(self):
-        # we do not override given payer ids
+    def test_external_customer_id_given(self):
+        # we do not override given curstomer ids
         credit_card = CreditCard(
             number=u"12345678",
@@ -305,10 +305,10 @@
             expire_month=4,
             expire_year=2012,
-            payer_id=u'MySpecialPayerId',
-            )
-        assert credit_card.payer_id == u'MySpecialPayerId'
-
-    def test_payer_id_not_given(self):
-        # in case no payer id is given, we generate one
+            external_customer_id=u'MySpecialPayerId',
+            )
+        assert credit_card.external_customer_id == u'MySpecialPayerId'
+
+    def test_external_customer_id_not_given(self):
+        # in case no customer id is given, we generate one
         credit_card = CreditCard(
             number=u"12345678",
@@ -317,6 +317,7 @@
             expire_year=2012,
             )
-        # our payer ids contain a leading 'PAYER_' and 32 hex digits
-        assert re.match('PAYER_[0-9a-f]{32}$', credit_card.payer_id)
+        # our customer ids contain a leading 'PAYER_' and 32 hex digits
+        assert re.match(
+            'PAYER_[0-9a-f]{32}$', credit_card.external_customer_id)
 
     def test_number_is_checked(self):
@@ -340,5 +341,5 @@
         credit_card = CreditCard(
             credit_card_type=u"visa",
-            payer_id=u"PAYER_0123456789012345678901",
+            external_customer_id=u"PAYER_0123456789012345678901",
             number=u"4417119669820331",
             expire_month=11,
@@ -353,5 +354,5 @@
                 "type": u"visa",
                 "number": u"4417119669820331",
-                "payer_id": u"PAYER_0123456789012345678901",
+                "external_customer_id": u"PAYER_0123456789012345678901",
                 "expire_month": u"11",
                 "expire_year": u"2018",
@@ -1213,4 +1214,7 @@
         result = payment.create()
         assert result is True
+        
+        ###
+        ### hier gehts weiter
 
 
