MerchantAPI 2.1.0

.NET 5.0 .NET Core 3.1 .NET Standard 2.1 .NET Framework 4.7.2
dotnet add package MerchantAPI --version 2.1.0
NuGet\Install-Package MerchantAPI -Version 2.1.0
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="MerchantAPI" Version="2.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MerchantAPI --version 2.1.0
#r "nuget: MerchantAPI, 2.1.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install MerchantAPI as a Cake Addin
#addin nuget:?package=MerchantAPI&version=2.1.0

// Install MerchantAPI as a Cake Tool
#tool nuget:?package=MerchantAPI&version=2.1.0

Miva Merchant API SDK for C#

This library wraps the Miva Merchant JSON API introduced in Miva Merchant 9.12. It allows you to quickly integrate your C# applications with a Miva Merchant store to fetch, create, and update store data.

For api documentation visit https://docs.miva.com/json-api.

Requirements

  • Miva Merchant 10+
  • Any of the following targets:
    • .NET 5.0
    • .NET Framework 4.8
    • .NET Framework 4.7.2
    • NetCoreApp 3.1
    • NetStandard 2.1

For Miva Merchant 9.x, use the 1.x release

Installation

Via .NET CLI

From your terminal execute the following in your dependent projects directory

dotnet add package MerchantAPI --version 2.*

For additional installation methods visit the NuGET package page at here or consult the documentation here

Via Release Package

You can also download the release package from the Releases page or clone the repository directly. To include it in your projects, add the MerchantAPI/MerchantAPI.csproj to your project and configure the framework reference of your target to link to the MerchantAPI framework.

Getting Started

Examples are provided in the Examples/ directory.

SSH Private Key Authentication

Compatible Private Key Formats

  • PKCS#1 PEM Unencrypted
  • PKCS#8 PEM Encrypted or Unencrypted
  • PKCS#12 (pfx) Encrypted or Unencrypted

Create PKCS#1 from OpenSSH private key format

If your private key is in OpenSSH format (starts with -----BEGIN OPENSSH PRIVATE KEY-----) then you will need to convert it.

Create a copy of your key preserving permissions:

cp -p /path/to/private/key/id_rsa /path/to/private/key/id_rsa.pem

Convert in place to the proper format:

ssh-keygen -p -m PEM -f /path/to/private/key/id_rsa.pem

Create PKCS#8 PEM from PKCS#1 PEM private key format

Converting the key with encryption:

 openssl pkcs8 -in /path/to/private_key.pem -topk8 -out /path/to/private_key.pkcs8.pem

Converting the key without encryption:

 openssl pkcs8 -in /path/to/private_key.pem -topk8 -nocrypt -out /path/to/private_key.pkcs8.pem

Create X.509 from OpenSSH private key format

If your private key is in OpenSSH format (starts with -----BEGIN OPENSSH PRIVATE KEY-----) then you will need to convert it.

Create a copy of your key preserving permissions:

cp -p /path/to/private/key/id_rsa /path/to/private/key/id_rsa.pem

Convert in place to the proper format:

ssh-keygen -p -m PEM -f /path/to/private/key/id_rsa.pem

Create a x509 certificate from your private key :

openssl req -new -key /path/to/private/key/id_rsa.pem -out /path/to/private/key/id_rsa.csr

# We need to specify an expiration, but its ignored 
openssl req -key /path/to/private/key/id_rsa.pem -new -x509 -days 365 -out /path/to/private/key/id_rsa.crt

openssl pkcs12 -export -out /path/to/private/key/id_rsa.pfx -inkey /path/to/private/key/id_rsa.pem -in /path/to/private/key/id_rsa_converted.crt

Create X.509 from PKCS#1 PEM private key format

Create a x509 certificate from your private key:

openssl req -new -key /path/to/private/key/id_rsa.pem -out /path/to/private/key/id_rsa.csr

# We need to specify an expiration, but its ignored 
openssl req -key /path/to/private/key/id_rsa.pem -new -x509 -days 365 -out /path/to/private/key/id_rsa.crt

openssl pkcs12 -export -out /path/to/private/key/id_rsa.pfx -inkey /path/to/private/key/id_rsa.pem -in /path/to/private/key/id_rsa_converted.crt

SSH Agent Authentication

Compatible Public Key Formats

Your public key must be in the OpenSSH Public Key format. The default public key format is usually the correct type if you generated your key using ssh-keygen.

See https://tools.ietf.org/html/rfc4253#section-6.6 for format.

A quick way to get the correct format if you have the key associated with your local SSH agent is to run the command ssh-add -L and copying the corresponding key.

License

This library is licensed under the Miva SDK License Agreement.

See the LICENSE.txt file for more information.

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.1
.NET Framework net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

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.0 216 4/8/2022
2.0.2 295 11/1/2021
2.0.1 276 7/15/2021
2.0.0 333 10/26/2020
1.0.1 416 6/24/2020