File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -69,8 +69,12 @@ def is_payment_valid(order, mode):
6969
7070
7171def check_billing_info (data , order ):
72- if order .event .is_billing_info_mandatory and not (data .get ('company' ) and data .get ('address' ) and data .get ('city' ) and
73- data .get ('zipcode' ) and data .get ('country' )):
72+ if data .get ('amount' ) and data .get ('amount' ) > 0 and order .event .is_billing_info_mandatory :
73+ raise UnprocessableEntity ({'pointer' : '/data/attributes/is_billing_enabled' },
74+ "Billing information is mandatory for paid orders for this event" )
75+
76+ if order .event .is_billing_info_mandatory and not (data .get ('company' ) and data .get ('address' )
77+ and data .get ('city' ) and data .get ('zipcode' ) and data .get ('country' )):
7478 raise UnprocessableEntity ({'pointer' : '/data/attributes/is_billing_enabled' },
7579 "Billing information incomplete" )
7680
You can’t perform that action at this time.
0 commit comments