diff --git a/datacenterlight/utils.py b/datacenterlight/utils.py index 58d9de61..f65f3588 100644 --- a/datacenterlight/utils.py +++ b/datacenterlight/utils.py @@ -179,7 +179,7 @@ def create_tax_id(stripe_customer_id, vat_number): stripe_utils = StripeUtils() tax_id_response = stripe_utils.create_tax_id_for_user( stripe_customer_id, - value=vat_number, + vat_number=vat_number, ) tax_id_obj = tax_id_response.get('response_object') diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 36b8e505..7110e7a8 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -548,14 +548,7 @@ class PaymentOrderView(FormView): ) if 'response_object' in validate_result: - address_form.add_error( - "__all__", validate_result["error"] - ) - return self.render_to_response( - self.get_context_data( - billing_address_form=address_form - ) - ) + raise forms.ValidationError(validate_result["error"]) request.session["vat_validation_status"] = validate_result["status"] request.session["vat_validated_on"] = validate_result["validated_on"]