Question:
Have the current backend code, I do however know that the createPayment function can only accept strings and not arrays for multiple items. I want to allow people to purchase more than one package?
How would I go about doing this without asking the user to pay for each item?
export const createMyPayment = webMethod(Permissions.Anyone, async (productId, quantity) => { return wixData.get("productCollection", productId) .then( (product) => { return wixPayBackend.createPayment( { items: [{ name: product.name, price: product.price, quantity: quantity }], amount: product.price * quantity } ); } ); });
Product:
Which editor or feature is your question most relevant to?
Wix Editor
I also cant make use of the wix booking system as I just want a increment value with no real item sold. Its just a increment of which my tutors can see how many lessons the parent has. Please dont tell me to use wix bookings.