Skip to content

Commit

Permalink
Merge pull request #370 from spark-solutions/sd-1007-braintreevzero-s…
Browse files Browse the repository at this point in the history
…upport

[SD-1007] [BraintreeVZero] Verify the response from the payment provider responds to params
  • Loading branch information
damianlegawiec authored Dec 24, 2020
2 parents b45be7b + 5a7bc08 commit 3aa3598
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/spree/payment_decorator.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
module Spree
module PaymentDecorator
def handle_response(response, success_state, failure_state)
self.intent_client_key = response.params['client_secret'] if response.params['client_secret'] && response.success?
if response.success? && response.respond_to?(:params)
self.intent_client_key = response.params['client_secret'] if response.params['client_secret']
end
super
end

Expand Down

0 comments on commit 3aa3598

Please sign in to comment.