如何在First Data Payment Gateway实施中获得响应 [英] How to get response in First Data Payment Gateway Implementation

查看:124
本文介绍了如何在First Data Payment Gateway实施中获得响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的asp.net网站上实现第一个数据支付网关。



我做了所有事情,现在我可以重定向到https:// checkout.globalgatewaye4.firstdata.com/payment和付款已完成,但FirstData会在Result.aspx页面上重定向到我的网站。



在该页面上我怎么知道付款成功完成或发生任何错误等。我知道它在POST方法中发送响应代码但是当我来到我的网页时它会出现如下错误:







'/'应用程序中的服务器错误。





viewstate MAC验证失败。如果此应用程序由Web场或群集托管,请确保< machineKey> configuration指定相同的validationKey和验证算法。 AutoGenerate不能在群集中使用。






描述:执行当前Web请求期间发生了未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。



异常详细信息: System.Web.HttpException :viewstate MAC验证失败。如果此应用程序由Web场或群集托管,请确保< machineKey> configuration指定相同的validationKey和验证算法。 AutoGenerate不能在群集中使用。

解决方案

这可能是因为你的' action '属性表格标签。如果您在forms元素上指定了一个操作,并且该操作与您要浏览的页面不同,则会发生此错误。详情:安装.NET 3.5 SP1后验证视图状态MAC失败 [ ^ ]







可能与缺少DataKeyNames有关。详细信息:网站托管错误 [ ^ ]







在此查看更多信息:关于CP的类似问题 [ ^ ]

我也试图通过asp.net实现全球网关支付。

我用E44 pulg来支持。

它在我当地工作环境。



但是,当我在goDaddy服务器中添加应用程序时,它会在发送事务请求时显示Object Moved to Here的错误。 />


我的代码是,



string CardNo = txt1.Text;

string ExpMonth = ddMonth.SelectedValue;

string ExpYear = ddYear.SelectedValue;

string Total = Session [FinalTotAmount]。ToString();





E44.ServiceSoapClient ws = new E44.ServiceSoapClient();

E44.Transaction txn = new E44.Transaction();



txn.ExactID =********;

txn.Password =*********;

txn.Transaction_Type =00;

txn.Card_Number = CardNo;

txn.CardHoldersName =CSharp NET Sample;

txn.DollarAmount = Session [FinalTotAmount]。ToString();

txn.Expiry_Date = ExpMonth + ExpYear.Substring(2,2);



E. 44.TransactionResult result = ws.SendAndCommit(txn);



string respCode = result.EXact_Resp_Code.ToString();

string msg = result.EXact_Message.ToString();

string bankRespCode = result.Bank_Resp_Code.ToString();

string bankMsg = result.Bank_Message.ToString();



关于这个问题的任何想法?



谢谢。


I am trying to implement First Data Payment Gateway in my asp.net website.

I have done all things, now I can redirect to https://checkout.globalgatewaye4.firstdata.com/payment and Payment is done but then FirstData is redirecting to my site on Result.aspx page.

On that page how can I know that payment is done successfully or any error occurred etc. I know that it send response code in POST method but when come to my webpage it gives error like :



Server Error in '/' Application.



Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.



Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

解决方案

This can be because of the 'action' attribute in your form tag. This error happen if you have specified an action on the forms element, and if the action is different than the page you are browsing to. Details here: Validation of viewstate MAC failed after installing .NET 3.5 SP1[^]

OR

May be related to missing DataKeyNames. Details here: Website Hosting error[^]



Look here for more: Similar Questions on CP[^]


I also tried to implement global gateway payment via asp.net.
I used E44 pulg in to that.
It worked in my local environment.

But, when I add the application in goDaddy server, it shows the error of "Object Moved to Here" when it sending a request of transaction.

My code is,

string CardNo = txt1.Text;
string ExpMonth = ddMonth.SelectedValue;
string ExpYear = ddYear.SelectedValue;
string Total = Session["FinalTotAmount"].ToString();


E44.ServiceSoapClient ws = new E44.ServiceSoapClient();
E44.Transaction txn = new E44.Transaction();

txn.ExactID = "********";
txn.Password = "*********";
txn.Transaction_Type = "00";
txn.Card_Number = CardNo;
txn.CardHoldersName = "CSharp NET Sample";
txn.DollarAmount = Session["FinalTotAmount"].ToString();
txn.Expiry_Date = ExpMonth + ExpYear.Substring(2, 2);

E44.TransactionResult result = ws.SendAndCommit(txn);

string respCode = result.EXact_Resp_Code.ToString();
string msg = result.EXact_Message.ToString();
string bankRespCode = result.Bank_Resp_Code.ToString();
string bankMsg = result.Bank_Message.ToString();

Any Idea on the problem?

Thank you.


这篇关于如何在First Data Payment Gateway实施中获得响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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