Skip to content

Instantly share code, notes, and snippets.

@julianclatro
Created April 22, 2020 17:27
Show Gist options
  • Save julianclatro/2816b83133f8a5e90739c3b51a367b3e to your computer and use it in GitHub Desktop.
Save julianclatro/2816b83133f8a5e90739c3b51a367b3e to your computer and use it in GitHub Desktop.
MercadoPago Marketplace
token = params[:token]
require 'mercadopago'
mp = MercadoPago.new(vendor_access_token)
payment_data = {
"token": token,
"installments":1,
"transaction_amount": 0.3,
"description":"Test de producto",
"payment_method_id":"visa",
"application_fee": 0.1,
"payer":{
"email":"[email protected]"
},
"notification_url":"https://www.suaurl.com/notificacoes/",
"binary_mode":false,
"external_reference":"CAN00016980",
"statement_descriptor":"MercadoPago",
"additional_info":{
"payer":{
"first_name":"APRO"
}
}
}
@response = mp.genericcall.post("/v1/payments", payment_data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment