Accessing COM object in Commerce Server orderform using C#

D

dougelderz

I am integrating a CyberSource Commerce pipeline component to manage my
payment transactions. CyberSource provides a hashtable COM object that
is used to set data into the orderform before a request and is used to
retrieve response data. I have set a reference to object in my project
and have no problem creating instance, setting data and then setting in
orderform.

On CyberSource response they have populated a hashtable object and
their Commerce Component sets it in the Commerce Server orderform
object (orderform{"_cybs_reply"]. I need to access that in my ASP.Net
C# code to pull response data. Something along the lines of this code
(which doesn't work):

CyberSourceWSLib.HashtableClass oReply = new
CyberSourceWSLib.HashtableClass();
oReply = (CyberSourceWSLib.HashtableClass)orderForm["_cybs_reply"];
string test = (String)oReply["decision"];

The above code fails with invalid cast error on second line. Anyone
know how to access this COM object stored in the orderform?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,122
Latest member
VinayKumarNevatia_
Top