Skip to content

Commit

Permalink
Tarjeta sol: Rename card type name
Browse files Browse the repository at this point in the history
Description
-------------------------
[SER-1604](https://spreedly.atlassian.net/browse/SER-1604)

This commit rename the card type for tarjeta sol
to 'tarjeta_sol' instead 'sol'

Unit test
-------------------------
Finished in 0.155089 seconds.

76 tests, 672 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

490.04 tests/s, 4333.00 assertions/s

Rubocop
-------------------------
808 files inspected, no offenses detected
  • Loading branch information
javierpedrozaing committed Feb 12, 2025
1 parent 3d527c9 commit 8f8d115
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/active_merchant/billing/credit_card.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module Billing # :nodoc:
# * Tuya
# * UATP
# * Patagonia365
# * Sol
# * Tarjeta Sol
#
# 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
Expand Down Expand Up @@ -141,7 +141,7 @@ def number=(value)
# * +'tuya'+
# * +'uatp'+
# * +'patagonia_365'+
# * +'sol'+
# * +'tarjeta_sol'+
#
# Or, if you wish to test your implementation, +'bogus'+.
#
Expand Down
2 changes: 1 addition & 1 deletion lib/active_merchant/billing/credit_card_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module CreditCardMethods
'tuya' => ->(num) { num =~ /^588800\d{10}$/ },
'uatp' => ->(num) { num =~ /^(1175|1290)\d{11}$/ },
'patagonia_365' => ->(num) { num =~ /^504656\d{10}$/ },
'sol' => ->(num) { num =~ /^504639\d{10}$/ }
'tarjeta_sol' => ->(num) { num =~ /^504639\d{10}$/ }
}

SODEXO_NO_LUHN = ->(num) { num =~ /^(505864|505865)\d{10}$/ }
Expand Down
2 changes: 1 addition & 1 deletion test/unit/credit_card_methods_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ def test_should_detect_invalid_patagonia_365_card
end

def test_should_detect_sol_cards
assert_equal 'sol', CreditCard.brand?('5046391746825544')
assert_equal 'tarjeta_sol', CreditCard.brand?('5046391746825544')
end

def test_should_validate_sol_card
Expand Down

0 comments on commit 8f8d115

Please sign in to comment.