Removed calculating the total to let paypal handle it

This commit is contained in:
Zakary Timson 2018-07-23 12:09:56 -04:00
parent 7c9e272a86
commit a7544b1099

View File

@ -47,9 +47,6 @@ export const checkout = functions.https.onRequest((request, response) => {
const data = row.data();
return {name: data.name, sku: data.name, price: data.price, currency: data.currency, quantity: cart[i].quantity};
});
req.transactions[0].amount.total = req.transactions[0].item_list.items.reduce((acc, row, i) => {
return acc + row.price * row.quantity;
}, 0);
console.info(req);