Reputation: 21
Having some trouble using the First Data Global Gateway Web Service API.
According to the documentation you should be able to download the wsdl and 3 xsd schema files and create a web service reference by pointing to the local wsdl file. After doing this it does not import all the files. Attempting to update the web reference results in an error...
"The custom tool 'MSDiscoCodeGenerator' failed. Unable to import binding 'FDGGWSApiOrderBinding' from namespace 'https://secure.linkpt.net/fdggwsapi/schemas_us/fdggwsapi"
Has anyone successfully imported this wsdl and got it working in Visual Studio?
The other requirements are installing the Gateway's client cert which I have done.
Thanks for any assistance.
Upvotes: 2
Views: 3392
Reputation: 741
First Data's web service has a problem with the MIME type of some of their files. order.wsdl and v1.xsd will work fine if you browse to them and File/Save As in your browser.
a1.xsd and fdggwsapi.xsd will save as HTML documents if you just File/Save As them from your browser. For these files, you need to browse to them, copy all the text out of the browser, paste it into a Notepad window and save that as the XSD. Otherwise they will be HTML documents, doctype, body and all, and they will not work.
Upvotes: 0
Reputation: 2134
I have Windows 7 and VS 2010. The files I downloaded from First Data didn't work, so I called support and gave them as much information as I could about the problem. After they did some troubleshooting on their end, they sent me new files which worked, so the problem I had was with their files and not because of anything I was doing wrong.
Upvotes: 2
Reputation: 21275
See also my blog post for up-to-date revisions.
Their directions are very confusing and I ended up calling them for help.
First install the certificate, go into Internet Options in the Control Panel. Choose the Content tab then Certificates. On the Personal tab, click Import... and follow the wizard here to add your certificate. I did this mostly by accident only because I have had to do this before for other stuff I have done in the past. You might not need to do those other instructions in their documentation.
After that you can setup the web service:
C:\FDGGWSClient
. Put a1.xsd
, fdggwsapi.xsd
, and v1.xsd
into C:\FDGGWSClient\schemas_us
. Put order.wsdl
into C:\FDGGWSClient\wsdl
. I also put the certificate (WSxxxxxxxx._.1.pem
) in the root folder (C:\FDGGWSClient
).order.wsdl
. In my case it's C:\FDGGWSClient\wsdl\order.wsdl
. This should allow it to work.
The other think I did was create a separate class for all of the processing. So my constructor had:
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;
}
Then I created a method to create the rest of the information needed to send the transaction to them.
First Data has been notorious on how to set up and start using their services.
Upvotes: 5