#NEWLINE# def __create_result( self , response ) : #NEWLINE# #INDENT# if ( 'transaction' in response ) : #NEWLINE# #INDENT# return SuccessfulResult ( { #NEWLINE# #INDENT# 'transaction' : Transaction ( self . gateway , response [ 'transaction' ] ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'api_error_response' in response ) : #NEWLINE# #INDENT# return ErrorResult ( self . gateway , response [ 'api_error_response' ] )