MerchantAPI 2.7.0
dotnet add package MerchantAPI --version 2.7.0
NuGet\Install-Package MerchantAPI -Version 2.7.0
<PackageReference Include="MerchantAPI" Version="2.7.0" />
<PackageVersion Include="MerchantAPI" Version="2.7.0" />
<PackageReference Include="MerchantAPI" />
paket add MerchantAPI --version 2.7.0
#r "nuget: MerchantAPI, 2.7.0"
#addin nuget:?package=MerchantAPI&version=2.7.0
#tool nuget:?package=MerchantAPI&version=2.7.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 9.0
- .NET 8.0
- .NET 7.0
- .NET 6.0
- .NET Framework 4.8
- .NET Framework 4.7.2
- 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.
High Precision Pricing & Weight
Miva Merchant 10.11 added support for high precision pricing and weight. To support these changes, all supported fields are now Decimal type. Transition should be seamless, and you can perform arithmetic against these values as you would native floats or doubles.
License
This library is licensed under the Miva SDK License Agreement
.
See the LICENSE.txt
file for more information.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. 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 is compatible. 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 is compatible. 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. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.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. |
-
.NETFramework 4.7.2
- Microsoft.CSharp (>= 4.7.0)
- System.Net.Http (>= 4.3.4)
- System.Net.Sockets (>= 4.3.0)
- System.Runtime.Serialization.Json (>= 4.3.0)
- System.Text.Json (>= 8.0.5)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETFramework 4.8
- Microsoft.CSharp (>= 4.7.0)
- System.Net.Http (>= 4.3.4)
- System.Net.Sockets (>= 4.3.0)
- System.Runtime.Serialization.Json (>= 4.3.0)
- System.Text.Json (>= 8.0.5)
- System.Text.RegularExpressions (>= 4.3.1)
-
.NETStandard 2.1
- Microsoft.CSharp (>= 4.7.0)
- System.Net.Http (>= 4.3.4)
- System.Net.Sockets (>= 4.3.0)
- System.Runtime.Serialization.Json (>= 4.3.0)
- System.Text.Json (>= 8.0.5)
- System.Text.RegularExpressions (>= 4.3.1)
-
net6.0
- Microsoft.CSharp (>= 4.7.0)
- System.Net.Http (>= 4.3.4)
- System.Net.Sockets (>= 4.3.0)
- System.Runtime.Serialization.Json (>= 4.3.0)
- System.Text.Json (>= 8.0.5)
- System.Text.RegularExpressions (>= 4.3.1)
-
net7.0
- Microsoft.CSharp (>= 4.7.0)
- System.Net.Http (>= 4.3.4)
- System.Net.Sockets (>= 4.3.0)
- System.Runtime.Serialization.Json (>= 4.3.0)
- System.Text.Json (>= 8.0.5)
- System.Text.RegularExpressions (>= 4.3.1)
-
net8.0
- Microsoft.CSharp (>= 4.7.0)
- System.Net.Http (>= 4.3.4)
- System.Net.Sockets (>= 4.3.0)
- System.Runtime.Serialization.Json (>= 4.3.0)
- System.Text.Json (>= 9.0.0)
- System.Text.RegularExpressions (>= 4.3.1)
-
net9.0
- Microsoft.CSharp (>= 4.7.0)
- System.Net.Http (>= 4.3.4)
- System.Net.Sockets (>= 4.3.0)
- System.Runtime.Serialization.Json (>= 4.3.0)
- System.Text.Json (>= 9.0.0)
- System.Text.RegularExpressions (>= 4.3.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.