MercadoPago SDK module for Payments integration
Usage:
$ npm install mercadopago
- Get your CLIENT_ID and CLIENT_SECRET in the following address:
var MP = ; var mp = "CLIENT_ID" "CLIENT_SECRET";
Get your Access Token:
mp;
Using MercadoPago Checkout
Create a Checkout preference:
var preference = "items": "title": "Test" "quantity": 1 "currency_id": "USD" "unit_price": 105 ; mp;
Get an existent Checkout preference:
mp;
Update an existent Checkout preference:
var preference = "items": "title": "Test Modified" "quantity": 1 "currency_id": "USD" "unit_price": 204 ; mp;
Using MercadoPago Payment
Searching:
var filters = "id": null "site_id": null "external_reference": null ; mp;
Receiving IPN notification:
- Go to Mercadopago IPN configuration:
var MP = http = url = ; var mp = "CLIENT_ID" "CLIENT_SECRET"; { var qs = urlquery; mp;} http;
Cancel (only for pending payments):
mp;
Refund (only for accredited payments):
mp;