[英]How to return profile id using paypal subscription button?
我正在使用Paypal订阅按钮来订阅该项目,我已经成功订阅了该项目,但作为响应,我得到了(交易ID,签名,抄送,交易状态,成本,currency_code custom_msg),但我需要该特定订阅的profile_id(订阅ID)还。因为当我取消订阅该项目时,我需要profile_id来取消订阅它。
Finally got the solution, I have used paypal_nvp gem with GetTransactionDetails API to find the profile id for particular subscription. 终于找到了解决方案,我将paypal_nvp gem与GetTransactionDetails API结合使用来查找特定订阅的配置文件ID。
p = PaypalNVP.new(true{ :user => "o.bonn_1237393081_biz_api1.solisoft.net", :pass => "1237393093", :cert => "AU2Yv5COwWPCfeYLv34Z766F-gfNAzX6LaQE6VZkHMRq35Gmite-bMXu", :url => "https://api-3t.sandbox.paypal.com/nvp" })
data = {
:method => "GetTransactionDetails",
:TRANSACTIONID =>params[:tx]
}
response = p.call_paypal(data)
profile_id = response["SUBSCRIPTIONID"]
for further information you can go to https://github.com/solisoft/paypal_nvp url 有关更多信息,请访问https://github.com/solisoft/paypal_nvp网址
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.