Skip to content

Commit

Permalink
Merge pull request #5741 from fjordllc/bug/stripe-endpoint
Browse files Browse the repository at this point in the history
endpoint secretが設定できてなかったのを修正
  • Loading branch information
komagata authored Nov 7, 2022
2 parents 3acf02e + 58c444e commit aa8917b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/models/webhook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class << self
def construct_event(
payload:,
signature:,
endpoint_secret:
endpoint_secret: secret
)

Stripe::Webhook.construct_event(
Expand All @@ -29,5 +29,11 @@ def intent_url(intent_id)
"#{base_url}test/payments/#{intent_id}"
end
end

private

def secret
Rails.application.secrets['stripe']['endpoint_secret']
end
end
end

0 comments on commit aa8917b

Please sign in to comment.