- Timestamp:
- 20 Jan 2015, 05:57:59 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/payments/paypal.py
r12494 r12496 300 300 ) 301 301 302 payer_id = schema.TextLine(302 external_customer_id = schema.TextLine( 303 303 title=u'Payer ID', 304 304 description=(u'A unique identifier for the credit card. This ' … … 390 390 data. Required if using a stored credit card. 391 391 392 ` payer_id`: Unique identifier. If none is given, we assign a393 uuid. The uuid reads 'PAYER_<32 hex digits>'.392 `external_customer_id`: Unique identifier. If none is given, we 393 assign a uuid. The uuid reads 'PAYER_<32 hex digits>'. 394 394 395 395 `number`: Credit card number. Numeric characters only with no … … 426 426 grok.implements(ICreditCard) 427 427 428 def __init__(self, paypal_id=None, payer_id=None, number=None, 429 credit_card_type=None, expire_month=1, expire_year=2000, 430 cvv2=None, first_name=None, last_name=None, 431 billing_address=None, state=None, paypal_valid_until=None): 428 def __init__(self, paypal_id=None, external_customer_id=None, 429 number=None, credit_card_type=None, expire_month=1, 430 expire_year=2000, cvv2=None, first_name=None, 431 last_name=None, billing_address=None, state=None, 432 paypal_valid_until=None): 432 433 if not re.match('^[0-9]+$', number): 433 434 raise ValueError("Credit card number may " 434 435 "not contain non-numbers.") 435 if payer_id is None:436 payer_id = u'PAYER_' + unicode(uuid.uuid4().hex)436 if external_customer_id is None: 437 external_customer_id = u'PAYER_' + unicode(uuid.uuid4().hex) 437 438 self.paypal_id = paypal_id 438 self. payer_id = payer_id439 self.external_customer_id = external_customer_id 439 440 self.number = number 440 441 self.credit_card_type = credit_card_type … … 1189 1190 1190 1191 def create_payment(self, payer, payment_item, payee=None): 1192 """Create a creditcard payment. 1193 1194 XXX: payer_id is deprecated by paypal: use 1195 XXX: external_customer_id instead (also when creating credit cards). 1196 XXX: This is a Good Thing(tm) because `payer_id` is already used in 1197 XXX: some parts of the API for PayPal-assigned values. 1198 """ 1191 1199 if not IPayer.providedBy(payer): 1192 1200 payer = IPayer(payer)
Note: See TracChangeset for help on using the changeset viewer.