This is what I have in the back end
import wixPay from “wix-pay-backend”;
export function cratepaymentforproduct (q, n) {
return wixPay.createPayment({
items: [{name: n, price: 30, quatity: q}],
amount: 30*q
});
};
This is the code on the page for the payment button
export function button1_click(event)
{
cratepaymentforproduct($w(“#input3”).value,$w(“#text37”).text).then(payment=> [{]({
wixPay.startPayment(payment.id);
});
})
[wixPay.startPayment(payment.id);]({
wixPay.startPayment(payment.id);
});
})
[});]({
wixPay.startPayment(payment.id);
});
})
[}]({
wixPay.startPayment(payment.id);
});
})
This is the error that is occurring
-
WixPayBackend.createPayment: Total amount should be the sum of the item amounts
-
WixPayBackend.createPayment: can’t create payment, details: Total amount should be the sum of the item amounts
Is there any way around this? or should we consider some other platform?