Closed tnolet closed 7 years ago
Hi the second parameter in the error catch will give you more detailed information:
moltin.Authenticate(() => {
console.info('authenticated with moltin')
moltin.Product.Find({SKU: 'TOTO10'},(products) => {
console.info(products)
moltin.Cart.Insert(products[0].id, 1,null,(item)=>{
console.info(item)
moltin.Cart.Contents((items) => {
console.info(items)
})
},(err, errorMessage) =>{
console.error(errorMessage);
})
})
;```
Hi,
I'm trying to follow the tutorial in the Readme. When adding my product to the cart, I get an error callback with the string "error". The authentication and finding of the product work fine. This is my code (credential left out):
Here's the output when I run it: