Has anybody had experience of integrating with WorldPay using C#please? I have rewritten the example asp code in C#/ASP.NET. Every aspect of this has been a success except one. Whencalling the produce method on the WorldPay object I am asked tosupply an object parameter [method definition: objectCOMpurcha seClass.produce (ref object Parameter0)]. Obviouslythis does not happen within ASP. I have tried passing both'new' and 'null' objects neither works. In the case of 'null'it appears as if the WorldPay DLL has been written in a way thatdoes not accept a null parameter. Does anybody know what mustbe passed. I am using:
WorldPay.COMpur chaseClass objWP = newWorldPay.COM purchaseClass() ;
objWP.init("");
objWP.setInstal lationId(iInsta llationID);
objWP.setOrderI d(psOrderID);
objWP.setShoppe rId(psShopperID );
objWP.setCurren cyISOCode(sCurr encyISOCode);
objWP.setAmount (pdblAmount);
//objWP.setAuthMo de(objWP.AUTHMO DE_full);
objWP.setValidD ates(lsTransact ionStartTime,ls TransactionExpi ryTime);
objWP.setTestMo de(iTestMode); //100 is testMode
objWP.process() ;
if (objWP.hadError ())
{
while (objWP.hasMoreE rrors())
{
lsErrorMessage += objWP.getNextEr ror() + ";";
}
throw new Exception(lsErr orMessage);
}
object objTest = null;
//object objTest2 = new object;
objWP.produce(o bjTest);
Many thanks,
--------------------------------
From: Andy Everett
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>0gSjBDe6902 yLmXTFyDvKg==</Id>