简体   繁体   English

如何使用payflow pro API向存储的信用卡收费?

[英]How do I charge a stored credit card with the payflow pro API?

I'm using the PayflowNETAPI class of the PayflowPro API (Payflow_dotNET.dll) to submit a transaction to store credit cards so my company doesn't have to (for PCI Compliant reassons). 我正在使用PayflowPro API的PayflowNETAPI类(Payflow_dotNET.dll)来提交存储信用卡的交易,因此我的公司没有(针对PCI Compliant reassons)。 I'm using the PNREF from the credit card store transaction to make reference transaction but I keep getting "RESULT=2&PNREF=&RESPMSG=Invalid tender" I've tried Authorization, Capture, and Sale transactions and they all give the same result. 我正在使用信用卡商店交易中的PNREF进行参考交易,但我一直收到“RESULT = 2&PNREF =&RESPMSG =无效投标”我尝试了授权,捕获和销售交易,他们都给出了相同的结果。 What am I doing wrong? 我究竟做错了什么?

I've read through the Payflow Gateway Developer Guide and Reference several times ( https://developer.paypal.com/docs/classic/payflow/integration-guide/ ). 我已经多次阅读了Payflow Gateway开发人员指南和参考资料( https://developer.paypal.com/docs/classic/payflow/integration-guide/ )。 All the examples for Authorization, Capture, and Sale transactions have the credit card information in the request. 授权,捕获和销售交易的所有示例都在请求中包含信用卡信息。 There is some small sections that explain and outline credit card uploads but never use the result of the request in a reference transaction. 有一些小部分解释和概述了信用卡上传,但从未在参考交易中使用请求的结果。

Below is a sample application and the output 下面是一个示例应用程序和输出

string creditCardUploadRequest = "TRXTYPE=L&TENDER=C&ACCT=4111111111111111&EXPDATE=1218&CVV2=250&BILLTOFIRSTNAME=Homer&BILLTOLASTNAME=Simpson&BILLTOSTREET=350 5th Ave&BILLTOCITY=New York&BILLTOSTATE=NY&BILLTOZIP=10118&BILLTOCOUNTRY=840&USER=<USER>&VENDOR=<VENDOR>&PARTNER=<PARTNER>&PWD=<PASSWORD>&VERBOSITY=HIGH";

var client = new PayPal.Payments.Communication.PayflowNETAPI(HostAddress: "pilot-payflowpro.paypal.com", HostPort: 443, Timeout: 90);
var ccUploadResponse = client.SubmitTransaction(ParamList: creditCardUploadRequest, RequestId: PayflowUtility.RequestId);

//place the responses into collection
var payPalCollection = new NameValueCollection();

foreach (string element in ccUploadResponse.Split('&'))
{
    string[] Temp = element.Split('=');
    payPalCollection.Add(Temp[0], Temp[1]);
}

Console.WriteLine("creditCardUploadRequest succeeded = {0}", payPalCollection.Get("RESPMSG") == "Approved");

string authorizationRequest = "TRXTYPE=A&ORIGID=" + payPalCollection.Get("PNREF") + "&INVNUM=ORD123456&AMT=50&COMMENT1=My Product Sale&USER=<USER>&VENDOR=<VENDOR>&PARTNER=<PARTNER>&PWD=<PASSWORD>&VERBOSITY=HIGH";
var authorizationResponse = client.SubmitTransaction(ParamList: authorizationRequest, RequestId: PayflowUtility.RequestId);

foreach (string element in authorizationResponse.Split('&'))
{
    Console.WriteLine(element);
}
Console.WriteLine("\nDONE");
Console.ReadKey();

OUTPUT: OUTPUT:

creditCardUploadRequest succeeded = True creditCardUploadRequest succeeded = True

RESULT=2 RESULT = 2

PNREF=A7X08AB571EC PNREF = A7X08AB571EC

RESPMSG=Invalid tender RESPMSG =投标无效

DONE DONE

In your second call you are missing the variable "TENDER=C" . 在您的第二个电话中,您缺少变量“TENDER = C”。 Add that and it should be fine . 添加它,它应该没问题。

"string authorizationRequest = "TRXTYPE=A&ORIGID=" + payPalCollection.Get("PNREF") + "&INVNUM=ORD123456&AMT=50&COMMENT1=My Product Sale&USER=<USER>&VENDOR=<VENDOR>&PARTNER=<PARTNER>&PWD=<PASSWORD>&VERBOSITY=HIGH"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 IntuIt QuickBooks付款API,如何使用IppDotNetSdkForQuickBooksApiV3软件包的servicecontext执行信用卡交易? - IntuIt QuickBooks payments API, How can I perform credit card transactions using servicecontext of IppDotNetSdkForQuickBooksApiV3 package? 如何在C#应用程序内接受信用卡付款? - How do I accept credit card payments inside a C# app? 如何张贴 WEB API RESTFULL 随机信用卡号 - How to Post in a WEB API RESTFULL random credit card number 信用卡号码应该存储为字符串还是整数? - Should credit card numbers be stored as strings or ints? 如何设置金额波动的经常性费用 - How do I set up a recurring charge where the amount fluctuates 我对供应商信用使用什么 QBFC API? - What QBFC API do I use for Vendor Credit? 如何获取信用卡类型的值 - How to retrieve the value of the credit card type 如何使用Cyber​​Source获取信用卡信息? - How to get Credit Card Information using CyberSource? 如何检查仅信用卡号有效而不是借记卡..? - How to check Only Credit card number is valid not Debit card..? 创建包含来源(信用卡)的 Stripe 客户后,我可以获得返回的信用卡详细信息吗? - Can I get the returned credit card details after creating a Stripe customer that includes a source (credit card)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM