MerchantAPI 2.1.0

There is a newer version of this package available.
See the version list below for details.
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 and Polyglot Notebooks. 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 Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.1 is compatible. 
.NET Framework net472 is compatible.  net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
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.5.0 160 8/23/2023
2.4.0 212 3/29/2023
2.3.0 207 3/3/2023
2.2.1 276 1/13/2023
2.2.0 279 1/4/2023
2.1.0 440 4/8/2022
2.0.2 402 11/1/2021
2.0.1 382 7/15/2021
2.0.0 440 10/26/2020
1.0.1 528 6/24/2020