Changeset 12497 for main/waeup.ikoba
- Timestamp:
- 20 Jan 2015, 06:13:00 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/payments
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/payments/paypal.py
r12496 r12497 462 462 ) 463 463 464 payer_id = schema.TextLine(464 external_customer_id = schema.TextLine( 465 465 title=u'Payer ID', 466 466 description=(u'A unique identifier for the credit card. This ' … … 512 512 grok.implements(ICreditCardToken) 513 513 514 def __init__(self, credit_card_id, payer_id=None, last4=None,514 def __init__(self, credit_card_id, external_customer_id=None, last4=None, 515 515 credit_card_type=None, expire_month=None, expire_year=None): 516 516 self.credit_card_id = credit_card_id 517 self. payer_id = payer_id517 self.external_customer_id = external_customer_id 518 518 self.last4 = last4 519 519 self.credit_card_type = credit_card_type -
main/waeup.ikoba/trunk/src/waeup/ikoba/payments/tests/test_paypal.py
r12496 r12497 386 386 ) 387 387 assert token.credit_card_id == u"12345678" 388 assert token. payer_id is None388 assert token.external_customer_id is None 389 389 assert token.credit_card_type is None 390 390 assert token.expire_month is None … … 392 392 assert token.last4 is None 393 393 394 def test_ payer_id_given(self):395 # we do not override given payer ids394 def test_customer_id_given(self): 395 # we do not override given customer ids 396 396 token = CreditCardToken( 397 397 credit_card_id=u"12345678", 398 payer_id=u'MySpecialPayerId',399 ) 400 assert token. payer_id == u'MySpecialPayerId'398 external_customer_id=u'MySpecialPayerId', 399 ) 400 assert token.external_customer_id == u'MySpecialPayerId' 401 401 402 402 def test_to_str(self): … … 404 404 token = CreditCardToken( 405 405 credit_card_type=u"visa", 406 payer_id=u"PAYER_0123456789012345678901",406 external_customer_id=u"PAYER_0123456789012345678901", 407 407 credit_card_id=u"12345678", 408 408 last4="8901", … … 414 414 { 415 415 "credit_card_id": u"12345678", 416 " payer_id": u"PAYER_0123456789012345678901",416 "external_customer_id": u"PAYER_0123456789012345678901", 417 417 "last4": u"8901", 418 418 "type": u"visa", … … 457 457 token = CreditCardToken( 458 458 credit_card_type=u"visa", 459 payer_id=u"PAYER_0123456789012345678901",459 external_customer_id=u"PAYER_0123456789012345678901", 460 460 credit_card_id=u"12345678", 461 461 last4="8901", … … 470 470 "credit_card_token": { 471 471 "credit_card_id": u"12345678", 472 " payer_id": u"PAYER_0123456789012345678901",472 "external_customer_id": u"PAYER_0123456789012345678901", 473 473 "last4": u"8901", 474 474 "type": u"visa",
Note: See TracChangeset for help on using the changeset viewer.