#NEWLINE# def test_expose_gateway_rejection_reason_on_verification( self ) : #NEWLINE# #INDENT# old_merchant_id = Configuration . merchant_id #NEWLINE# old_public_key = Configuration . public_key #NEWLINE# old_private_key = Configuration . private_key #NEWLINE# try : #NEWLINE# #INDENT# Configuration . merchant_id = 'processing_rules_merchant_id' #NEWLINE# Configuration . public_key = 'processing_rules_public_key' #NEWLINE# Configuration . private_key = 'processing_rules_private_key' #NEWLINE# customer = Customer . create ( ) . customer #NEWLINE# result = CreditCard . create ( { #NEWLINE# #INDENT# 'customer_id' : customer . id , #NEWLINE# 'number' : '4111111111111111' , #NEWLINE# 'expiration_date' : '05/2014' , #NEWLINE# 'cvv' : '200' , #NEWLINE# 'options' : { #NEWLINE# #INDENT# 'verify_card' : True , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertFalse ( result . is_success ) #NEWLINE# verification = result . credit_card_verification #NEWLINE# self . assertEquals ( Transaction . GatewayRejectionReason . Cvv , verification . gateway_rejection_reason ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# Configuration . merchant_id = old_merchant_id #NEWLINE# Configuration . public_key = old_public_key #NEWLINE# Configuration . private_key = self