lib/active_merchant/billing/credit_card.rb in activemerchant-1.88.0 vs lib/active_merchant/billing/credit_card.rb in activemerchant-1.89.0
- old
+ new
@@ -360,10 +360,10 @@
if verification_value?
unless valid_card_verification_value?(verification_value, brand)
errors << [:verification_value, "should be #{card_verification_value_length(brand)} digits"]
end
- elsif requires_verification_value?
+ elsif requires_verification_value? && !valid_card_verification_value?(verification_value, brand)
errors << [:verification_value, 'is required']
end
errors
end