Created
January 13, 2012 16:14
-
-
Save dpmccabe/1607258 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if @result.credit_card_verification | |
@account.transactions.build( | |
:approved => false, | |
:avs_error_response_code => @result.credit_card_verification.avs_error_response_code, | |
:avs_postal_code_response_code => @result.credit_card_verification.avs_postal_code_response_code, | |
:avs_street_address_response_code => @result.credit_card_verification.avs_street_address_response_code, | |
:cvv_response_code => @result.credit_card_verification.cvv_response_code, | |
:gateway_rejection_reason => @result.credit_card_verification.gateway_rejection_reason, | |
:processor_response_code => @result.credit_card_verification.processor_response_code, | |
:processor_response_text => @result.credit_card_verification.processor_response_text, | |
:status => @result.credit_card_verification.status, | |
:ttype => @account.getting_fresh? ? "get fresh (verification)" : "stay fresh (verification)" | |
) | |
else | |
@account.transactions.build( | |
:approved => false, | |
:validation_errors => @result.errors.collect { |error| "(#{error.code}) #{error.message}" }.join("\n"), | |
:status => "validation_error", | |
:ttype => @account.getting_fresh? ? "get fresh (verification)" : "stay fresh (verification)" | |
) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment