diff --git a/lib/active_merchant/billing/gateways/litle/token.rb b/lib/active_merchant/billing/gateways/litle/token.rb
index 47795a58407..c2434460b09 100644
--- a/lib/active_merchant/billing/gateways/litle/token.rb
+++ b/lib/active_merchant/billing/gateways/litle/token.rb
@@ -3,10 +3,12 @@ module Billing
# The name parameter is allowed by Vantiv as a member of the billToAddress element.
# It is passed in here to be consistent with the rest of the Litle gateway and Activemerchant.
class LitleToken
- attr_reader :litle_token, :name, :brand
+ attr_reader :litle_token, :name, :brand, :month, :year
def initialize(litle_token, options = {})
@litle_token = litle_token
+ @month = options[:month]
+ @year = options[:year]
@name = options[:name]
@brand = options[:brand]
end
diff --git a/lib/active_merchant/version.rb b/lib/active_merchant/version.rb
index a36602fe521..3d69284bab4 100644
--- a/lib/active_merchant/version.rb
+++ b/lib/active_merchant/version.rb
@@ -1,3 +1,3 @@
module ActiveMerchant
- VERSION = '1.127.0'
+ VERSION = '1.128.0'
end
diff --git a/test/unit/gateways/litle_test.rb b/test/unit/gateways/litle_test.rb
index 6e0f8606182..1414735a80d 100644
--- a/test/unit/gateways/litle_test.rb
+++ b/test/unit/gateways/litle_test.rb
@@ -301,7 +301,9 @@ def test_passing_with_litle_token_of_level_3_rates
litle_token = ActiveMerchant::Billing::LitleToken.new(
'XkNDRGZDTGZyS2RBSTVCazJNSmdWam5T',
brand: 'visa',
- name: 'Joe Payer'
+ name: 'Joe Payer',
+ month: '12',
+ year: '46'
)
options = @options.merge(
level_3_data: {
@@ -327,6 +329,39 @@ def test_passing_with_litle_token_of_level_3_rates
end.check_request do |_endpoint, data, _headers|
assert_match(%r(500), data)
assert_match(%r(0), data)
+ assert_match(%r(1246), data)
+ end.respond_with(successful_purchase_response)
+ end
+
+ def test_passing_level_3_rates_with_customer_data
+ options = @options.merge(
+ level_3_data: {
+ customer_code: 'fake_order_number',
+ card_acceptor_tax_id: 'mycase_tax_id',
+ total_tax_amount: 0,
+ line_items: [{
+ product_code: 'test',
+ item_description: 'Legal services',
+ quantity: 1,
+ unit_of_measure: 'EA',
+ line_item_total: 500
+ }]
+ }
+ )
+ credit_card = CreditCard.new(
+ first_name: 'John',
+ last_name: 'Smith',
+ month: '01',
+ year: '2024',
+ brand: 'master',
+ number: '5555555555554444',
+ verification_value: '349'
+ )
+ stub_comms do
+ @gateway.purchase(@amount, credit_card, options)
+ end.check_request do |_endpoint, data, _headers|
+ assert_match(%r(fake_order_number), data)
+ assert_match(%r(mycase_tax_id), data)
end.respond_with(successful_purchase_response)
end