Security News
NVD Backlog Tops 20,000 CVEs Awaiting Analysis as NIST Prepares System Updates
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
latam_payment
Advanced tools
Library to handle payment providers. At the moment, the library handles PayU and Stripe.
var latam_payment = require('latam_payment');
var type = 'payu';
var data = {
email: 'some_email@test.com',
metadata: {
id: 'user id 1',
first_name: 'John',
last_name: 'Doe',
country: 'COL',
city: 'BOG'
},
description: `Customer for some_email@test.com`,
card: '<payu token>',
user_token: null,
security: {
url: 'https://sandbox.api.payulatam.com/payments-api/4.0/service.token',
api_login: 'pRRXKOl8ikMmt9u',
api_key: '4Vj8eK4rloUd272L48hsrarnUA'
}
};
latam_payment.register(type, data, function(err, card){
// do something with card
});
var type = 'stripe';
var data = {
email: 'some_email@test.com',
metadata: {
id: 'user id 1',
first_name: 'John',
last_name: 'Doe',
country: 'MEX',
city: 'MEX'
},
description: `Customer for some_email@test.com`,
card: '<stripe token>',
user_token: '<customer stripe token (if exists)>',
security: {
api_key: '<stripe api key>',
}
};
latam_payment.register(type, data, function(err, card){
// do something with card
});
{
"token": "<card token>",
"last4": "1234",
"cardType": "VISA",
"maskedNumber": "****1234",
"uniqueNumberIdentifier": "jkaslgjdakl328975",
"customer": "<stripe user token (null for PayU)>|null",
"country": "MEX|COL|ARG",
"type": "payu|stripe",
"csv": "123|null"
}
##Checkout ####PayU checkout example
var type = 'payu';
var data = {
email: 'test@email.com',
payment: {
internal_reference: 'ABC12398',
amount: 500,
source: {
user: null,
card: 'f064b5d0-2fbb-43df-b54f-ab92a3796a5c'
},
cvc: '123', //optional for Colombia
card_type: 'VISA',
mode: 'AUTHORIZATION' //Colombia only accepts 'AUTHORIZATION_AND_CAPTURE'; if not present, defaults to 'AUTHORIZATION_AND_CAPTURE'
},
metadata: {
id: '123456789',// user id
first_name: 'John',
last_name: 'Doe',
phone: '123456789',
country: 'ARG',
city: 'BNA'
},
address: {
line1: 'Avenida entre rios 256',
country: 'ARG',
city: 'BNA'
},
security: {
url: 'https://sandbox.api.payulatam.com/payments-api/4.0/service.cgi',
account_id: '512322',
merchant_id: '508029',
api_key: '4Vj8eK4rloUd272L48hsrarnUA',
api_login: 'pRRXKOl8ikMmt9u',
ip: '127.0.0.1',
device_session_id: 'vghs6tvkcle931686k1900o6e1',
user_agent: 'Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0'
}
};
latam_payment.checkout(type, data, function(err, transaction){
// do something with transaction
});
####Stripe checkout example
var type = 'stripe';
var data = {
email: 'test@email.com',
payment: {
internal_reference: 'ABC12398',
amount: 500,
source: {
user: 'cus_jkds78392ufdsa78',
card: 'card_jdk789236fdjk39'
},
mode: 'capture' // if equal to 'capture', sets capture=true; else, sets capture=false
},
metadata: {
id: '123456789',// user id
first_name: 'John',
last_name: 'Doe',
phone: '123456789',
country: 'ARG',
city: 'BNA'
},
address: {
line1: 'Avenida entre rios 256',
country: 'ARG',
city: 'BNA'
},
security: {
api_key: '<stripe api key>',
}
};
latam_payment.checkout(type, data, function(err, transaction){
// do something with transaction
});
{
"success": true,
"error": null,
"body": {
"transaction": "<transaction id>",
"status": "paid|authorized"
}
}
FAQs
Payment module for latam
The npm package latam_payment receives a total of 1 weekly downloads. As such, latam_payment popularity was classified as not popular.
We found that latam_payment demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.