fixws and 'new' button in grid query
This commit is contained in:
1 parent
01f6f82cdf
commit
d281acb421
305 files changed
+8352
-8032
No files matched your search
@@ -17,7 +17,7 @@ class Stripe:
|
||||
print Stripe(key).check(d['id'])
|
||||
print Stripe(key).refund(d['id'])
|
||||
Sample output (python dict):
|
||||
{u'fee': 0, u'description': u'test charge', u'created': 1321242072, u'refunded': False, u'livemode': False, u'object': u'charge', u'currency': u'usd', u'amount': 100, u'paid': True, u'id': u'ch_sdjasgfga83asf', u'card': {u'exp_month': 5, u'country': u'US', u'object': u'card', u'last4': u'4242', u'exp_year': 2012, u'type': u'Visa'}}
|
||||
{u'fee': 0, u'description': u'test charge', u'created': 1321242072, u'refunded': False, u'livemode': False, u'object': u'charge', u'currency': u'usd', u'amount': 100, u'paid': True, u'id': u'ch_sdjasgfga83asf', u'card': {u'exp_month': 5, u'country': u'US', u'object': u'card', u'last4': u'4242', u'exp_year': 2012, u'type': u'Visa'}}
|
||||
|
||||
if paid is True than transaction was processed
|
||||
"""
|
||||
@@ -27,11 +27,11 @@ class Stripe:
|
||||
def charge(self,
|
||||
amount,
|
||||
currency='usd',
|
||||
card_number='4242424242424242',
|
||||
card_number='4242424242424242',
|
||||
card_exp_month='5',
|
||||
card_exp_year='2012',
|
||||
card_cvc_check='123',
|
||||
description='test charge'):
|
||||
description='test charge'):
|
||||
params = urllib.urlencode({'amount':amount,
|
||||
'currency':currency,
|
||||
'card[number]':card_number,
|
||||
@@ -62,3 +62,5 @@ if __name__=='__main__':
|
||||
print 'paid',s['paid'],s['amount'] ,s['currency']
|
||||
s = Stripe(key).refund(d[u'id'])
|
||||
print 'refunded',s['refunded']
|
||||
|
||||
|
||||
Reference in new issue
Block a user