Is there a PayPal IPN code sample for Ruby on Rails?

前端 未结 7 454
渐次进展
渐次进展 2021-02-01 05:27

There are official code samples for several languages but couldn\'t find one for Rails.

7条回答
  •  日久生厌
    2021-02-01 05:52

    you can just do this to get ipn details. result will show you verified or not. you can get all details from body

    post '/english/ipn' do

    url = "https://sandbox.paypal.com/cgi-bin/webscr?cmd=_notify-validate&#{@query}"

    body = request.body.string

    result = RestClient.post url, body

    end

提交回复
热议问题