0
如何使用ipn通知與貝寶apadaptive付款寶石與活躍的商人? 我想避免使用金屬,直接控制器要使用。 軌道3 紅寶石1.9.2 感謝paypal自適應付款軌3
如何使用ipn通知與貝寶apadaptive付款寶石與活躍的商人? 我想避免使用金屬,直接控制器要使用。 軌道3 紅寶石1.9.2 感謝paypal自適應付款軌3
你可能要檢查這個寶石,它封裝了一切爲了您的方便: https://github.com/jpablobr/active_paypal_adaptive_payment
使用這樣
response = gateway.setup_purchase(
:return_url => url_for(:action => 'index',:port=>"3001", :only_path => false),
:cancel_url => url_for(:action => 'create',:port=>"3001", :only_path => false),
**:ipn_notification_url => payments_notify_action_url**,
:receiver_list => recipients
)
在此指定IPN通知URL然後:
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
在那之前g o加入沙箱帳戶。