Skip to content

Commit

Permalink
Merge pull request #6 from britco/suppress-messages
Browse files Browse the repository at this point in the history
removed error propagation into the message framework
  • Loading branch information
monokrome committed Jul 28, 2015
2 parents bbd4fbd + 7dcb112 commit 30946bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions amazon_payments/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,15 +657,18 @@ def post(self, request, *args, **kwargs):
else:
data['msg'] = _("Sorry, there's a problem processing your order "
"via Amazon. Please try again later.")
messages.error(request, data['msg'])

return HttpResponse(
simplejson.dumps(data),
mimetype="application/json"
mimetype="application/json",
status_code=428
)
if not amazon_order_details:
data['msg'] = _("There no amazon details")
return HttpResponse(
simplejson.dumps(data),
mimetype="application/json"
mimetype="application/json",
status_code=428
)
# Get shipping address
amazon_shipping_address = amazon_order_details.Destination\
Expand Down Expand Up @@ -706,4 +709,4 @@ def post(self, request, *args, **kwargs):
return HttpResponse(
simplejson.dumps(data),
mimetype="application/json"
)
)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name='django-oscar-amazon-payments',
version="0.2.1",
version="0.2.2",
url='https://github.com/simonkagwe/django-oscar-amazon-payments',
author="Simon Kagwi",
author_email="[email protected]",
Expand Down

0 comments on commit 30946bc

Please sign in to comment.