Created
April 22, 2020 17:27
-
-
Save julianclatro/2816b83133f8a5e90739c3b51a367b3e to your computer and use it in GitHub Desktop.
MercadoPago Marketplace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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