mercadopago / dx-php
Mercado Pago PHP SDK
Requires
- php: >=7.1.0
- doctrine/annotations: ^1.8
- doctrine/common: ^2.6 || ^3.0
Requires (Dev)
- doctrine/orm: ^2.3
- phpmd/phpmd: @stable
- phpunit/phpunit: ^7
- sebastian/phpcpd: *
- squizlabs/php_codesniffer: 2.8.1
- symfony/yaml: ~2.5
- vlucas/phpdotenv: ^2.5
- dev-master
- 2.6.1
- 2.6.0
- 2.5.5
- 2.5.4
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4.9
- 2.4.8
- 2.4.7
- 2.4.6
- 2.4.5
- 2.4.4
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.0
- 2.2.1
- 2.2.0
- 2.1.1
- 2.1.0
- 2.0.0
- 1.12.5
- 1.12.4
- 1.12.3
- 1.12.2
- 1.12.1
- 1.12.0
- 1.11.0
- 1.10.0
- 1.9.0
- 1.8.1
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.1
- 1.4.0
- 1.3.1
- 1.3.0
- 1.2.7
- 1.2.6
- 1.2.6-beta
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1
- 1.0
- dev-develop-v3
- dev-feature/minor-adjustments
- dev-master-v2
- dev-feature/add-assertsame
- dev-feature/adjust-mapper
- dev-feature/remove-get-cardtoken
- dev-feature/optional-response-fields
- dev-feature/add-readme
- dev-feature/update-workflow-v3
- dev-feature/update-workflow
- dev-feature/add-tracking-headers
- dev-feature/standardization
- dev-feature/mapping-lists
- dev-master-v1
This package is auto-updated.
Last update: 2023-09-29 20:14:02 UTC
README
This library provides developers with a simple set of bindings to help you integrate Mercado Pago API to a website and start receiving payments.
💡 Requirements
PHP 5.6, 7.1 or higher
💻 Installation
First time using Mercado Pago? Create your Mercado Pago account, if you don’t have one already.
-
Download Composer if not already installed
-
On your project directory run on the command line
composer require "mercadopago/dx-php:2.6.1"
for PHP7 orcomposer require "mercadopago/dx-php:1.12.5"
for PHP5.6. -
Copy the access_token in the credentials section of the page and replace YOUR_ACCESS_TOKEN with it.
That's it! Mercado Pago SDK has been successfully installed.
🌟 Getting Started
Simple usage looks like:
<?php require_once 'vendor/autoload.php'; // You have to require the library from your Composer vendor folder MercadoPago\SDK::setAccessToken("YOUR_ACCESS_TOKEN"); // Either Production or SandBox AccessToken $payment = new MercadoPago\Payment(); $payment->transaction_amount = 141; $payment->token = "YOUR_CARD_TOKEN"; $payment->description = "Ergonomic Silk Shirt"; $payment->installments = 1; $payment->payment_method_id = "visa"; $payment->payer = array( "email" => "larue.nienow@email.com" ); $payment->save(); echo $payment->status; ?>
📚 Documentation
Visit our Dev Site for further information regarding:
- Payments APIs: Spanish / Portuguese
- Mercado Pago checkout: Spanish / Portuguese
- Web Tokenize checkout: Spanish / Portuguese
Check our official code reference to explore all available functionalities.
❤️ Support
If you require technical support, please contact our support team at developers.mercadopago.com
🏻 License
MIT license. Copyright (c) 2018 - Mercado Pago / Mercado Libre
For more information, see the LICENSE file.