<?php

namespace App\Http\Controllers\Frontend;
use App\Http\Requests;
use App\Http\Controllers\Controller;

use Illuminate\Http\Request;

use MP;


class MercadoPagoController extends Controller
{
    public function getCreatePreference()
    {
        $preferenceData = [
            'items' => [
                [
                    'id' => 12,
                    'category_id' => 'phones',
                    'title' => 'iPhone 4',
                    'description' => 'iPhone 4 64gb',
                    'picture_url' => 'https://images.memphistours.com/large/683845636_4779bae3fe1c8e8f4e6299cca96df069.jpg',
                    'quantity' => 1,
                    'currency_id' => 'USD',
                    'unit_price' => 10
                ]
            ],
        ];

        $preference = MP::create_preference($preferenceData);

        return dd($preference);

    }
}