Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
stripe-pdf-invoice
Advanced tools
Install the wkhtmltopdf executable
npm install stripe-pdf-invoice
const invoice_id = 'invoice_id';
const stripe_key = 'stripe_key';
const fs = require('fs');
const path = require('path');
const stripepdfinvoice = require('./index')(stripe_key, {
company_name: 'Trusk',
company_address: '14 rue Charles V',
company_zipcode: '75004',
company_city: 'Paris',
company_country: 'France',
company_siret: '146-458-246',
company_vat_number: '568-3587-345',
company_logo: path.resolve("./batman.jpg"),
color: '#2C75FF',
});
stripepdfinvoice(invoice_id, {
client_company_name: 'My Company',
client_company_address: '1 infinite Loop',
client_company_zipcode: '95014',
client_company_city: 'Cupertino, CA',
client_company_country: 'USA',
receipt_number: 'ER56T67'
})
.then(stream => {
stream.pipe(fs.createWriteStream('./invoice.pdf'));
stream.on('end', () => {
console.log('done');
});
stream.on('error', (error) => {
console.log(error);
});
});
const invoice_id = 'invoice_id';
const stripe_key = 'stripe_key';
const express = require('express');
const fs = require('fs');
const path = require('path');
const app = express();
const stripepdfinvoice = require('./index')(stripe_key, {
company_name: 'Trusk',
company_address: '14 rue Charles V',
company_zipcode: '75004',
company_city: 'Paris',
company_country: 'France',
company_siret: '146-458-246',
company_vat_number: '568-3587-345',
company_logo: path.resolve("./batman.jpg"),
color: '#2C75FF',
});
app.get('/', function(req, res) {
res.set('content-type', 'application/pdf; charset=utf-8');
stripepdfinvoice(invoice_id, {
client_company_name: 'My Company',
client_company_address: '1 infinite Loop',
client_company_zipcode: '95014',
client_company_city: 'Cupertino, CA',
client_company_country: 'USA',
receipt_number: 'ER56T67'
})
.then(stream => {
//Force download
//res.set('Content-Disposition', 'attachment; filename=invoice.pdf');
stream.pipe(res);
});
});
app.listen(3000);
number (Number)
currency_position_before (Bool)
currency_symbol (String)
date_format (String)
due_days (Number)
color (Number)
company_name (String)
company_logo (String)
company_address (String)
company_zipcode (String)
company_city (String)
company_country (String)
company_siret (String)
company_vat_number (String)
client_company_name (String)
client_company_address (String)
client_company_zipcode (String)
client_company_city (String)
client_company_country (String)
label_invoice (String)
label_invoice_to (String)
label_invoice_by (String)
label_due_on (String)
label_invoice_for (String)
label_description (String)
label_unit (String)
label_price (String)
label_amount (String)
label_subtotal (String)
label_total (String)
label_vat (String)
label_invoice_by (String)
label_invoice_date (String)
label_company_siret (String)
label_company_vat_number (String)
label_invoice_number (String)
label_reference_number (String)
label_invoice_due_date (String)
FAQs
Stripe PDF invoice generator
The npm package stripe-pdf-invoice receives a total of 29 weekly downloads. As such, stripe-pdf-invoice popularity was classified as not popular.
We found that stripe-pdf-invoice demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.