我正在使用PayPal' Payflow Pro SDK。我试图设置一些东西,用户可以在使用一次后保存和重复使用他们的信用卡。我认为(纠正我,如果我错了)正确的做法如下:
我无法弄清楚代码应该是什么。当我提交初始事务时,会有一堆代码返回(例如:PNREF,AUTHCODE)。我无法弄清楚哪个应该是我存储的那个,然后在引用事务中用作原始id。我尝试过使用一堆不同的东西,每个人都会回复一个错误说"无效的招标"。
以下是我的参考交易部分代码的代码片段:
public Response processOrderViaReferenceTransaction(String originId){
UserInfo userInfo = new UserInfo("user", "vendor", "partner", "pwd"); //my actual username/password are in my code, not this
PayflowConnectionData connection = new PayflowConnectionData("pilot-payflowpro.paypal.com", 443, 45, "", 0, "", "");
String requestId = PayflowUtility.RequestId;
Invoice invoice = new Invoice();
CultureInfo us = new CultureInfo("en-US");
String usCurrency = "USD";
Currency amount = new Currency(new decimal(2.00), usCurrency);
invoice.Amt = amount;
ReferenceTransaction referenceTransaction = new ReferenceTransaction("S", originId, userInfo, connection, invoice, requestId);
referenceTransaction.Verbosity = "HIGH";
Response response = referenceTransaction.SubmitTransaction();
return response;
}
有谁知道我做错了什么?
答案 0 :(得分:0)
PayFlow Pro Developer guide ...
的第40页原始交易中返回的PNREF有效用于参考交易 为期12个月。
也可以使用帐户验证返回的PNREF 在参考交易中。