PHP code example of liveecommerce / dx-php
1. Go to this page and download the library: Download liveecommerce/dx-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
liveecommerce / dx-php example snippets
MercadoPago\SDK::setAccessToken("YOUR_ACCESS_TOKEN"); // On Production
MercadoPago\SDK::setAccessToken("YOUR_TEST_ACCESS_TOKEN"); // On Sandbox
MercadoPago\SDK::setClientId("YOUR_CLIENT_ID");
MercadoPago\SDK::setClientSecret("YOUR_CLIENT_SECRET");
go\SDK::setAccessToken("YOUR_ACCESS_TOKEN");
$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]"
);
echo $payment->status;