-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #230 from mercadopago/master
Update from master
- Loading branch information
Showing
58 changed files
with
1,962 additions
and
694 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
|
||
--- | ||
|
||
> For support request no related with bugs or feature requests for this SDK, please use the official developers support channel https://mercadopago.com.ar/developers/es/support/ | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Using this snippet '....' | ||
3. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Server (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- WebServer | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,6 @@ nbproject | |
/composer.lock | ||
|
||
#Samples Vendor | ||
/samples/vendor | ||
/samples/vendor | ||
|
||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
language: php | ||
php: | ||
- "5.3" | ||
- "5.5" | ||
- "5.6" | ||
- "7.0" | ||
- "7.1" | ||
- "7.2" | ||
|
||
before_script: | ||
- composer self-update | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2018 MercadoPago Developers | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,24 @@ | ||
# Mercado Pago SDK for PHP | ||
|
||
[![Build Status](https://travis-ci.org/imasson/px-php.png)](https://travis-ci.org/imasson/px-php) | ||
[![Coverage Status](https://coveralls.io/repos/github/imasson/px-php/badge.svg?branch=feature-ci-configuration-restclient)](https://coveralls.io/github/imasson/px-php?branch=feature-ci-configuration-restclient) | ||
[![Build Status](https://travis-ci.org/mercadopago/dx-php.png)](https://travis-ci.org/mercadopago/dx-php) | ||
|
||
This library provides developers with a simple set of bindings to the Mercado Pago API. | ||
|
||
### PHP Versions Supported: | ||
|
||
The SDK supports PHP 5 or major | ||
The SDK supports PHP 5.6 or major | ||
|
||
### Installation | ||
|
||
#### Using Composer | ||
|
||
1. Download [Composer](https://getcomposer.org/download/) if not already installed | ||
2. Go to your project directory and Execute `composer require "mercadopago/px-php"` on the command line. | ||
1. Download [Composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos) if not already installed | ||
2. Go to your project directory and run `composer require "mercadopago/dx-php:1.2.1"` on the command line. | ||
3. This how your directory structure would look like. | ||
|
||
![screen shot 2017-12-27 at 5 25 43 pm](https://user-images.githubusercontent.com/864790/34393031-6c1068a4-eb2e-11e7-933a-81a47ba7b727.png) | ||
|
||
4. Thats all, you have Mercado Pago SDK installed. | ||
|
||
![installation-demo](img/ezgif-2-f98e8701825e.gif) | ||
|
||
### Quick Start | ||
|
||
1. You have to require the library from your Composer vendor folder. | ||
|
@@ -33,19 +31,18 @@ The SDK supports PHP 5 or major | |
|
||
You have two types of credentials: | ||
|
||
* **For web-checkout:** | ||
* **For API or custom checkout:** | ||
```php | ||
MercadoPago\SDK::setAccessToken("YOUR_ACCESS_TOKEN"); // On Production | ||
MercadoPago\SDK::setAccessToken("YOUR_TEST_ACCESS_TOKEN"); // On Sandbox | ||
``` | ||
|
||
* **For API or custom checkout:** | ||
* **For Web-checkout:** | ||
```php | ||
MercadoPago\SDK::setClientId("YOUR_CLIENT_ID"); | ||
MercadoPago\SDK::setClientSecret("YOUR_CLIENT_SECRET"); | ||
``` | ||
|
||
3. Use the resource objects. | ||
3. Using resource objects. | ||
|
||
You can interact with all the resources available in the public API, to this each resource is represented by classes according to the following diagram: | ||
|
||
|
@@ -56,7 +53,7 @@ The SDK supports PHP 5 or major | |
```php | ||
<?php | ||
|
||
require_once 'vendor/autoload.php'; | ||
require __DIR__ . '/vendor/autoload.php'; | ||
|
||
MercadoPago\SDK::setAccessToken("YOUR_ACCESS_TOKEN"); | ||
|
||
|
@@ -70,14 +67,12 @@ The SDK supports PHP 5 or major | |
$payment->payer = array( | ||
"email" => "[email protected]" | ||
); | ||
|
||
$payment->save(); | ||
|
||
|
||
echo $payment->status; | ||
|
||
?> | ||
``` | ||
|
||
### Support | ||
|
||
Write us at developers@mercadopago.com | ||
Write us at [developers.mercadopago.com](https://developers.mercadopago.com) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
require_once dirname(__FILE__).'/../../index.php'; | ||
|
||
$config->set('ACCESS_TOKEN', 'TEST-6295877106812064-042916-6cead5bc1e48af95ea61cc9254595865__LC_LA__-202809963'); | ||
$config->set('ACCESS_TOKEN', 'ACCESS_TOKEN'); | ||
|
||
$customer = new MercadoPago\Customer(); | ||
$customer->email = "[email protected]"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.