Displaying 1 result from an estimated 1 matches for "card_cvv".
2006 Jun 19
3
Using a records "id" in validation
...es my validation method so far:
def validate_on_create
# validate that the credit card authorization is successful
auth = CreditCard.authorize(self, :card => card_number,
:expiration => card_exp,
:cvv => card_cvv)
if auth[:result] == ''A''
self.authcode = auth[:authCode]
else
errors.add :card_number, ''^The credit card was declined.''
end
end
--
Posted via http://www.ruby-forum.com/.