11# frozen_string_literal: true
22
3- require ' solidus_braintree/request_protection'
3+ require " solidus_braintree/request_protection"
44
55module SolidusBraintree
66 class Gateway < ::Spree ::PaymentMethod
@@ -11,9 +11,9 @@ class TokenGenerationDisabledError < StandardError; end
1111 # Error message from Braintree that gets returned by a non voidable transaction
1212 NON_VOIDABLE_STATUS_ERROR_REGEXP = /can only be voided if status is authorized/
1313
14- TOKEN_GENERATION_DISABLED_MESSAGE = ' Token generation is disabled. ' \
15- ' To re-enable set the `token_generation_enabled` preference on the ' \
16- ' gateway to `true`.'
14+ TOKEN_GENERATION_DISABLED_MESSAGE = " Token generation is disabled. " \
15+ " To re-enable set the `token_generation_enabled` preference on the " \
16+ " gateway to `true`."
1717
1818 ALLOWED_BRAINTREE_OPTIONS = [
1919 :device_data ,
@@ -35,17 +35,17 @@ class TokenGenerationDisabledError < StandardError; end
3535 preference ( :token_generation_enabled , :boolean , default : true )
3636
3737 # Preferences for configuration of Braintree credentials
38- preference ( :environment , :string , default : ' sandbox' )
38+ preference ( :environment , :string , default : " sandbox" )
3939 preference ( :merchant_id , :string , default : nil )
40- preference ( :public_key , :string , default : nil )
40+ preference ( :public_key , :string , default : nil )
4141 preference ( :private_key , :string , default : nil )
4242 preference ( :http_open_timeout , :integer , default : 60 )
4343 preference ( :http_read_timeout , :integer , default : 60 )
4444 preference ( :merchant_currency_map , :hash , default : { } )
4545 preference ( :paypal_payee_email_map , :hash , default : { } )
4646
4747 # Which checkout flow to use (vault/checkout)
48- preference ( :paypal_flow , :string , default : ' vault' )
48+ preference ( :paypal_flow , :string , default : " vault" )
4949
5050 # A hash that gets passed to the `style` key when initializing the credit card fields.
5151 # See https://developers.braintreepayments.com/guides/hosted-fields/styling/javascript/v3
@@ -301,7 +301,7 @@ def reusable_sources(order)
301301 # Whether to store this payment method in the PayPal Vault. This only works when the checkout
302302 # flow is "vault", so make sure to call +super+ if you override it.
303303 def store_in_vault
304- preferred_paypal_flow == ' vault'
304+ preferred_paypal_flow == " vault"
305305 end
306306
307307 def logger
@@ -339,18 +339,18 @@ def transaction_options(source, options, submit_for_settlement: false)
339339 end
340340
341341 params [ :channel ] = "Solidus"
342- params [ :options ] = { store_in_vault_on_success : store_in_vault }
342+ params [ :options ] = { store_in_vault_on_success : store_in_vault }
343343
344344 if submit_for_settlement
345345 params [ :options ] [ :submit_for_settlement ] = true
346346 end
347347
348348 if paypal_email = paypal_payee_email_for ( source , options )
349- params [ :options ] [ :paypal ] = { payee_email : paypal_email }
349+ params [ :options ] [ :paypal ] = { payee_email : paypal_email }
350350 end
351351
352352 if source . venmo? && venmo_business_profile_id
353- params [ :options ] [ :venmo ] = { profile_id : venmo_business_profile_id }
353+ params [ :options ] [ :venmo ] = { profile_id : venmo_business_profile_id }
354354 end
355355
356356 if merchant_account_id = merchant_account_for ( source , options )
0 commit comments