我在我的应用程序上设置 IPN 通知以将所有信息发送回我的应用程序时遇到问题。我的付款工作正常且功能正常。我在使用 notify_action 时遇到问题。我想检索付款信息并将其发送回我的应用程序以获取付款中的所有信息。
def checkout
....
response = @gateway.setup_purchase(
:return_url => "http://localhost:3000",
:cancel_url => "http://localhost:3000",
:ipn_notification_url => orders_notify_action_url,
:receiver_list => recipients
)
..
redirect_to (@gateway.redirect_url_for(response["payKey"]))
end
def notify_action
notify = ActiveMerchant::Billing::Integrations::PaypalAdaptivePayment::Notification.new(request.raw_post)
p "Notification object is #{notify}"
if notify.acknowledge
p "Transaction ID is #{notify.transaction_id}"
p "Notification object is #{notify}"
p "Notification status is #{notify.status}"
end
render :nothing => true
end