Custom iMIS 15.1.3 OCX

 

I am developing a .net dll that is registered as an OCX (COM interop) that iMIS calls successfully when CC is set-up in iMIS as a custom gateway.
 
The dll/ocx is called by iMIS OK, the call to the cc provider web service is made OK, and the response from the CC provider is received and passed back to iMIS OK. A 'success' and a 'Declined' transaction are being tested. The 'success' works fine passing back the CC auth code info to iMIS that is then inserted into tables like Trans successfully. The 'fail' transaction also works with the decline code/message shown by iMIS and no updates made to the iMIS tables like Trans.
 
There is only one problem getting this dll/ocx completed for the iMIS customer - after a fail/decline message appears, if I try to save the iMIS transaction again iMIS abends with and OMNIS error.
 
I used the Innovation 2009 C# template as a base and information from the community. This was very helpful but did not provide a complete example with signatures for the passing in of parameters from iMIS and return codes to iMIS from the OCX. I used the DebugView to debug using writeline for the parameters that appear to be fine. For the return codes, I am using return signature/codes I used for previous OCXs I created using VB6 for 10.6 and 15.0.3.
 
I am wondering if the return signature/codes have changed in 15.1.3 that maybe creating this problem.
 
Is it possible to get the official return signature/codes from ASI and any examples – maybe cut/paste code from the production verisign ocx source that can be reused for a custom OCX.
 
Any help would be appreciated to help complete this OCX.

Thanks Nick

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Custom iMIS 15.1.3 OCX

 

The problem actually seems to happen on any 2nd transaction - success or fail - so at least the problem is consistent, First transaction works and second transaction fails.

 

questions

Hi Nick,

Sorry it took a while to respond, as the holidays intervened...

There aren't any changes to the desktop return codes for 15.1.3 - they're still "SUCCESS", "DECLINED", and "TIMEOUT".  For "TIMEOUT", you need to have an nCCQuery method set up; there's a stub in the C# sample template.  nCCQuery doesn't come into play for a SUCCESS transaction.

Does the second call to nCCAuthOnly_Custom fail with an Omnis error before any of the C# code is invoked?  In the middle of the C# code?  or on its return to desktop?

Henry
 

Xtender component cannot be loaded

I am having a problem trying to register the DLL.  I am using regasm.exe and get the message successfully registered, How ever, iMIS fails to find the file and displays the message "The Xtender component for Credit Card Authorization cannot be loaded. Please check your system setup."

I am using the following to register the DLL and the TLB. I am putting the files in ..\iMIS15\ActiveX. 

%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\regasm.exe CCAuthTemplateCSharp.dll

%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\regasm.exe CCAuthTemplateCSharp.dll /tlb

Any suggesstions as to what I am doing wrong?

Tom

things to try

Hi Tom,

A couple of things Nick and I tried for this issue follow.

(1) Maybe there's an existing registration of the VB6 PayPflowPro .ocx that's conflicting.  Try unregistering that .ocx with regsvr32 /u, and then search the registry for "PayFlowPro".  If there are any additional registrations, delete them.  Then re-register using regasm.

(2) In some cases, regasm alone doesn't completely register the component, but building the solution in VS does.  That doesn't help with deployment, of course.  The difference in the registry is a "CodeBase" entry, with a path to the dll.  Maybe I just need to add it to the ComRegister function.
 
For a workaround, you can add two new REG_SZ values manually in regedit.
 
Go to HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\{8C828D4E-FE28-4126-8BBB-007C6FFA785A}
(the key may differ by OS, I'm not sure - just search for 8C828D4E-FE28-4126-8BBB-007C6FFA785A)
 
under "InProcServer32", add a new key named CodeBase with value like this (your path will vary - note the forward slashes instead of backslashes in the path)
 
file:///C:/iMISpath/AX controls/CCAuthTemplateCSharpUserControl.dll  

under InProcServer32\1.0.4048.18779, add the same CodeBase key

Keep me posted...

Henry
 

Custom OCX Deployment steps

 

 Custom OCX Deployment steps

 
1) Copy dll files to C:\Program Files\ASI\iMIS15\ActiveX
 
2) Copy regasm.exe and xml files (2 files) to C:\Program Files\ASI\iMIS15\ActiveX, these are needed to register dlls, the regular workstations do not have these two files.
  
3)  Open a command prompt, go to this folder C:\Program Files\ASI\iMIS15\ActiveX
 
4) Run this command to register the dll
C:\Program Files\ASI\iMIS15\ActiveX>regasm.exe CCAuthTemplateCSharpUserControl.dll
 
Microsoft (R) .NET Framework Assembly Registration Utility 2.0.50727.3053
Copyright (C) Microsoft Corporation 1998-2004. All rights reserved.
 
Types registered successfully
 
C:\Program Files\ASI\iMIS15\ActiveX>
 
5) Registry entries (see sample below)
Cmd run Regedit
Find Key 8C828D4E-FE28-4126-8BBB-007C6FFA785A
 
Add entry in two places in registry
Add CodeBase with
go to right pane (details), right click, select new/add string
 
6) iMIS set-up
Add entries/updates for CC gateway and cash account (CC – link to gateway)
See screenshots below

 

 

The above should do it. I was going to send screenshots, but did not see a way to attach documents. If you need that send me an email at nsrdarev@hotmail.com and I will send the registry screenshots.

Hope it helps!!

Thanks Nick

 

 

Custom gateway not properly installed

Champagne for everyone!  I was able to get it to work, yea!

My problem was I was creating a new GUID for the several different sets of test code.  The sample code says:

// Be sure to get your own Guid via "select newid()", guidgen.exe, etc.
    [Guid("8C828D4E-FE28-4126-8BBB-007C6FFA785A")]
    //[Guid("0F9CF41E-51F7-4EF9-B1C5-13B50247E85A")]
 

So, I was never able to find the one you guys were telling me to look for.  Once I figuried it out, I was able to delete all the bogus reg entries and then edit the correct entry.  It still gave me an error until I ran rhe following command to create a new type library.  Then it worked.

%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\regasm.exe CCAuthTemplateCSharp.dll /tlb

Thank you both so very much for all of your help.  It never would have happened without your guidance.

Thanks Tom

good to hear...

...thanks for posting the details.

Henry

Custom gateway not properly installed

I am getting this message when entering a payment transaction.

Thanks Tom

---------------------------
Custom gateway not properly installed
---------------------------
The payment type entered for this transaction requires a Custom Gateway for credit card authorizations. The custom gateway is not properly installed on this workstation.

 

The authorization for this payment transaction will time out.

 

Please contact your system administrator or the developer of your custom gateway application before processing payments using the specified payment type.

 

(nCCAuthOnly_Custom)
---------------------------
OK  
---------------------------
 

Xtender component cannot be loaded

 

Hi - I will check my notes tomorrow and send any instructions I have for deployment - I installed on 3 user PCs and the custom DLL is working fine with 15.1.3

 

Custom iMIS 15.1.3 OCX

 

 

ocx info

 

 
Hi Henry,
It looks like the second call to nCCAuthOnly_Custom fails with an Omnis error before any of the C# code is invoked. There is nothing in the Debugview log and the first line of the nCCAuthOnly_Custom function is a Debug.WriteLine. 
 
Last few lines of function  
public string nCCAuthOnly_Custom(string strCashAccountCode, string strCCAuthAccountCode, string strParameters)
 string vaResult = "success\fauthcode\fA\forderid_getTransID\ramount=1.99"; Debug.WriteLine("nCCAuthOnly_Custom return result = " + vaResult);
return vaResult;
 
 CC info changed below as live site and real cc used
00000000 0.00000000 [5952]  
00000001 0.00000000 [5952]  TT: Radio state info: on 
00000002 7.56230974 [5952]  
00000003 7.56230974 [5952]  TT: Radio state info: on 
00000004 14.32357693 [7596] ClearCachedFields  
00000005 14.32579422 [7596] CacheField lvSession.UserId MANAGER  
00000006 14.32613659 [7596] CacheField lvSession.SQLHostName iMIS___NSRDAREV-WXP1_iMIS15  
00000007 14.32646370 [7596] CacheField lvSession.SQLDatabase IMIS151Prod2  
00000008 14.32678413 [7596] CacheField lvSession.SQLUserId MANAGER_IMIS151Prod2  
00000009 14.32710934 [7596] CacheField lvSession.SQLUserPassword 4725A1D6-6A29-4E54-9F96-26CB6C046A3E  
00000010 14.32742882 [7596] CacheField lvSession.CurrentPath C:\PROGRAM FILES\ASI\IMIS15\  
00000011 14.32775211 [7596] CacheField fBtId 101  
00000012 14.32886505 [7596] ClearCachedFields  
00000013 14.32918072 [7596] CacheField lvSession.UserId MANAGER  
00000014 14.32949924 [7596] CacheField lvSession.SQLHostName iMIS___NSRDAREV-WXP1_iMIS15  
00000015 14.32981586 [7596] CacheField lvSession.SQLDatabase IMIS151Prod2  
00000016 14.33013153 [7596] CacheField lvSession.SQLUserId MANAGER_IMIS151Prod2  
00000017 14.33044815 [7596] CacheField lvSession.SQLUserPassword 4725A1D6-6A29-4E54-9F96-26CB6C046A3E  
00000018 14.33076477 [7596] CacheField lvSession.CurrentPath C:\PROGRAM FILES\ASI\IMIS15\  
00000019 14.33108044 [7596] CacheField fBtId 101  
00000020 14.33563900 [7596] nCCAuthOnly_Custom VISACOCX VISA_CUSTOM_OCX  
00000021 14.33567715 [7596] nCCAuthOnly_Custom strParameters = BillToId=101;CustomerId=101;Amount=1%2E00;CardNumber=1111%11111%11111%11111;CardExpiryDate=11%2F14;CardName=nick%20Smith;CardCSC=;CardIssueNumber=;CardIssueDate=;PONumber=;InvoiceNumber=0;CashAccountCode=VISACOCX;ShipFromZip=;ShipToZip=07107%2D2564;BatchNumber=22;  
00000022 15.11262512 [5952]  
00000023 15.11262512 [5952]  TT: Radio state info: on 
00000024 22.65575790 [5952]  
00000025 22.65575790 [5952]  TT: Radio state info: on 
00000026 30.23435402 [5952]  
00000027 30.23435402 [5952]  TT: Radio state info: on 
00000028 37.79683685 [5952]  
00000029 37.79683685 [5952]  TT: Radio state info: on 
00000030 44.28316879 [7596] ccResponse = CustomCCAuthTemplateCSharp.exactsecure2.TransactionResult  
00000031 44.28320313 [7596] nCCAuthOnly_Custom return result = success authcode A orderid_getTransID amount=1.99  
00000032 45.34373474 [5952]  
00000033 45.34373474 [5952]  TT: Radio state info: on 
00000034 52.90621948 [5952]  
00000035 52.90621948 [5952]  TT: Radio state info: on 
00000036 60.47351837 [5952]  
00000037 60.47351837 [5952]  TT: Radio state info: on 
00000038 68.50609589 [5952]  
00000039 68.50609589 [5952]  TT: Radio state info: on 
 
 The process is:
  • First AR/Cash sale goes through fine, cc charge on provider site confirmed and return OK to iMIS
  • Debugview – captures results - below
  • Went around customer tab and other screens OK
  • 2nd AR/Cash sale gets omnis error as soon as Save clicked
  • Debugview – nothing appears in log
Let me know if I can provide anything else to help with this.
Thanks Nick
 

Any news on this? I am having exactly the same problem

My code looks very similar and I am having exactly the same problem.

First transaction goes through fine but the second one immediately causes an omnis error.

updated template

 

I have been working with Henry on this and we just got it resolution the other day.

Henry provided a new template that fixes a problem with the sample from Innovations 2009. We tested and it works great. I used to call a CC provider web serviice.

Henry should be provding a new template soon to the community.

Let me know if you want to discuss,

Yes please

I am really quite desperate to get this working.

If you could provide me with any information I would be eternally gratefull.

Is the template very different from the Innovations 2009 one. Would it be possible to obtain a copy?

you can download the updated template here...

http://www.imiscommunity.com/ccauthtemplatecsharp_updated 

If you have questions or problems, please post them on this thread.

updated template

 

It looks like Henry has put out the new template - that should do the trick for you.

If you wanted to discuss, you can email me at nsrdarev@hotmail.com.