mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 13:19:39 +02:00
Plaid webhook processor
This commit is contained in:
parent
5125411822
commit
ffc5f844b2
3 changed files with 55 additions and 25 deletions
|
@ -9,7 +9,8 @@ class WebhooksController < ApplicationController
|
|||
client = Provider::Registry.plaid_provider_for_region(:us)
|
||||
|
||||
client.validate_webhook!(plaid_verification_header, webhook_body)
|
||||
client.process_webhook(webhook_body)
|
||||
|
||||
PlaidItem::WebhookProcessor.new(webhook_body).process
|
||||
|
||||
render json: { received: true }, status: :ok
|
||||
rescue => error
|
||||
|
@ -24,7 +25,8 @@ class WebhooksController < ApplicationController
|
|||
client = Provider::Registry.plaid_provider_for_region(:eu)
|
||||
|
||||
client.validate_webhook!(plaid_verification_header, webhook_body)
|
||||
client.process_webhook(webhook_body)
|
||||
|
||||
PlaidItem::WebhookProcessor.new(webhook_body).process
|
||||
|
||||
render json: { received: true }, status: :ok
|
||||
rescue => error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue