diff --git a/app/models/spree/gateway/stripe_gateway.rb b/app/models/spree/gateway/stripe_gateway.rb index 8c6a52f..b056e25 100644 --- a/app/models/spree/gateway/stripe_gateway.rb +++ b/app/models/spree/gateway/stripe_gateway.rb @@ -85,6 +85,10 @@ def options_for_purchase_or_auth(money, creditcard, gateway_options) options[:description] = "Spree Order ID: #{gateway_options[:order_id]}" options[:currency] = gateway_options[:currency] + # The Stripe ActiveMerchant gateway accepts a key named statement_description to set statement_descriptor + # The maximum length of the statement descriptor is 22 characters. + options[:statement_description] = options[:description][0..21] + if customer = creditcard.gateway_customer_profile_id options[:customer] = customer end