amz-tool
v12.0.7
Published
A utility for handling Amazon order processing.
Readme
Amazon Order Handler Builder
A utility for handling Amazon order processing.
Installation
Global Installation
To install the tool globally, run the following command:
npm install -g amz-toolYou can then use it via the amz-tool command.
amz-toolLocal Installation
npm install amz-toolUsage in Code
const AmazonOrderHandlerBuilder = require('amz-tool');
const handleAmazonOrder = async ({ email, password, orderId }) => {
try {
const builder = new AmazonOrderHandlerBuilder();
return await builder
.setHeadlessMode(false)
.launchBrowser()
.then(builder => builder.createPage())
.then(builder => builder.setCredentials(email, password))
.then(builder => builder.signIn())
.then(builder => builder.handleCaptcha())
.then(builder => builder.setOrderId(orderId))
.then(builder => builder.processOrders())
.then(builder => builder.closeBrowser());
} catch (e) {
console.error('An error occurred:', e);
process.exit(1);
}
};
handleAmazonOrder({ email: '123', password: "123", orderId: "123" })