PayPal使用Payflow通过PayPal帐户创建定期付款 [英] PayPal Using Payflow to create Recurring Payment with PayPal account

查看:198
本文介绍了PayPal使用Payflow通过PayPal帐户创建定期付款的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的客户不想处理信用卡数据,因此我实现了2个选项,1)带托管页面的PayPal Advanced,以及2)PayPal Pro透明重定向.我可以通过以下方式创建定期付款:

My clients don't want to handle credit card data so I have implemented 2 options, 1) PayPal Advanced with Hosted Pages, and 2) PayPal Pro Transparent redirect. I am able to create recurring payments by

  1. 获取我的安全令牌
  2. 提交交易
  3. 将交易转换为定期结算配置文件

PayPal要求我为用户提供使用PayPal帐户付款的选项,但是当我将该付款转换为RBP,然后让其创建交易时,交易失败,结果为7-字段格式错误.我注意到创建的RBP没有帐号.

PayPal requires that I give the user the option to pay with a PayPal account but when I convert that payment to a RBP and then let it create a transaction the trans fails with result 7 - Field Format Error. I notice that the RBP created has no account number.

使用选项1,我想我很走运,是吗?

With option 1 I think I'm out of luck yes?

对于选项2,我使用Payflow.net dll处理正常工作的EC(请参阅代码示例).关于如何用令牌而不是CC num或BAID创建RBP的代码示例?

With option 2, I use Payflow.net dll to process the EC which works fine (see code sample). Is there a code sample somewhere on how to create a RBP with a token instead of a CC num or BAID?

...
partner = pageSettings.PageSettings["PayPalPartner"];
vendor = pageSettings.PageSettings["PayPalLogin"];
user = pageSettings.PageSettings["PayPalUser"];
pwd = Utilities.DecryptSettingValue(pageSettings.PageSettings["PayPalPassword"])
UserInfo creds = new UserInfo(user, vendor, partner, pwd);
string url = ConfigurationManager.AppSettings.Get("PayflowLive");
PayflowConnectionData connection = new PayflowConnectionData(url);
ECDoRequest doRequest = new ECDoRequest(token, payerID);
PayPalTender tender = new PayPalTender(doRequest);
Invoice inv = new Invoice();
inv.Amt = new Currency(amount, "USD");
inv.Comment1 = fundName;
SaleTransaction trans = new SaleTransaction(creds, connection, inv, tender, PayflowUtility.RequestId);
Response resp = trans.SubmitTransaction();

推荐答案

我没有代码,但是我可以指导您如何使用PayPal Payments创建重复配置文件.它包括四个步骤:

I don't have the code but I can direct you on how you can create the recurring profile using the PayPal Payments . It includes the four steps :

1.调用SetExpressCheckout API

VENDOR=XXXXXXX&PARTNER=XXXXXXX&USER=XXXXXXXXX&PWD=XXXXXX&TRXTYPE=A&ACTION=S&TENDER=P&RETURNURL=http://return.com&CANCELURL=http://cancel.com&AMT=0.00&BA_DESC=purchase Time magazine&BILLINGTYPE=MerchantInitiatedBilling&PAYMENTTYPE=any&BA_CUSTOM=magazine subscription

NVP Response:
RESULT=0
RESPMSG=Verified
TOKEN=EC-8DA60888D41196708
CORRELATIONID=f4df94a3345b6 

2.使用生成的令牌重定向客户:

https://www. sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-8DA60888D41196708

3.买方接受协议后,请使用令牌获取结算协议ID

NVP Request:
VENDOR=XXXXXX&PARTNER=XXXXXXX&USER=XXXXXXXX&PWD=XXXXX&TRXTYPE=A&ACTION=X&TENDER=P&TOKEN=EC-8DA60888D41196708

NVP Response:
RESULT=0
PNREF=B1PP7A2F8154
RESPMSG=Approved
TOKEN=EC-8DA60888D41196708
CORRELATIONID=49d6b0037408
BAID=B-6A290557S1180001J 

4.取得BAID后,请致电以使用BAID创建经常性结算

NVP Request:
VENDOR=XXXX&PARTNER=XXXX&USER=XXXXXX&PWD=XXXXX&TRXTYPE=R&TENDER=P&ACTION=A&PROFILENAME=RegularSubscription&AMT=4.46&BAID=B-6A290557S1180001J&START=09212014&PAYPERIOD=WEEK&TERM=12&MAXFAILPAYMENTS=1&RETRYNUMDAYS=1&CURRENCY=USD

NVP Response:
RESULT=0
RPREF=R1P57A2F8538
PROFILEID=RT0000000010
RESPMSG=Approved

这篇关于PayPal使用Payflow通过PayPal帐户创建定期付款的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆