"Arshpreet Singh" wrote in message
news:0b6372ce-3f16-431b-9e72-42d5c935d...@googlegroups.com...
I have to pass dictionary as function argument for following code:
[...]
result = authorize.Transaction.sale({
'amount': 40.00,
'credit_card': {
'card_number': '4111111111111111',
'expiration_date': '04/2014',
'card_code': '343',
}
[...]
I want to define 'credit-card' dictionary as argument in the function as
follows but it returns syntax error:
# define dictionary outside the function call:
credit_card={
'card_number': '4111111111111111',
'expiration_date': '04/2014',
'card_code': '343',
}
[...]
result = authorize.Transaction.sale({'amount': 40.00,credit_card})
Try this -
result = authorize.Transaction.sale({'amount': 40.00,
'credit_card':credit_card})
Frank Millman
--
https://mail.python.org/mailman/listinfo/python-list