Vantiv.ChargebackSdkForNet 2.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Vantiv.ChargebackSdkForNet --version 2.1.1                
NuGet\Install-Package Vantiv.ChargebackSdkForNet -Version 2.1.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Vantiv.ChargebackSdkForNet" Version="2.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Vantiv.ChargebackSdkForNet --version 2.1.1                
#r "nuget: Vantiv.ChargebackSdkForNet, 2.1.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Vantiv.ChargebackSdkForNet as a Cake Addin
#addin nuget:?package=Vantiv.ChargebackSdkForNet&version=2.1.1

// Install Vantiv.ChargebackSdkForNet as a Cake Tool
#tool nuget:?package=Vantiv.ChargebackSdkForNet&version=2.1.1                

Vantiv eCommerce .NET Chargeback SDK

WARNING:
All major version changes require recertification to the new version. Once certified for the use of a new version, Vantiv modifies your Merchant Profile, allowing you to submit transaction to the Production Environment using the new version. Updating your code without recertification and modification of your Merchant Profile will result in transaction declines. Please consult you Implementation Analyst for additional information about this process.

About Vantiv eCommerce

Vantiv eCommerce powers the payment processing engines for leading companies that sell directly to consumers through internet retail, direct response marketing (TV, radio and telephone), and online services. Vantiv eCommerce is the leading authority in card-not-present (CNP) commerce, transaction processing and merchant services.

About this Chargeback .NET SDK

The Vantiv eCommerce Chargeback .NET SDK is a C# implementation of the Vantiv eCommerce Chargeback API. This Chargeback SDK was created to make it as easy as possible to process your chargebacks and upload documents supporting your cases with Vantiv eCommerce. This Chargeback SDK utilizes the HTTPS protocol to securely connect to Vantiv eCommerce. Using the Chargeback SDK requires coordination with the Vantiv eCommerce team in order to be provided with credentials for accessing our systems.

Each .NET Chargeback SDK release supports all of the functionality present in the associated Vantiv eCommerce Chargeback API version (e.g., Chargeback SDK v2.1 supports Vantiv eCommerce Chargeback API v2.1). Please see the online copy of our Chargeback XSD for Vantiv eCommerce XML to get more details on what the Vantiv eCommerce Chargeback API supports.

This Chargeback SDK is implemented to support the .NET plaform, including C#, VB.NET and Managed C++ and was created by Vantiv eCommerce. Its intended use is for managing your chargeback cases and uploading/downloading documents supporting your cases.

See LICENSE file for details on using this software.

Source Code available from : https://github.com/Vantiv/cnp-chargeback-sdk-dotNet

Please contact Vantiv eCommerce to receive valid merchant credentials in order to run tests successfully or if you require assistance in any way. We are reachable at [email protected]

Setup

1.) To install it, copy ChargebackSdkForNet.dll into your Visual Studio references.

2.) You can configure it statically by adding the following section to your project's App.config

    <configSections>
        <sectionGroup name="vantivEcommerce">
            <section name="chargebackSettings"
                     type="System.Configuration.NameValueSectionHandler" />
        </sectionGroup>
    </configSections>
    <vantivEcommerce>
        <chargebackSettings>
            <add key="username" value="myUsername" />
            <add key="password" value="myPassword" />
            <add key="merchantId" value="777777" />
            <add key="host" value="https://www.testvantivcnp.com/sandbox/new/services" />
            <add key="printXml" value="true" />
            <add key="proxyHost" value="myProxyHost" />
            <add key="proxyPort" value="7777" />
            <add key="neuterXml" value="false" />
        </chargebackSettings>
    </vantivEcommerce>

Also, you can use a different Configuration constructor to pass a file path to a simple configuration file that contains [key=value] settings; an example of this configuration file can be found at (https://github.com/Vantiv/cnp-chargeback-sdk-dotNet/blob/2.x/sampleConfig.txt).

    username = myUsername
    password = myPassword
    merchantId = 777777
    host = https://www.testvantivcnp.com/sandbox/new/services
    printXml = true
    neuterXml = false
    proxyHost = myProxyHost
    proxyPort = 7777

In addition, you can configure it dynamically by create a dictionary with required settings and call the Configuration constructor taking a dictionary.

3.) Let's try our SDK with the Sandbox, which doesn't require a valid username and password:

using System;
using ChargebackSdkForNet;

namespace Merchant
{
    internal class Program
    {
        public static void Main(string[] args)
        {
            var request = new ChargebackRetrievalRequest();
            request.Config.Set("host", "https://www.testvantivcnp.com/sandbox/new/services");
            var dateTime = new DateTime(2013,1,1);
            var response = request.RetrieveByActivityDate(dateTime);
            var cases = response.chargebackCase;
            foreach (var c in cases)
            {
                Console.WriteLine("Case Id:" + c.caseId);
            }
        }
    }
}
  1. Compile and run this file. You should see the following result:
    Case Id:1288791001
  1. In Step 3, you've tried our .NET SDK with the Sandbox. Once you are registered to test with our Prelive environment, run the example with the following host (https://services.vantivprelive.com).
using System;
using ChargebackSdkForNet;

namespace Merchant
{
    internal class Program
    {
        public static void Main(string[] args)
        {
            var request = new ChargebackRetrievalRequest();
            request.Config.Set("host", "https://services.vantivprelive.com");
            var dateTime = new DateTime(2013,1,1);
            var response = request.RetrieveByActivityDate(dateTime);
            var cases = response.chargebackCase;
            foreach (var c in cases)
            {
                Console.WriteLine("Case Id:" + c.caseId);
            }
        }
    }
}
  1. The expected output should be:
    Case Id:1288791001
    Case Id:1288791002
    Case Id:1288791003
    Case Id:1288791004
    Case Id:1288791005
    Case Id:1288791006
    Case Id:1288791007
    Case Id:1288791008
    Case Id:1288791009
    Case Id:12887910010
    Case Id:12887910011

More examples can be found in Functional and Unit Tests

Please contact Vantiv eCommerce with any further questions. You can reach us at [email protected].

Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.2 572 4/9/2020
2.1.1 857 6/4/2018
2.1.0 1,026 5/1/2018

* Added MIME Types support for the following file extensions:
- tiff, png, jpg, gif, pdf
* Replaced all instances of remove to delete according to new changes in Chargeback Sandbox