Permalink
Browse files

Merge pull request #302 from spreedly/avs_usa_epay

USA ePay: Fix handling of AVS
  • Loading branch information...
2 parents 9f436f8 + ddb0b2e commit e041b971d26eced0c9045065cd5b02ceff78126e @ntalbott ntalbott committed Mar 14, 2012
@@ -175,11 +175,7 @@ def commit(action, parameters)
:test => @options[:test] || test?,
:authorization => response[:ref_num],
:cvv_result => response[:cvv2_result_code],
- :avs_result => {
- :street_match => response[:avs_result_code].to_s[0,1],
- :postal_match => response[:avs_result_code].to_s[1,1],
- :code => response[:avs_result_code].to_s[2,1]
- }
+ :avs_result => { :code => response[:avs_result_code] }
)
end
@@ -127,10 +127,10 @@ def key(prefix, key)
end
def successful_purchase_response
- "UMversion=2.9&UMstatus=Approved&UMauthCode=001716&UMrefNum=55074409&UMavsResult=Address%3A%20Match%20%26%205%20Digit%20Zip%3A%20Match&UMavsResultCode=YYY&UMcvv2Result=Match&UMcvv2ResultCode=M&UMresult=A&UMvpasResultCode=&UMerror=Approved&UMerrorcode=00000&UMcustnum=&UMbatch=596&UMisDuplicate=N&UMconvertedAmount=&UMconvertedAmountCurrency=840&UMconversionRate=&UMcustReceiptResult=No%20Receipt%20Sent&UMfiller=filled"
+ "UMversion=2.9&UMstatus=Approved&UMauthCode=001716&UMrefNum=55074409&UMavsResult=Address%3A%20Match%20%26%205%20Digit%20Zip%3A%20Match&UMavsResultCode=Y&UMcvv2Result=Match&UMcvv2ResultCode=M&UMresult=A&UMvpasResultCode=&UMerror=Approved&UMerrorcode=00000&UMcustnum=&UMbatch=596&UMisDuplicate=N&UMconvertedAmount=&UMconvertedAmountCurrency=840&UMconversionRate=&UMcustReceiptResult=No%20Receipt%20Sent&UMfiller=filled"
end
def unsuccessful_purchase_response
- "UMversion=2.9&UMstatus=Declined&UMauthCode=000000&UMrefNum=55076060&UMavsResult=Address%3A%20Match%20%26%205%20Digit%20Zip%3A%20Match&UMavsResultCode=YYY&UMcvv2Result=Not%20Processed&UMcvv2ResultCode=P&UMvpasResultCode=&UMresult=D&UMerror=Card%20Declined&UMerrorcode=10127&UMbatch=596&UMfiller=filled"
+ "UMversion=2.9&UMstatus=Declined&UMauthCode=000000&UMrefNum=55076060&UMavsResult=Address%3A%20Match%20%26%205%20Digit%20Zip%3A%20Match&UMavsResultCode=Y&UMcvv2Result=Not%20Processed&UMcvv2ResultCode=P&UMvpasResultCode=&UMresult=D&UMerror=Card%20Declined&UMerrorcode=10127&UMbatch=596&UMfiller=filled"
end
end

0 comments on commit e041b97

Please sign in to comment.