![](/img/trans.png)
[英]How can I receive an IPN Notification that I have sent a payment with PayPal - Ruby on Rails
[英]How to get IPN notification in PayPal on localhost
我在PayPal中使用自适应付款。 我正在关注https://github.com/paypal/adaptivepayments-sdk-ruby 。 一切正常,除非我无法在本地接收IPN通知。
@api = PayPal::SDK::AdaptivePayments.new
@pay = @api.build_pay({
:actionType => "PAY",
:cancelUrl => "http://"+Rails.application.config.app_name+"/admin/dashboard",
:currencyCode => "USD",
:feesPayer => "SENDER",
:ipnNotificationUrl => "http://"+Rails.application.config.app_name+"/admin/receive_notification",
:receiverList => {
:receiver => [{
:amount => amount,
:email => @paypal_id }] },
:returnUrl => "http://"+Rails.application.config.app_name+"/admin/dashboard" })
所以,如何在本地主机上接收通知
贝宝将无法路由到本地主机以发送IPN。 您将需要设置一个公共可用的域名和适当的dns。
Localhost始终是特定于您的计算机的,您也许可以使用dynamicdns,但它需要在计算机和网络上进行网络更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.