4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/active_merchant/billing/stripe_gateway_decorator.rb', line 4
def self.prepended(base)
base.class_eval do
alias_method :original_headers, :headers
alias_method :original_add_customer_data, :add_customer_data
private
def (options = {})
= (options)
['User-Agent'] = ['X-Stripe-Client-User-Agent']
end
def add_customer_data(post, options)
original_add_customer_data(post, options)
post[:payment_user_agent] = "SpreeGateway/#{SpreeGateway.version}"
end
end
end
|