簡體   English   中英

貝寶自適應支付軌道3

[英]paypal adaptive payment rails 3

如何將IPN通知與有效商家使用的Paypal適應性付款gem結合使用? 我想避免使用金屬,直接想使用控制器。 rails 3 ruby​​ 1.9.2謝謝

這樣使用

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

在此之前,請轉到沙盒帳戶。

  1. 選擇測試帳戶。
  2. 然后單擊任何企業帳戶->單擊“輸入沙箱帳戶”
  3. 輸入企業帳戶的電子郵件並輸入密碼
  4. 選擇->配置文件設置-> IPN通知->設置返回網址

為了您的方便起見,您可能需要檢查將其封裝的所有gem: https//github.com/jpablobr/active_paypal_adaptive_payment

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM