Index: /main/waeup.ikoba/trunk/src/waeup/ikoba/payments/paypal.py
===================================================================
--- /main/waeup.ikoba/trunk/src/waeup/ikoba/payments/paypal.py	(revision 12453)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/payments/paypal.py	(revision 12454)
@@ -1142,17 +1142,30 @@
         """Store `paypal_credit_card` in vault.
 
-        Returns a credit card token in case of success.
+        Returns a credit card token in case of success. Otherwise an
+        IOError is raised.
 
         `paypal_credit_card` must provide `ICreditCard`. The credit
         card created is stored at PayPal and gets a token stored
-        locally.
-
-        If no `creditcards` are available in local site, we create a
-        container.
+        locally (in site['creditcards']).
+
+        If no `creditcards` folder is available in local site, we
+        create a new container.
         """
         site = grok.getSite()
         if not 'creditcards' in site:
             site['creditcards'] = grok.Container()
-        return
+        pp_credit_card = paypalrestsdk.CreditCard(
+            paypal_credit_card.to_dict())
+        result = pp_credit_card.create()
+        if not result:
+            # error
+            raise IOError(pp_credit_card.error)
+        result = CreditCardToken(
+            pp_credit_card.id, pp_credit_card.payer_id,
+            pp_credit_card.number, pp_credit_card.type,
+            pp_credit_card.expire_month, pp_credit_card.expire_year
+            )
+        site['creditcards'][pp_credit_card.payer_id] = result
+        return result
 
     def create_payment(self, payer, payment_item,  payee=None):
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 12453)
+++ /main/waeup.ikoba/trunk/src/waeup/ikoba/payments/tests/test_paypal.py	(revision 12454)
@@ -1156,12 +1156,31 @@
         assert service.get_credit_card(u'CARD2') is None
 
-    def test_store_credit_card_no_credcard_container(self):
-        # a missing creditcards container is created on-the-fly
+    @external_paypal_test
+    def test_store_credit_card(self):
+        # we can (and must) store credit card data online.
         site = self.create_site()
         assert 'creditcards' not in site
         service = PayPalCreditCardService()
         credit_card = self.get_credit_card()
-        service.store_credit_card(credit_card)
+        result = service.store_credit_card(credit_card)
+        # a missing creditcards container is created on-the-fly
         assert 'creditcards' in site
+        assert ICreditCardToken.providedBy(result)
+        assert result.payer_id in site['creditcards']
+        assert site['creditcards'][result.payer_id] == result
+
+    @external_paypal_test
+    def test_store_credit_card_invalid(self):
+        # an exception is raised with invalid credit cards.
+        site = self.create_site()
+        service = PayPalCreditCardService()
+        credit_card = CreditCard(
+            number=u"12345678",
+            credit_card_type="visa",
+            expire_month=4,
+            expire_year=2012,
+            )
+        self.assertRaises(
+            IOError, service.store_credit_card, credit_card)
 
     def test_create_payment_no_credictard(self):
