Hi guys,
I’ve created a paid booking service (type is multiple-participant, course) for online payment with 100 max participants. When I use the scheduler control, I can book and pay for the service without any problem. However when I use checkoutBooking on Corvid, I’m getting a {code: 500, message: “BOOKINGS_SYSTEM_ERROR”} and I can not get to the payment form.
Below is the code as well as the bookingInfo object printout, any idea what is wrong?
FYI: already read all docs, including https://www.wix.com/corvid/reference/wix-bookings.html#checkoutBooking and https://support.wix.com/en/article/corvid-tutorial-creating-a-custom-bookings-experience .
Thanks!!
export function button6_click(event) {
const dataset = $w(“#dynamicDataset”);
const serviceId = dataset.getCurrentItem()._id
let formFieldValues = [
{"_id": "00000000-0000-0000-0000-000000000001", "value": "My name"},
{"_id": "00000000-0000-0000-0000-000000000002", "value": "me2@gmail.com"},
{"_id": "00000000-0000-0000-0000-000000000003", "value": "8001234567"},
];
wixBookings.getServiceAvailability(serviceId)
.then( (availability) => {
let bookingInfo = {
"slot": availability.slots[0],
"formFields": formFieldValues
};
let options = {
"paymentType": "wixPay_Online" ,
"couponCode": ""
}
// booking checkout
wixBookings.checkoutBooking(bookingInfo, options)
.then( (results) => {
console.log(results.status)
} ).catch( (err) => {
console.log(err);
} );
} ).catch( (err) => {
console.log(err);
} );
}
BookingInfo:
{
“slot”: {
“_id”: “lVpmmjufa1ayxC3FfTkdBB123Oo7YzvW3MJDTA63cZoiHebfXgEEBerzKxSh2jmsai8ZfIEHV74V12FJzEo1rzLU1SkKywStre4rSh”,
“startDateTime”: “2019-12-03T02:30:00.000Z”,
“endDateTime”: “2019-12-31T05:00:00.000Z”,
“serviceId”: “1212a0a1-2544-188d-b031-695884ad8bb3”,
“capacity”: 100,
“remainingSpots”: 99,
“staffMemberId”: “be99Ac6d-19ba-4234-9d86-38d41233373b”
},
“formFields”: [
{
“_id”: “00000000-0000-0000-0000-000000000001”,
“value”: “My name”
},
{
“_id”: “00000000-0000-0000-0000-000000000002”,
“value”: “me@gmail.com”
},
{
“_id”: “00000000-0000-0000-0000-000000000003”,
“value”: “8001234567”
}
]
}