Skip to content

Commit

Permalink
Fix Bug in callback
Browse files Browse the repository at this point in the history
  • Loading branch information
enyachoke committed Sep 22, 2018
1 parent 3937dd7 commit 615368b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions pretix_mpesa/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ def stk_callback(request, *args, **kwargs):
try:
payment = OrderPayment.objects.get(id=online_checkout.account_reference)
logger.info('Payment Found')
try:
payment.confirm()
except Quota.QuotaExceededException:
pass
if len(meta_data) > 0:
try:
payment.confirm()
except Quota.QuotaExceededException:
pass
except OrderPayment.DoesNotExist:
logger.info('Payment Not found')
pass
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def run(self):

setup(
name='pretix-mpesa',
version='1.0.1',
version='1.0.2',
description='Adds safaricom mpesa payments to pretix',
long_description=long_description,
url='https://github.com/enyachoke/pretix-mpesa',
Expand Down

0 comments on commit 615368b

Please sign in to comment.