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:
- Download all of the files they list in the documentation. I put them all into
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
).
- In Visual Studio 2010, right click on References and choose Add Service Reference. Click on Advanced... then on the bottom of the new window click Add Web Reference...
- The URL you enter here is the file path to
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.