File tree Expand file tree Collapse file tree 6 files changed +6
-13
lines changed
app/controllers/pay/webhooks Expand file tree Collapse file tree 6 files changed +6
-13
lines changed Original file line number Diff line number Diff line change 44
55### 11.4.2
66
7+ * Use ` ActionController::API ` as base for webhooks. This removes the need to skip forgery protection and improves performance.
78* Use ` inheritance_column ` instead of hardcoded ` type ` column in case users modify migrations
89* Use ` attr_reader :support_email ` since we define a customer setter
910* Use ` skip_forgery_protection ` to be more compatible with Rails 8.2+
Original file line number Diff line number Diff line change 11module Pay
22 module Webhooks
3- class BraintreeController < Pay ::ApplicationController
4- skip_forgery_protection if Rails . application . config . action_controller . default_protect_from_forgery
5-
3+ class BraintreeController < ActionController ::API
64 def create
75 queue_event ( verified_event )
86 head :ok
Original file line number Diff line number Diff line change 11module Pay
22 module Webhooks
3- class LemonSqueezyController < Pay ::ApplicationController
4- skip_forgery_protection if Rails . application . config . action_controller . default_protect_from_forgery
5-
3+ class LemonSqueezyController < ActionController ::API
64 def create
75 if valid_signature? ( request . headers [ "X-Signature" ] )
86 queue_event ( verify_params . as_json )
Original file line number Diff line number Diff line change 11module Pay
22 module Webhooks
3- class PaddleBillingController < Pay ::ApplicationController
4- skip_forgery_protection if Rails . application . config . action_controller . default_protect_from_forgery
5-
3+ class PaddleBillingController < ActionController ::API
64 def create
75 if valid_signature? ( request . headers [ "Paddle-Signature" ] )
86 queue_event ( verify_params . as_json )
Original file line number Diff line number Diff line change 11module Pay
22 module Webhooks
3- class PaddleClassicController < Pay ::ApplicationController
4- skip_forgery_protection if Rails . application . config . action_controller . default_protect_from_forgery
5-
3+ class PaddleClassicController < ActionController ::API
64 def create
75 queue_event ( verified_event )
86 head :ok
Original file line number Diff line number Diff line change 11module Pay
22 module Webhooks
3- class StripeController < Pay :: ApplicationController
3+ class StripeController < ActionController :: API
44 skip_forgery_protection if Rails . application . config . action_controller . default_protect_from_forgery
55
66 def create
You can’t perform that action at this time.
0 commit comments