PayPal Payflow Pro:参考交易的originId应该是什么?
PayPal Payflow Pro: What should the originId be for reference transactions?
我正在使用 PayPal Payflow Pro SDK。我正在尝试设置一些东西,用户可以在使用一次后保存和重复使用他们的信用卡。我认为(如果我错了请纠正我)正确的过程如下:
- 提交常规付款交易
- 在对此交易的响应中,应该有某种对应于该信用卡的代码
- 保存此代码而不是直接保存信用卡数据
- 使用此代码作为参考交易中的originId参数来处理订单(因此交易不需要信用卡,只需要代码)
我想不通的是代码实际上应该是什么。当我提交初始交易时,会返回一堆代码(例如:PNREF、AUTHCODE)。我无法弄清楚哪个应该是我存储的,然后在参考交易中用作原始 ID。我试过使用一堆不同的,每个都返回一个错误 "Invalid tender"。
下面是我的参考交易部分的代码片段:
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;
}
有谁知道我做错了什么吗?
第 40 页 PayFlow Pro Developer guide...
The PNREF returned in the original transaction is valid for use in reference transactions
for a period of 12 months.
A PNREF returned by Account Verification also can be used
in a reference transaction.
我正在使用 PayPal Payflow Pro SDK。我正在尝试设置一些东西,用户可以在使用一次后保存和重复使用他们的信用卡。我认为(如果我错了请纠正我)正确的过程如下:
- 提交常规付款交易
- 在对此交易的响应中,应该有某种对应于该信用卡的代码
- 保存此代码而不是直接保存信用卡数据
- 使用此代码作为参考交易中的originId参数来处理订单(因此交易不需要信用卡,只需要代码)
我想不通的是代码实际上应该是什么。当我提交初始交易时,会返回一堆代码(例如:PNREF、AUTHCODE)。我无法弄清楚哪个应该是我存储的,然后在参考交易中用作原始 ID。我试过使用一堆不同的,每个都返回一个错误 "Invalid tender"。
下面是我的参考交易部分的代码片段:
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;
}
有谁知道我做错了什么吗?
第 40 页 PayFlow Pro Developer guide...
The PNREF returned in the original transaction is valid for use in reference transactions for a period of 12 months.
A PNREF returned by Account Verification also can be used in a reference transaction.