#NEWLINE# def save_authorize_response( response ) : #NEWLINE# #INDENT# data = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# data [ 'response_code' ] = int ( response [ 0 ] ) #NEWLINE# data [ 'response_reason_code' ] = response [ 2 ] #NEWLINE# data [ 'response_reason_text' ] = response [ 3 ] #NEWLINE# data [ 'authorization_code' ] = response [ 4 ] #NEWLINE# data [ 'address_verification_response' ] = response [ 5 ] #NEWLINE# data [ 'transaction_id' ] = response [ 6 ] #NEWLINE# data [ 'invoice_number' ] = response [ 7 ] #NEWLINE# data [ 'description' ] = response [ 8 ] #NEWLINE# data [ 'amount' ] = response [ 9 ] #NEWLINE# data [ 'method' ] = response [ 10 ] #NEWLINE# data [ 'transaction_type' ] = response [ 11 ] #NEWLINE# data [ 'customer_id' ] = response [ 12 ] #NEWLINE# data [ 'first_name' ] = response [ 13 ] #NEWLINE# data [ 'last_name' ] = response [ 14 ] #NEWLINE# data [ 'company' ] = response [ 15 ] #NEWLINE# data [ 'address' ] = response [ 16 ] #NEWLINE# data [ 'city' ] = response [ 17 ] #NEWLINE# data [ 'state' ] = response [ 18 ] #NEWLINE# data [ 'zip_code' ] = response [ 19 ] #NEWLINE# data [ 'country' ] = response [ 20 ] #NEWLINE# data [ 'phone' ] = response [ 21 ] #NEWLINE# data [ 'fax' ] = response [ 22 ] #NEWLINE# data [ 'email' ] = response [ 23 ] #NEWLINE# data [ 'shipping_first_name' ] = response [ 24 ] #NEWLINE# data [ 'shipping_last_name' ] = response [ 25 ] #NEWLINE# data [ 'shipping_company' ] = response [ 26 ] #NEWLINE# data [ 'shipping_address' ] = response [ 27 ] #NEWLINE# data [ 'shipping_city' ] = response [ 28 ] #NEWLINE# data [ 'shipping_state' ] = response [ 29 ] #NEWLINE# data [ 'shipping_zip_code' ] = response [ 30 ] #NEWLINE# data [ 'shipping_country' ] = response [ 31 ] #NEWLINE# data [ 'card_code_response' ] = response [ 38 ] #NEWLINE# return AuthorizeAIMResponse . objects . create ( ** data )