
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
This library provides developers with a simple set of bindings to help you integrate Mercado Pago API to a website and start receiving payments.
Python 3 or higher.
Run pip3 install mercadopago
First time using Mercado Pago? Create your Mercado Pago account.
Copy your Access Token
in the credentials panel and replace the text YOUR_ACCESS_TOKEN
with it.
import mercadopago
sdk = mercadopago.SDK("YOUR_ACCESS_TOKEN")
request_options = mercadopago.config.RequestOptions()
request_options.custom_headers = {
'x-idempotency-key': '<SOME_UNIQUE_VALUE>'
}
payment_data = {
"transaction_amount": 100,
"token": "CARD_TOKEN",
"description": "Payment description",
"payment_method_id": 'visa',
"installments": 1,
"payer": {
"email": 'test_user_123456@testuser.com'
}
}
result = sdk.payment().create(payment_data, request_options)
payment = result["response"]
print(payment)
All methods that make API calls accept an optional RequestOptions
object. This can be used to configure some special options of the request, such as changing credentials or custom headers.
import mercadopago
from mercadopago.config import RequestOptions
request_options = RequestOptions(access_token='YOUR_ACCESS_TOKEN')
# ...
result = sdk.payment().create(payment_data, request_options)
payment = result["response"]
Visit our Dev Site for further information regarding:
Check our official code reference to explore all available functionalities.
All contributions are welcome, ranging from people wanting to triage issues, others wanting to write documentation, to people wanting to contribute code.
Please read and follow our contribution guidelines. Contributions not following this guidelines will be disregarded. The guidelines are in place to make all of our lives easier and make contribution a consistent process for everyone.
If you require technical support, please contact our support team at developers.mercadopago.com.
MIT license. Copyright (c) 2021 - Mercado Pago / Mercado Libre
For more information, see the LICENSE file.
FAQs
Mercadopago SDK module for Payments integration
We found that mercadopago demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.