CyberSource error

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

CyberSource error

Post by jguengerich » Thu May 09, 2013 1:24 pm

I have followed the directions in the AbleCommerce GOLD Merchant Guide for setting up the CyberSource gateway (in test mode). When I click "Pay With Card" I get the following error:

Provider threw exception in DoAuthorize.
Exception: Could not find default endpoint element that references contract 'schemas.cybersource.com.ITransactionProcessor' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.
Stack Trace:
at System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceEndpoint serviceEndpoint, String configurationName)
at System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address)
at System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress)
at System.ServiceModel.EndpointTrait`1.CreateSimplexFactory()
at System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 endpointTrait)
at System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef()
at CommerceBuilder.Payments.Providers.CyberSource.PaymentProvider.SendRequest(RequestMessage request)
at CommerceBuilder.Payments.Providers.CyberSource.PaymentProvider.DoAuthorize(AuthorizeTransactionRequest authorizeRequest)
at CommerceBuilder.Services.PaymentService.Authorize(Payment payment)

Any ideas what is causing this or how to resolve it?
Jay

jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

Re: CyberSource error

Post by jguengerich » Thu May 09, 2013 3:05 pm

Well, I made some progress. Based on threads found on Stack Overflow, I resolved that error by copying the <system.serviceModel> section from cybersource_wcf.config file to the "root" web.config file.

However, now I get the following error:
Provider threw exception in DoAuthorize.
Exception: Error in deserializing body of reply message for operation 'runTransaction'.
Stack Trace: Server stack trace: at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, XmlSerializer serializer, MessagePartDescription returnPart, MessagePartDescriptionCollection bodyParts, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, String action, MessageDescription messageDescription, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeBodyContents(Message message, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeReply(Message message, Object[] parameters)
at System.ServiceModel.Dispatcher.ProxyOperationRuntime.AfterReply(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at schemas.cybersource.com.ITransactionProcessor.runTransaction(inputMessageIn request)
at schemas.cybersource.com.TransactionProcessorClient.runTransaction(RequestMessage requestMessage)
at CommerceBuilder.Payments.Providers.CyberSource.PaymentProvider.DoAuthorize(AuthorizeTransactionRequest authorizeRequest)
at CommerceBuilder.Services.PaymentService.Authorize(Payment payment)

Inner Exception: There is an error in XML document (3, 435).
Inner Exception Stack Trace: at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, XmlSerializer serializer, MessagePartDescription returnPart, MessagePartDescriptionCollection bodyParts, Object[] parameters, Boolean isRequest)
Inner Exception: There is an error in XML document (3, 435).
Inner Exception Stack Trace: at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, XmlSerializer serializer, MessagePartDescription returnPart, MessagePartDescriptionCollection bodyParts, Object[] parameters, Boolean isRequest)

It sounds like CyberSource is retruning some invalid XML, but if that is the case, is there anything I can do about it?
Jay

jguengerich
Commodore (COMO)
Commodore (COMO)
Posts: 436
Joined: Tue May 07, 2013 1:59 pm

Re: CyberSource error

Post by jguengerich » Thu May 09, 2013 3:34 pm

OK, I've got to start using Google before I post here :? .
Using a suggestion from the Cybersource FAQ, I was able to resolve the second issue by changing all of the parameters in the <readerQuotas /> line to very large numbers.
Jay

Post Reply