GithubHelp home page GithubHelp logo

veijar / dx-php Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mercadopago/sdk-php

0.0 0.0 0.0 5.29 MB

Mercado Pago's Official PHP SDK

Home Page: https://developers.mercadopago.com/

License: MIT License

PHP 100.00%

dx-php's Introduction

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.0.0" 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" => "[email protected]"
    );

    $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.

dx-php's People

Contributors

joelibaceta avatar imasson avatar victorgodinho-meli avatar delias-silva avatar fgilio avatar dann95 avatar bachilli avatar ahoulgrave avatar juaniveltri avatar matiasgualino avatar mminestrelli avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.