cybersource / cybersource-sdk-dotnet Goto Github PK
View Code? Open in Web Editor NEW.Net SDK for the CyberSource Simple Order API
License: Other
.Net SDK for the CyberSource Simple Order API
License: Other
Hello,
In order to implement 3D Secure 2.x we need the payerAuthEnrollReply_authorizationPayload field. This has been recently added to the Cybersource API. Any chance we could have the NuGet package updated with the latest service references? If no one is available, would a pull request be welcome?
Thanks!
Hi,
I am using service fabric to deploy the application to azure cluster and we do not use configuration but an application manifest generated by service fabric. The RunTransaction() method in SoapClient expects that the file path will be picked up by the config. But the client would want to keep this file in Blob storage etc. I think the better solution would be for this method to expect a byte[] stream for this certificate rather than reading it from configuration and let the client handle how they want to store it.
According to the CyberSource API docs (http://apps.cybersource.com/library/documentation/dev_guides/CC_Svcs_SO_API/html/wwhelp/wwhimpl/js/html/wwhelp.htm#href=reply_fields_so.html) a field called ccCaptureReply_processorTransactionID should be returned:
ccCaptureReply_processorTransactionID
Processor transaction ID. This value identifies the transaction on a host system. This value is supported only for Moneris. It contains this information:
However in the .NET SDK this property does not exist. Does the service reference in the SDK and the nuget package need updating?
We have a requirement of using signed libraries with our project. I see the CyberSource.Base library is signed, but not the CyberSource.Clients library. Can this be signed as well?
We're currently signing and compiling the library ourselves to get around this, but we'd prefer to use NuGet to make keeping up with updates simpler.
Can you provide a sample client that works with .net core ?
API documentation has Reason code field that indicates the reason for the transaction failure or success.
Reason code field is missing in error responses when Api Exception is recieved.
I have a default proxy configuration in my web.config/app.config like:
<system.net>
<defaultProxy>
<proxy
proxyaddress="MY_PROXY_URL"
bypassonlocal="True"/>
<bypasslist>
<add address="MY_URL_TO_BYPASS_FOR_ANOTHER_SERVICE" />
</bypasslist>
</defaultProxy>
</system.net>`
CyberSourceLibrary doesn't use the default configuration, so I need to repeat the proxy again in cybersource proxy configuration like:
<add key="cybs.proxyURL" value="MY_PROXY_URL"/>
When I do this, the library override my default configuration and I lost my by pass definition.
It is the code (BaseClient.cs line # 323):
if (mProxy != null)
{
WebRequest.DefaultWebProxy = mProxy;
httpsTransport.UseDefaultWebProxy = true;
}
This code should be changed as well (BaseClient.cs line # 48):
if (proxyURL != null)
{
mProxy = new WebProxy(proxyURL);
// if a proxyUser is specified in the configuration file,
// set up the proxy object's Credentials.
string proxyUser
= AppSettings.GetSetting(null, PROXY_USER);
if (proxyUser != null)
{
string proxyPassword
= AppSettings.GetSetting(null, PROXY_PASSWORD);
NetworkCredential credential
= new NetworkCredential(proxyUser, proxyPassword);
CredentialCache cache = new CredentialCache();
cache.Add(new Uri(proxyURL), BASIC_AUTH, credential);
mProxy.Credentials = cache;
}
}
It should be smart to use the default proxy and if I have a different proxy for CyberSource calls, the library can not override my default configuration.
When using the NVP Client and passing in values which are not strings the client successfully processes the transactions fine. If you enable logging then the logger fails with a type conversion error:
"Unable to cast object of type 'System.Double' to type 'System.String'."
StackTrace " at CyberSource.Base.Logger.GetLogString(MessageType type, Hashtable table)\r\n at CyberSource.Base.Logger.LogRequest(Hashtable request, Boolean demo)\r\n at CyberSource.Clients.NVPClient.RunTransaction(Configuration config, Hashtable request)\r\n
To reproduce this change the following line in the NVPSample.cs
request.Add( "item_0_unitPrice", "12.34" );
to
request.Add( "item_0_unitPrice", 12.34);
And enable logging in the config:
I would have expected either the transaction to fail when passing in non-string values OR the logger to succeed when passing in non-string values.
We are being notified that the URLs are changing to support Akamai SureRoute:
Test Environment: ics2wstesta.ic3.com
Production Environment: ics2wsa.ic3.com
I can download the source and make this change myself, but since everyone will need to switch by July 1, 2016, it would be nice to have a separate branch and zip download for this during the transition period.
Are you going to provide simple order api client for .net core. If yes then when? if not then, at least provide some instruction to create soa client for .net core.
Hello, the README.md file says "The version of the CyberSource Web Services API supported by the clients is indicated at the top of this README" but then there is no version listed at the top of the README. Please list a version or remove this line. I came here curious about which version this package supported since it hadn't been updated in 8 months and wasn't able to easily determine that from the README file which was disappointing. Thanks!
Hey I am getting this and I am not sure why?
System.Security.Cryptography.CryptographicException:
Invalid provider type specified.
Server stack trace:
at System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer)
at System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle)
at System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair()
at System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize, CspParameters parameters, Boolean useDefaultKeySize)
at System.Security.Cryptography.X509Certificates.X509Certificate2.get_PrivateKey()
at System.IdentityModel.Tokens.X509AsymmetricSecurityKey.get_PrivateKey()
at System.IdentityModel.Tokens.X509AsymmetricSecurityKey.GetSignatureFormatter(String algorithm)
at System.IdentityModel.SignedXml.ComputeSignature(SecurityKey signingKey)
at System.ServiceModel.Security.WSSecurityOneDotZeroSendSecurityHeader.CompletePrimarySignatureCore(SendSecurityHeaderElement[] signatureConfirmations, SecurityToken[] signedEndorsingTokens, SecurityToken[] signedTokens, SendSecurityHeaderElement[] basicTokens, Boolean isPrimarySignature)
at System.ServiceModel.Security.SendSecurityHeader.CompleteSignature()
at System.ServiceModel.Security.SendSecurityHeader.CompleteSecurityApplication()
at System.ServiceModel.Security.SecurityAppliedMessage.OnWriteMessage(XmlDictionaryWriter writer)
at CyberSource.Clients.CustomTextMessageEncoder.WriteMessage(Message message, Int32 maxMessageSize, BufferManager bufferManager, Int32 messageOffset)
at System.ServiceModel.Channels.HttpOutput.SerializeBufferedMessage(Message message, Boolean shouldRecycleBuffer)
at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
at System.ServiceModel.Channels.HttpChannelFactory1.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.SecurityChannelFactory
1.SecurityRequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
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 CyberSource.Clients.NVPServiceReference.INVPTransactionProcessor.runTransaction(inputNVPMessageIn request)
at CyberSource.Clients.NVPServiceReference.NVPTransactionProcessorClient.CyberSource.Clients.NVPServiceReference.INVPTransactionProcessor.runTransaction(inputNVPMessageIn request)
at CyberSource.Clients.NVPClient.RunTransaction(Configuration config, Hashtable request)
Any ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.