Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class WebhooksController < ApplicationController
- skip_before_action :verify_authenticity_token
- def create
- end
- def handle
- signature, payload = Braintree::WebhookTesting.sample_notification(
- Braintree::WebhookNotification::Kind::SubMerchantAccountApproved,
- rand(10000)
- )
- @message = Braintree::WebhookNotification.parse(signature, payload)
- respond_to do |f|
- f.js { render template: 'notifications/create', layout: false }
- end
- end
- def verify
- # render text: Braintree::WebhookNotification.verify(params[:bt_challenge])
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement