llega a pasarelas de pago

This commit is contained in:
Jaume Solís 2024-04-18 16:11:24 +02:00
parent 8b6d913cd7
commit 56e3baa656
1 changed files with 4 additions and 2 deletions

View File

@ -26,7 +26,7 @@ class PaymentServices {
}
let priceIntial = 0
let price = productsFilter.reduce((accumulator, curValue) => accumulator + Number(curValue.price), priceIntial)
let price = productsFilter[0][0].reduce((accumulator, curValue) => accumulator + Number(curValue.price), priceIntial)
let productsIds = ''
for (let i = 0; i < products.length; i++) {
@ -45,7 +45,9 @@ class PaymentServices {
})
const order = await db.orderData_put(jsonOrderData);
//const orderFk = order[0][0].catalogueFk;
const orderFk = jsonOrderData.customer.customerData.products[0].id;
//const orderFk = jsonOrderData.customer.customerData.products[0].id;
const orderFk = productsFilter[0][0][0].id;
console.log(`${orderFk} ${price}` )
if (type === "paypal") {
const data = await payPalProviders.New(orderFk, price)