top of page

Forum Posts

Jarod Dykstra
Velo Certified
Velo Certified
Sep 03, 2021
In Coding with Velo
I have created a custom payment form and for some reason it is throwing an error and not saving when my client in Israel fills it out, however when I fill it out it works fine. Could be a server error or something else I really do not know.
Save operation failed content media
0
8
182
Jarod Dykstra
Velo Certified
Velo Certified
Aug 27, 2021
In Coding with Velo
We have a client that runs a band rental business. They have a super large custom rental form we are building now and I am having an issue building some of the dropdowns. We have a dropdown for the grade of a student and the options they can choose from is determined from which school they choose. In a database we have all of the schools and then the low grade and the highest grade. I built a for loop that seems to work with all numbers under 9 which is super odd. If anyone selects a highschool it does not populate. export function populateGrade (parameter) { wixData.query("Schools") .eq('schoolName', $w("#iptSchool").value) .find() .then(results => { let uniqueList = createUniqueListGrade(results.items); $w("#iptGradeLevel").options = buildOptionsGrade(uniqueList); }) function createUniqueListGrade (items) { let lowGrade = items.map(item => item.lowGrade) let highGrade = items.map(item => item.highGrade) var gradesArray = []; for (let i = lowGrade; i <= highGrade; i++) { gradesArray.push(i.toString()); console.log(gradesArray); } return[...new Set(gradesArray)]; } function buildOptionsGrade (uniqueList) { let uniqueListFinal = uniqueList.map(curr => { return {label:curr, value:curr}; }); uniqueListFinal.push({"label": "Other", "value": "Other"}); return uniqueListFinal; }
0
9
68
Jarod Dykstra
Velo Certified
Velo Certified
May 03, 2021
In Coding with Velo
I created a site that lets customers list a product and then after they submit it makes them pay for a recurring plan and if they do not pay it will delete their listing. However when someone does complete a payment it returns the same thing as if they were to close out of the payment window. Here is the code snippet of the code that runs on this page. let user = wixUsers.currentUser $w.onReady(function () { $w("#dataset1").onReady(()=> { $w("#dataset1").onAfterSave((results)=> { console.log(results); testPayment(results) }) }) function testPayment(results) { const paymentPlan = "11e807fb-8ee2-4df0-966a-769fa55e0d3a" wixPaidPlans.purchasePlan(paymentPlan).then((purchase)=>{ let status = purchase.wixPayStatus let orderId = purchase.wixPayOrderId console.log(status) if (status !== "Successful") { console.log(status) let listingId = results._id wixData.remove("ListedProducts", listingId).then(()=> { console.log("listing failed") }) } else { console.log(status) } }) } Let me know if anyone knows why this issue would be happening. Thanks in advanced for your help.
Wix Payment Plan Returning Cancelled On Payment content media
0
0
14

Jarod Dykstra

Velo Certified
+4
More actions
bottom of page