Skip to content

armandohg/dx-php

This branch is 1 commit ahead of, 354 commits behind mercadopago/sdk-php:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

80a2546 Β· Nov 18, 2020
Jun 24, 2020
Jun 25, 2020
Mar 11, 2019
Apr 8, 2019
Oct 29, 2020
Aug 5, 2020
Sep 5, 2018
Dec 18, 2018
Jun 13, 2018
Sep 17, 2020
Nov 18, 2020
Jun 25, 2020
Sep 5, 2018
Jun 6, 2017

Repository files navigation

Mercado Pago SDK for PHP

Latest Stable Version Total Downloads License

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.

  1. Download Composer if not already installed

  2. On your project directory run on the command line composer require "mercadopago/dx-php:2.1.1" for PHP7 or composer require "mercadopago/dx-php:1.8.1" for PHP5.6.

  3. 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:

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.

About

Mercado Pago's Official PHP SDK

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%