Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once "mercadopago.php";
- $mp = new MP ("xxx", "xxx");
- $mp->sandbox_mode(TRUE);
- $params = ["access_token" => $mp->get_access_token()];
- $id=617913514;
- try
- {
- //$payment_info = $mp->get("/collections/notifications/".$id); <-- Esto no funciona
- $merchant_order_info = $mp->get("/merchant_orders/$id", $params, false);
- }
- catch(Exception $e)
- {
- $merchant_order_info = $e->getMessage();
- }
- print_r($merchant_order_info);
- Array
- (
- [status] => 200
- [response] => Array
- (
- [id] => 617913514
- [preference_id] => 141702-78ec13ca-b59d-4de1-a164-a1dab835051e
- [date_created] => 2017-12-11T19:38:17.000-04:00
- [last_updated] => 2017-12-11T19:38:17.000-04:00
- [application_id] =>
- [status] => opened
- [site_id] => MLA
- [payer] =>
- [collector] => Array
- (
- [id] => xxxxx
- [email] => miemail@gmail.com
- [nickname] => DIEGO2K
- )
- [sponsor_id] =>
- [payments] => Array
- (
- )
- [paid_amount] => 0
- [refunded_amount] => 0
- [shipping_cost] => 0
- [cancelled] =>
- [items] => Array
- (
- [0] => Array
- (
- [category_id] => video_games
- [currency_id] => ARS
- [description] =>
- [id] => 5a2ed97fbb61d
- [picture_url] =>
- [quantity] => 1
- [unit_price] => 1046
- [title] => ORDEN DE COMPRA #5a2ed97fbb61d
- )
- )
- [marketplace] => NONE
- [shipments] => Array
- (
- )
- [external_reference] => 5a2ed97fbb61d
- [additional_info] =>
- [notification_url] => http://mipagina.com/ipn
- [total_amount] => 1046
- )
- )
Add Comment
Please, Sign In to add comment