Merge branch 'master' into marc_provision
commit
e5a907644c
|
@ -1,5 +0,0 @@
|
|||
*.db
|
||||
*.pyc
|
||||
*.log
|
||||
settings/me.py
|
||||
*.dot
|
|
@ -291,12 +291,13 @@ class UnifiedCampaignTests(TestCase):
|
|||
|
||||
self.assertEqual(charge_exception, None)
|
||||
|
||||
# expect to have 2 events (there is a possibility that someone else could be running tests on this stripe account at the same time)
|
||||
# expect to have 3 events (there is a possibility that someone else could be running tests on this stripe account at the same time)
|
||||
# events returned sorted in reverse chronological order.
|
||||
|
||||
self.assertEqual(len(events), 2)
|
||||
|
||||
self.assertEqual(len(events), 3)
|
||||
self.assertEqual(events[0].type, 'charge.succeeded')
|
||||
self.assertEqual(events[1].type, 'customer.created')
|
||||
self.assertEqual(events[1].type, 'customer.card.created')
|
||||
self.assertEqual(events[2].type, 'customer.created')
|
||||
|
||||
# now feed each of the events to the IPN processor.
|
||||
ipn_url = reverse("HandleIPN", args=('stripelib',))
|
||||
|
@ -322,12 +323,13 @@ class UnifiedCampaignTests(TestCase):
|
|||
# we should have an exception when the charge was attempted
|
||||
self.assertTrue(charge_exception is not None)
|
||||
|
||||
# expect to have 2 events (there is a possibility that someone else could be running tests on this stripe account at the same time)
|
||||
# expect to have 3 events (there is a possibility that someone else could be running tests on this stripe account at the same time)
|
||||
# events returned sorted in reverse chronological order.
|
||||
|
||||
self.assertEqual(len(events), 2)
|
||||
self.assertEqual(len(events), 3)
|
||||
self.assertEqual(events[0].type, 'charge.failed')
|
||||
self.assertEqual(events[1].type, 'customer.created')
|
||||
self.assertEqual(events[1].type, 'customer.card.created')
|
||||
self.assertEqual(events[2].type, 'customer.created')
|
||||
|
||||
# now feed each of the events to the IPN processor.
|
||||
ipn_url = reverse("HandleIPN", args=('stripelib',))
|
||||
|
|
|
@ -36,19 +36,23 @@ from regluit.payment.parameters import (
|
|||
from regluit.payment.signals import transaction_charged, transaction_failed
|
||||
from regluit.utils.localdatetime import now, zuluformat
|
||||
|
||||
# as of 2012.11.05
|
||||
STRIPE_EVENT_TYPES = ['account.updated', 'account.application.deauthorized',
|
||||
'charge.succeeded', 'charge.failed', 'charge.refunded', 'charge.disputed',
|
||||
'customer.created', 'customer.updated', 'customer.deleted',
|
||||
'customer.subscription.created', 'customer.subscription.updated',
|
||||
'customer.subscription.deleted', 'customer.subscription.trial_will_end',
|
||||
'customer.discount.created', 'customer.discount.updated', 'customer.discount.deleted',
|
||||
'invoice.created', 'invoice.updated', 'invoice.payment_succeeded', 'invoice.payment_failed',
|
||||
'invoiceitem.created', 'invoiceitem.updated', 'invoiceitem.deleted',
|
||||
'plan.created', 'plan.updated', 'plan.deleted',
|
||||
'coupon.created', 'coupon.updated', 'coupon.deleted',
|
||||
'transfer.created', 'transfer.updated', 'transfer.failed',
|
||||
'ping']
|
||||
# as of 2013.07.15
|
||||
# ['charge.disputed', 'coupon.updated'] are legacy events -- don't know whether to
|
||||
# include them in list
|
||||
|
||||
STRIPE_EVENT_TYPES = ['account.updated', 'account.application.deauthorized', 'balance.available',
|
||||
'charge.succeeded', 'charge.failed', 'charge.refunded', 'charge.captured',
|
||||
'charge.dispute.created', 'charge.dispute.updated', 'charge.dispute.closed',
|
||||
'customer.created', 'customer.updated', 'customer.deleted',
|
||||
'customer.card.created', 'customer.card.updated', 'customer.card.deleted',
|
||||
'customer.subscription.created', 'customer.subscription.updated',
|
||||
'customer.subscription.deleted', 'customer.subscription.trial_will_end',
|
||||
'customer.discount.created', 'customer.discount.updated',
|
||||
'customer.discount.deleted', 'invoice.created', 'invoice.updated',
|
||||
'invoice.payment_succeeded', 'invoice.payment_failed', 'invoiceitem.created',
|
||||
'invoiceitem.updated', 'invoiceitem.deleted', 'plan.created', 'plan.updated',
|
||||
'plan.deleted', 'coupon.created', 'coupon.deleted', 'transfer.created',
|
||||
'transfer.updated', 'transfer.paid', 'transfer.failed', 'ping']
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
Loading…
Reference in New Issue