我的客户不想处理信用卡数据,因此我实施了2个选项,1)PayPal Advanced with Hosted Pages,以及2)PayPal Pro Transparent redirect . 我可以通过创建定期付款
-
获取我的安全令牌
-
提交交易
-
将交易转换为重复出具的账单资料
PayPal要求我向用户提供使用PayPal帐户付款的选项,但是当我将该付款转换为RBP然后让它创建一个事务时,转换失败,结果为7 - 字段格式错误 . 我注意到创建的RBP没有帐号 .
选项1我觉得我运气不好?
使用选项2,我使用Payflow.net DLL来处理EC,它工作正常(参见代码示例) . 是否有关于如何使用令牌而不是CC num或BAID创建RBP的代码示例?
...
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();
1 回答
我没有代码,但我可以指导您如何使用PayPal付款创建定期 Profiles . 它包括四个步骤:
1. Call the SetExpressCheckout API
2.Redirect the customer using the generated token :
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-8DA60888D41196708
3. Once the buyer accept the agreement use the token to get the billing agreement id
4. After getting BAID , make a call to create the recurring billing using BAID