lib/active_merchant/billing/credit_card.rb in activemerchant-1.103.0 vs lib/active_merchant/billing/credit_card.rb in activemerchant-1.104.0
- old
+ new
@@ -20,10 +20,11 @@
# * Forbrugsforeningen
# * Elo
# * Alelo
# * Cabal
# * Naranja
+ # * UnionPay
#
# For testing purposes, use the 'bogus' credit card brand. This skips the vast majority of
# validations, allowing you to focus on your core concerns until you're ready to be more concerned
# with the details of particular credit cards or your gateway.
#
@@ -94,10 +95,11 @@
# * +'forbrugsforeningen'+
# * +'elo'+
# * +'alelo'+
# * +'cabal'+
# * +'naranja'+
+ # * +'union_pay'+
#
# Or, if you wish to test your implementation, +'bogus'+.
#
# @return (String) the credit card brand
def brand
@@ -325,10 +327,10 @@
if self.class.requires_name?
errors << [:first_name, 'cannot be empty'] if first_name.blank?
errors << [:last_name, 'cannot be empty'] if last_name.blank?
end
- if(empty?(month) || empty?(year))
+ if empty?(month) || empty?(year)
errors << [:month, 'is required'] if empty?(month)
errors << [:year, 'is required'] if empty?(year)
else
errors << [:month, 'is not a valid month'] if !valid_month?(month)