Good morning, I'm starting with MercadoPAgo. I downloaded the SDK, more than a week ago I try to do tests and I can not get anything to work. I ask you if you can give me some basic code or that they tell me after installing the SDK if there is something else to configure. I'm working with PHP 7, xampp for windows.
I need to enable a mutual to charge variable amounts for a single concept, offering the different types of payment. And that once the transaction is completed, it has a receipt. And in case the payment is not credited instantly I do not know how to validate the payment later.
Currently I executed what the page shows as an example ...
"
<?php
require_once ('mercadopago.php');
$mp = new MP('xxxxxxxxxxxxxxx', 'xxxxxxxxxxxx');
$mp->sandbox_mode(TRUE);
$preference_data = array(
"items" => array(
array(
"title" => "Multicolor kite",
"quantity" => 1,
"currency_id" => "ARS", // Available currencies at: https://api.mercadopago.com/currencies
"unit_price" => 10.00
)
)
);
$preference = $mp->create_preference($preference_data);
?>
<!DOCTYPE html>
<html>
<head>
<title>Pay</title>
</head>
<body>
<a href="<?php echo $preference['response']['sandbox_init_point']; ?>">Pay</a>
</body>
</html>"
And it throws me the following result:
Warning: require_once (mercadopago.php): failed to open stream: No such file or directory in C: \ xampp \ htdocs \ payment tests \ index.php on line 2
Fatal error: require_once (): Failed opening required 'mercadopago.php' (include_path = 'C: \ xampp \ php \ PEAR') in C: \ xampp \ htdocs \ paymenttest \ index.php on line 2
Thank you all in advance. Greetings.