#NEWLINE# def place_order( self , order_number , user , basket , shipping_address , shipping_method , shipping_charge , order_total , billing_address = None , **kwargs ) : #NEWLINE# #INDENT# '\n        Writes the order out to the DB including the payment models\n        ' #NEWLINE# shipping_address = self . create_shipping_address ( user , shipping_address ) #NEWLINE# billing_address = self . create_billing_address ( billing_address , shipping_address , ** kwargs ) #NEWLINE# if ( 'status' not in kwargs ) : #NEWLINE# #INDENT# status = self . get_initial_order_status ( basket ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# status = kwargs . pop ( 'status' ) #NEWLINE# #UNINDENT# order = OrderCreator ( ) . place_order ( user = user , order_number = order_number , basket = basket , shipping_address = shipping_address , shipping_method = shipping_method , shipping_charge = shipping_charge , total = order_total , billing_address = billing_address , status = status , ** kwargs ) #NEWLINE# self . save_payment_details ( order ) #NEWLINE# return order