Eri*_*ric 2 c# payment-gateway visual-studio-2010 firstdata
使用First Data Global Gateway Web Service API时遇到一些问题.
根据文档,您应该能够下载wsdl和3 xsd模式文件,并通过指向本地wsdl文件来创建Web服务引用.执行此操作后,它不会导入所有文件.尝试更新Web引用会导致错误...
"自定义工具'MSDiscoCodeGenerator'失败.无法从命名空间'https://secure.linkpt.net/fdggwsapi/schemas_us/fdggwsapi'导入绑定'FDGGWSApiOrderBinding'"
有没有人成功导入这个wsdl并让它在Visual Studio中工作?
其他要求是安装我已经完成的Gateway的客户端证书.
谢谢你的帮助.
另请参阅我的博客文章以获取最新版本.
他们的指示非常混乱,我最后打电话给他们寻求帮助.
首先安装证书,进入" 控制面板"中的" Internet选项 " .选择内容选项卡,然后选择证书.在" 个人"选项卡上,单击" 导入...",然后按照此处的向导添加证书.我之所以这么做只是因为我以前必须这样做,因为我过去做过其他事情.您可能不需要在其文档中执行其他说明.
之后,您可以设置Web服务:
C:\FDGGWSClient.放a1.xsd,fdggwsapi.xsd和v1.xsd成C:\FDGGWSClient\schemas_us.把order.wsdl成C:\FDGGWSClient\wsdl.我还将certificate(WSxxxxxxxx._.1.pem)放在根文件夹(C:\FDGGWSClient)中.order.wsdl.就我而言,它是C:\FDGGWSClient\wsdl\order.wsdl.这应该允许它工作.
另一个认为我做的是为所有处理创建一个单独的类.所以我的构造函数有:
private FDGGWSApiOrderService oFDGGWSApiOrderService = null;
/// <summary>
/// Initializes a new instance of the test version of the <see cref="ProcessCreditCard"/> class.
/// </summary>
/// <param name="test">if set to <c>true</c> [test].</param>
public ProcessCreditCard()
{
ServicePointManager.Expect100Continue = false;
// Initialize Service Object
oFDGGWSApiOrderService = new FDGGWSApiOrderService();
// Set the WSDL URL
oFDGGWSApiOrderService.Url = @Settings.Default.CcApiUrl;
// Configure Client Certificate
oFDGGWSApiOrderService.ClientCertificates.Add(X509Certificate.CreateFromCertFile(Settings.Default.CertFile));
// Set the Authentication Credentials
NetworkCredential nc = new NetworkCredential(Settings.Default.CertUser, Settings.Default.CertPass);
oFDGGWSApiOrderService.Credentials = nc;
}
Run Code Online (Sandbox Code Playgroud)
然后我创建了一个方法来创建将事务发送给它们所需的其余信息.
First Data因如何设置和开始使用他们的服务而臭名昭着.