
May 10th, 2007, 10:35 AM
|
|
Registered User
|
|
Join Date: May 2007
Posts: 5
Time spent in forums: 1 h 24 m 4 sec
Reputation Power: 0
|
|
[RESOLVED] Trying to call .NET function (have vb example)
I am trying to call a .NET module from a php5 script. My code is:
PHP Code:
$transaction = new DOTNET("Paymentech", "Transaction");
$response = new DOTNET("Paymentech", "Response");
My script dies on the first line with the error:
Quote: PHP Fatal error: Uncaught exception 'com_exception' with message 'Failed to instantiate .Net object [CreateInstance] [0x80070002] The system cannot find the file specified. ' in C:\Terry\OrdCen\PHPTEST.php:3 Stack trace: #0 C:\Terry\OrdCen\PHPTEST.php(3): dotnet->dotnet('Paymentech', 'Response') #1 {main} thrown in C:\Terry\OrdCen\PHPTEST.php on line 3 |
The sample VB code that came with the module states:
Code:
Dim response AS Paymentech.Response
Dim transaction As New Paymentech.Transaction(RequestType.CC_AUTHORIZE)
This is my first real foray into .NET with PHP. Hopefully someone can help me.
I believe my server is set up properly as the sample code given in the PHP manual does work:
PHP Code:
<?php
$stack = new DOTNET("mscorlib", "System.Collections.Stack");
$stack->Push(".Net");
$stack->Push("Hello ");
echo $stack->Pop() . $stack->Pop();
?>
And the sample compiled vb app also works. The sample vb app is in the same directory (on the server) as several paymentech dll's. Could that have something to do with this? How does my PHP script know where to get the information on the paymentech object?
Thank you for any help anyone can offer!
Terry
Last edited by tcarnes : May 15th, 2007 at 10:20 AM.
|