mercadopago-sdk
1.2.1
See the version list below for details.
dotnet add package mercadopago-sdk --version 1.2.1
NuGet\Install-Package mercadopago-sdk -Version 1.2.1
<PackageReference Include="mercadopago-sdk" Version="1.2.1" />
paket add mercadopago-sdk --version 1.2.1
#r "nuget: mercadopago-sdk, 1.2.1"
// Install mercadopago-sdk as a Cake Addin #addin nuget:?package=mercadopago-sdk&version=1.2.1 // Install mercadopago-sdk as a Cake Tool #tool nuget:?package=mercadopago-sdk&version=1.2.1
Mercado Pago SDK for .Net
This library provides developers with a simple set of bindings to the Mercado Pago API.
.Net versions supported:
3.5 .Net Framework or Major
Installation
Using our nuget package
Using Package Manager
PM> Install-Package mercadopago-sdk -Version 1.1.0
Using .Net CLI
> dotnet add package mercadopago-sdk --version 1.1.0
Using Packet CLI
> paket add mercadopago-sdk --version 1.1.0
Quick Start
1. You have to import the Mercado Pago SDK.
using MercadoPago;
2. Setup your credentials
For Web-checkout:
MercadoPago.SDK.ClientId = "YOUR_CLIENT_ID";
MercadoPago.SDK.ClientSecret = "YOUR_CLIENT_SECRET";
For API or custom checkout:
MercadoPago.SDK.AccessToken = "YOUR_ACCESS_TOKEN";
3. Using resource objects
You can interact with all the resources available in the public API, to this each resource is represented by classes according to the following diagram:
Sample (Creating a Payment)
using MercadoPago;
using MercadoPago.Resources;
using MercadoPago.DataStructures.Payment;
using MercadoPago.Common;
MercadoPago.SDK.ClientSecret = "YOUR_ACCESS_TOKEN";
Payment payment = new Payment
{
TransactionAmount = (float)100.0,
Token = "YOUR_CARD_TOKEN"
Description = "Ergonomic Silk Shirt",
PaymentMethodId = "visa",
Installments = 1,
Payer = new Payer {
Email = "larue.nienow@hotmail.com"
}
};
payment.Save();
Console.Out.WriteLine(payment.Status);
4. Handling Errors
Error response structure
You can check the errors and causes returned by the API using the errors
attribute.
Console.Out.WriteLine(payment.Errors.Message) // Print the error Message
Support
Write us at developers.mercadopago.com
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net35 is compatible. net40 was computed. net403 was computed. net45 was computed. 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. |
-
.NETFramework 3.5
- Newtonsoft.Json (>= 9.0.1)
- NUnit (>= 3.10.1)
- ObjectDumper (>= 1.0.0.12)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on mercadopago-sdk:
Package | Downloads |
---|---|
SabioGo_BE
BackEnd Sabio GO |
|
FenixAlliance.ABS.Integrations.MercadoLibre
Application Component for the Alliance Business Suite. |
|
FenixAlliance.ABS.Integrations.MP
Application Component for the Alliance Business Suite. |
|
MercadoPago.Extensions.Microsoft.DependencyInjection
This project is an extension of the MercadoPago SDK, it configures the injection of dependencies for projects that require it. |
|
FenixAlliance.ABS.integrations.MercadoPago
Application Component for the Alliance Business Suite. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.4.1 | 4,431 | 9/3/2024 |
2.4.0 | 2,209 | 8/1/2024 |
2.3.8 | 20,918 | 3/21/2024 |
2.3.7 | 2,266 | 3/12/2024 |
2.3.6 | 1,790 | 2/22/2024 |
2.3.5 | 13,048 | 11/30/2023 |
2.3.4 | 4,240 | 10/31/2023 |
2.3.3 | 13,108 | 8/15/2023 |
2.3.2 | 14,019 | 5/30/2023 |
2.3.1 | 903 | 5/23/2023 |
2.2.3 | 35,129 | 11/30/2022 |
2.2.2 | 22,537 | 8/16/2022 |
2.2.1 | 5,104 | 7/7/2022 |
2.2.0 | 31,873 | 3/24/2022 |
2.1.0 | 27,474 | 1/5/2022 |
2.0.0 | 76,290 | 3/24/2021 |
1.11.2 | 1,289 | 7/8/2022 |
1.11.1 | 1,042 | 3/30/2022 |
1.10.2 | 1,472 | 3/29/2021 |
1.10.1 | 1,895 | 3/12/2021 |
1.10.0 | 1,661 | 3/4/2021 |
1.9.1 | 4,072 | 2/17/2021 |
1.9.0 | 4,806 | 10/29/2020 |
1.8.1 | 4,134 | 8/12/2020 |
1.8.0 | 3,397 | 7/1/2020 |
1.7.0 | 12,843 | 5/4/2020 |
1.6.1 | 18,020 | 3/3/2020 |
1.5.0 | 1,678 | 1/21/2020 |
1.4.0 | 1,276 | 1/2/2020 |
1.3.0 | 1,269 | 12/16/2019 |
1.2.2 | 1,328 | 11/19/2019 |
1.2.1 | 1,301 | 11/5/2019 |
1.2.0 | 3,392 | 9/18/2019 |
1.1.0 | 1,413 | 9/3/2019 |
1.0.57 | 16,393 | 6/27/2019 |
1.0.56 | 12,270 | 5/14/2019 |
1.0.54 | 3,333 | 1/9/2019 |
1.0.53 | 1,321 | 1/2/2019 |
1.0.52 | 1,327 | 12/18/2018 |
1.0.51 | 5,527 | 12/13/2018 |
1.0.50 | 1,364 | 12/7/2018 |
1.0.49 | 1,321 | 12/3/2018 |
1.0.48 | 3,676 | 11/16/2018 |
1.0.45 | 1,297 | 11/8/2018 |
1.0.44 | 1,339 | 10/31/2018 |
1.0.42 | 1,327 | 10/26/2018 |
1.0.41 | 1,418 | 10/18/2018 |
1.0.40 | 1,392 | 10/17/2018 |
1.0.34 | 3,089 | 8/14/2018 |
1.0.29 | 1,832 | 6/21/2018 |
1.0.25 | 1,804 | 4/25/2018 |
1.0.24 | 3,208 | 3/23/2018 |
- Se agrega soporte a customización de IVA en Colombia.