cancel
Showing results for 
Search instead for 
Did you mean: 

ASP.NET ARB Sample Code

Is the sample code set to work in Visual Web Developer Express 2008?  I downloaded the sample code from Authorize,Net for ARB VB.NET.  I extracted the compressed file.  I opened VBNet (Microsoft Visual Studio Solutions) in Visual Web Developer Express 2008 and replaced the LoginID (loginName) and transaction key, in Program.vb with Authorize.Net's test account info they emailed me.  I then ran the program and a dos window appeared with various messages....

Create subscription > Result OK >: Subscription ID 123123

Create subscription > Result Error >:Duplicate Subscription ID

bla bla bla

Update subsc...>Result OK

Cancel subsc...>Result OK

Press any ket to continue.

 

is this the expected result for a test?  Does this mean it is working?

mjta
Contributor
4 REPLIES 4

Yes, it means that your test was successful. You may now customize the code to your specific business needs instead of using the sample code test.

 

 

Thank you,

Elaine

Elaine
Trusted Contributor
Trusted Contributor

I apologize if this not the place to post this....

 

I am working on integrating ARB with our current payment processing library. I have the VB.Net sample code, which appears to be written against .Net 1.1. I am working in a .Net 3.5 environment, and I created a Service Reference to discover the ARB WSDL at url https://api.authorize.net/soap/v1/service.asmx?wsdl, which it did.

 

When consuming the WSDL, the sample code does not match up with what the WSDL allows. For example, the sample creates an instance of ARBCreateSubscriptionRequest. That class is not available in the WSDL; it has ARBSubscriptionType. With that the WSDL appears to want me to call [ServiceInstance].CreateARBSubscription() passing in my MerchantAuthentication instance and my ARBSubscriptionType instance. Again, what to do with the call and the return are not outlined in the sample code, that I can see.

 

Can you direct me as to where I should go from here - either abandon the WSDL in favor of the ApiInterface from the sample code, attach to the WSDL as a 2.0 (or other .Net version) service reference, or point me to some sample code that consumes the service as defined in the WSDL.

 

Thanks

 

 

This is in C#. VB should be simliar. Use the ServiceSoapClient.

authorizeNET.ServiceSoapClient _aNET = new authorizeNET.ServiceSoapClient();
authorizeNET.ARBCreateSubscriptionResponseType _rt = _aNET.ARBCreateSubscription(???, ???);

 

Thanks Raynor,

 

I was starting down that path but had an issue finding the default endpoint for the service contract. I have since solved that issue (the app.config in the dll was not applied to web app - copied the servicemodel section from dll's app.config to web apps main web.config and all is well now).

 

Thank you very much for the reply.

 

RC