Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #263 from seand7565/fix_value_conversion
Browse files Browse the repository at this point in the history
Fix value conversion method
  • Loading branch information
kennyadsl authored Oct 9, 2020
2 parents 091a6f9 + 16d5c77 commit 50f0a84
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/models/solidus_paypal_braintree/gateway.rb
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,15 @@ def to_hash(preference_string)
JSON.parse(preference_string.gsub("=>", ":"))
end

def convert_preference_value(value, type)
def convert_preference_value(value, type, preference_encryptor = nil)
if type == :hash && value.is_a?(String)
value = to_hash(value)
end
super
if method(__method__).super_method.arity == 3
super
else
super(value, type)
end
end

def transaction_options(source, options, submit_for_settlement = false)
Expand Down

0 comments on commit 50f0a84

Please sign in to comment.