To made payment integration, I used e24PaymentPipe.dll got from client. The problem is that it is always results in failure ("-1") when I try to connect to Gateway Server using "PeformInitTransaction" function.
To be able to use e24PaymentPipe.dll as third party dll, i performed following steps:
(note: OS is 64-bit (windows 8), e24paymentpipe.dll 64x, visual studio application is set to platform 'Any CPU')
- Copy e24PaymentPipe.dll in C:\Windows\System32, run regsvr32 e24PaymentPipe.dll
I could not add that dll as COM in my .NET project since it was unmanaged (the error appear:"...Please make sure that the file is accessible, and that it is a valid assembly or COM component"), so I made the steps:
2.1 Generate strong key(VS Developer cmd- C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64) sn.exe -k key.snk
2.2 tlbImp.exe C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64\e24PaymentPipe.dll /keyfile:key.snk /out:C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64\Interop.e24PaymentPipe.dll
Put Interop.e24PaymentPipe.dll in GAC
- Made reference to C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64\Interop.e24PaymentPipe.dll in my .NET project and set 'Embed Interop Types=true' on Interop.e24PaymentPipe.dll (since I got error:A reference was created to embedded interop assembly...Consider changing the 'Embed Interop Types' property on either assembly.)
My code is:
e24pp.Alias = "alias"; e24pp.Action = "4"; e24pp.Currency = "048"; e24pp.Language = "USA"; e24pp.ResponseUrl = "http://somepage/receipt"; e24pp.ErrorUrl = "http://somepage/receipt"; e24pp.ResourcePath = @"C:\Resource\"; e24pp.PerformInitTransaction(); --> always returns -1 (failure)
It seems that connection to CGW can't be established. Not sure are my steps above is good? What can be the possible issue?