I have several services that I allow the user to either pay online or pay offline (in-person). When I use Wix’s “built-in” Booking pages to book the services the user is offered Credit Card, Paypal and In-Person as expected, (see fig1).
fig1
However when I used the
wixBookings.checkoutBooking(bookingInfo,options) function for that same service and send the paymentType = wixPay_Offline the user is still prompted to pay for the class, see fig2
fig 2
On my service here is the payment settings:
And finally my payment options:
When executing the checkoutBooking() here is that code:
let options = {}
if (processCoupon && GrouponValid) {
options = {
"paymentType":"wixPay_Offline"
}
}
if (cleanForm) {
//$w('#iSubmit').enabled = false;
$w('#iStatus').text = 'Please wait...';
$w('#iStatus').text = options.paymentType; //verify pay type
console.info('Submitting Registration')
// booking checkout
wixBookings.checkoutBooking(bookingInfo,options)
.then( (results) => {
$w('#iStatus').text = 'Please wait...Loading Payment.';
$w('#iStatus').text = results.status;
console.info(results.status);
} )
.catch( (error) => {
console.info(error)
$w('#iStatus').text = error.message;
//$w('#iSubmit').enabled = true;
} );
}
else {
return false;
}
What am I missing? Why is the user still being prompted to pay online?