#NEWLINE# def test_forward( self ) : #NEWLINE# #INDENT# customer = Customer . create ( ) . customer #NEWLINE# credit_card_result = CreditCard . create ( { #NEWLINE# #INDENT# 'customer_id' : customer . id , #NEWLINE# 'number' : '4111111111111111' , #NEWLINE# 'expiration_date' : '05/2025' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertTrue ( forward_result . is_success ) #NEWLINE# source_merchant_card = credit_card_result . credit_card #NEWLINE# forward_result = CreditCard . forward ( source_merchant_card . token , 'integration_merchant_id' ) #NEWLINE# self . assertTrue ( forward_result . is_success ) #NEWLINE# braintree . Configuration . configure ( braintree . Environment . Development , 'integration_merchant_id' , 'integration_public_key' , 'integration_private_key' ) #NEWLINE# customer = Customer . create ( ) . customer #NEWLINE# credit_card_result = CreditCard . create ( { #NEWLINE# #INDENT# 'customer_id' : customer . id , #NEWLINE# 'payment_method_nonce' : forward_result . nonce , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertTrue ( credit_card_result . is_success ) #NEWLINE# receiving_merchant_card = credit_card_result . credit_card #NEWLINE# self . assertEqual ( source_merchant_card . bin , receiving_merchant_card . bin ) #NEWLINE# self . assertEqual ( source_merchant_card . last_4 , receiving_merchant_card . last_4 ) #NEWLINE# self . assertEqual ( source_merchant_card . expiration_month , receiving_merchant_card . expiration_month ) #NEWLINE# self . assertEqual ( source_merchant_card . expiration_year , receiving_merchant_card . expiration_year )