Pagos con MercadoPago

Pagos con MercadoPago

Postby santidedos » Tue Jun 08, 2021 12:41 pm

Buenos días compañeros, estoy llevando adelante un programa contable, y un cliente me pidió que incluya como forma de pago a Mercado Pago. Que datos del pago deberían quedar registrados en mi sistema? Gracias de antemano!
santidedos
 
Posts: 45
Joined: Fri Aug 16, 2019 12:51 am

Re: Pagos con MercadoPago

Postby cmsoft » Tue Jun 08, 2021 7:33 pm

Mercado Pago cada vez que registra un pago, devuelve como información del pago la siguiente información:
Code: Select all  Expand view

{
  "id": 20359978,
  "date_created": "2019-07-10T14:47:58.000Z",
  "date_approved": "2019-07-10T14:47:58.000Z",
  "date_last_updated": "2019-07-10T14:47:58.000Z",
  "money_release_date": "2019-07-24T14:47:58.000Z",
  "issuer_id": 25,
  "payment_method_id": "visa",
  "payment_type_id": "credit_card",
  "status": "approved",
  "status_detail": "accredited",
  "currency_id": "BRL",
  "description": "Point Mini a maquininha que dá o dinheiro de suas vendas na hora",
  "taxes_amount": 0,
  "shipping_amount": 0,
  "collector_id": 448876418,
  "payer": {
    "id": 123,
    "email": "test_user_80507629@testuser.com",
    "identification": {
      "number": 19119119100,
      "type": "CPF"
    },
    "type": "customer"
  },
  "metadata": {},
  "additional_info": {
    "items": [
      {
        "id": "PR0001",
        "title": "Point Mini",
        "description": "Producto Point para cobros con tarjetas mediante bluetooth",
        "picture_url": "https://http2.mlstatic.com/resources/frontend/statics/growth-sellers-landings/device-mlb-point-i_medium@2x.png",
        "category_id": "electronics",
        "quantity": 1,
        "unit_price": 58.8
      }
    ],
    "payer": {
      "registration_date": "2019-01-01T15:01:01.000Z"
    },
    "shipments": {
      "receiver_address": {
        "street_name": "Av das Nacoes Unidas",
        "street_number": 3003,
        "zip_code": 6233200,
        "city_name": "Buzios",
        "state_name": "Rio de Janeiro"
      }
    }
  },
  "order": {},
  "external_reference": "MP0001",
  "transaction_amount": 58.8,
  "transaction_amount_refunded": 0,
  "coupon_amount": 0,
  "transaction_details": {
    "net_received_amount": 56.16,
    "total_paid_amount": 58.8,
    "overpaid_amount": 0,
    "installment_amount": 58.8
  },
  "fee_details": [
    {
      "type": "coupon_fee",
      "amount": 2.64,
      "fee_payer": "payer"
    }
  ],
  "statement_descriptor": "MercadoPago",
  "installments": 1,
  "card": {
    "first_six_digits": 423564,
    "last_four_digits": 5682,
    "expiration_month": 6,
    "expiration_year": 2023,
    "date_created": "2019-07-10T14:47:58.000Z",
    "date_last_updated": "2019-07-10T14:47:58.000Z",
    "cardholder": {
      "name": "APRO",
      "identification": {
        "number": 19119119100,
        "type": "CPF"
      }
    }
  },
  "notification_url": "https://www.suaurl.com/notificacoes/",
  "processing_mode": "aggregator",
  "point_of_interaction": {
    "type": "PIX",
    "application_data": {
      "name": "NAME_SDK",
      "version": "VERSION_NUMBER"
    },
    "transaction_data": {
      "qr_code_base64": "iVBORw0KGgoAAAANSUhEUgAABRQAAAUUCAYAAACu5p7oAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAIABJREFUeJzs2luO3LiWQNFmI+Y/Zd6vRt36KGNXi7ZOBtcagHD4kNLeiLX33v8DAAAAABD879sDAAAAAAA/h6AIAAAAAGSCIgAAAACQCYoAAAAAQCYoAgAAAACZoAgAAAAAZIIiAAAAAJAJigAAAABAJigCAAAAAJmgCAAAAABkgiIAAAAAkAmKAAAAAEAmKAIAAAAAmaAIAAAAAGSCIgAAAACQCYoAAAAAQCYoAgAAAACZoAgAAAAAZIIiAAAAAJAJigAAAABAJigCA...",
      "qr_code": "00020126600014br.gov.bcb.pix0117test@testuser.com0217dados adicionais520400005303986540510.005802BR5913Maria Silva6008Brasilia62070503***6304E2CA"
    }
  }
}
 

Podes consultar esta info en la Api de Mercadopago
https://www.mercadopago.com.ar/developers/es/reference/payments/_payments/post
De ahi tendrías que ver que info te sirve para registrar en tu sistema.
Yo creo que con registrar el ID de la operación, el resto luego se consulta en la plataforma de Mercado Pago
Espero que te sea de utilidad
User avatar
cmsoft
 
Posts: 1283
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina

Re: Pagos con MercadoPago

Postby santidedos » Thu Jun 10, 2021 10:21 pm

Muchas gracias, saludos!
santidedos
 
Posts: 45
Joined: Fri Aug 16, 2019 12:51 am


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 34 guests