我正在解决一个问题,当条带支付成功时,它将不会出现webhook。我已经在条纹webhook中设置了ngrok URL。彼此之间的连接正在工作。但是我无法发送正确的Stripe数据。
我收到此错误消息:
InvoicePaymentSucceed has been removed from the module tree but is still active!
服务/事件/invoice_payment_succeed.rb
class Events::InvoicePaymentSucceed
def call(event)
source = event.data.object
subscription = source.lines.data[0]
binding.pry
end
end
config / stripe.rb
StripeEvent.configure do |events|
# The case invoice payment succeed
events.subscribe(
'invoice.payment_succeed',
Events::InvoicePaymentSucceed.new
)
end
routes.rb
Rails.application.routes.draw do
mount StripeEvent::Engine, at: '/webhooks/stripe'
end