diff --git a/amazon_payments/views.py b/amazon_payments/views.py index 9fedffe..d141bac 100644 --- a/amazon_payments/views.py +++ b/amazon_payments/views.py @@ -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\ @@ -706,4 +709,4 @@ def post(self, request, *args, **kwargs): return HttpResponse( simplejson.dumps(data), mimetype="application/json" - ) \ No newline at end of file + ) diff --git a/setup.py b/setup.py index 269b4fc..ed06232 100644 --- a/setup.py +++ b/setup.py @@ -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="simonkagwe@yahoo.com",