如何使用ipn通知与paypal自适应支付gem与活跃的商家?我想避免使用金属,直接使用控制器想要使用的。rails 3 ruby 1.9.2,谢谢
发布于 2012-08-23 13:26:34
像这样使用
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在此之前,请转到沙箱帐户。
。
发布于 2012-02-20 21:59:55
为了方便起见,您可能想检查一下这个封装了所有内容的gem:https://github.com/jpablobr/active_paypal_adaptive_payment
https://stackoverflow.com/questions/7790675
复制相似问题