MercadoPago SDK
An open source, strongly-typed SDK for the MercadoPago API.
The library is still under development and its public API is subject to change. Project is licensed under the permissive MIT license.
Usage
The client is built using the
MercadoPagoSDKBuilder::with_token
with_token
method.
use ;
let mp_sdk: MercadoPagoSDK = with_token;
Once the token is inserted, you can call methods on [crate::MercadoPagoSDK
]
Creating a CheckoutPro Preference
use ;
use DocumentType;
use CheckoutProPreferences;
use MercadoPagoSDKBuilder;
let mp_sdk = with_token;
let sample_item =
minimal_item.unwrap;
let preferences = new
.set_items
.set_payer;
mp_sdk
.create_preferences_checkout_pro
.expect
.execute
.await
.unwrap;
Other Examples
Check out the tests
folder inside our repository to check for more examples.