Hi!
I am trying to pass skipUserInfoPage as a paymentOption into wixPay.startPayment(), and I need help. I have read the other threads about this and found a lot of useful info, but my case is slightly different. Here is what I know:
-
I can pass the user data along as userInfo, and so the wix checkout is pre-populated with the right data, but my goal is to dismiss this page entirely. I do think this should be possible since wix does this themselves in the prebuilt checkout procedure purchasePlan() (which I unfortunately can’t use)
-
If instead of using wixPaidPlans.orderPlan(myId) to start my order I use the wix-pay-backend API I can dismiss this page as I want to. If I, as the documentation stipulates, pass the user data into my backend → createPayment() and then pass paymentOptions.skipUserInfoPage into wixPay.startPayment() the screen is removed properly. But, as far as I understand I can not use wix-pay-backend with my paidPlans.
So, it feels like I might be missing something here, and any help would be greatly appreciated. Is there any way to pass the user data into the orderPlan function?
Best regards
Martin Sandström
´´´
// ::::: Does not work: ::::::
wixPaidPlans.orderPlan(myId).then(orderObject => {
const paymentUserInfo = {
firstName: ‘Tess’ ,
lastName: ‘Test’ ,
phone: ‘00’ ,
email: ‘tess@test.com’ ,
countryCode: ‘US’
}
const paymentOptions = {
termsAndConditionsLink: ( ‘https://www.test.com’ ),
// showThankYouPage: true,
userInfo: paymentUserInfo,
skipUserInfoPage: true
}
wixPay.startPayment(orderObject.wixPayOrderId, paymentOptions)... ...
})
// ::::::: Does work :::::
createMyBackendPaymentAndAddUserInfo( paymentUserInfo ) .then( (payment) => {
wixPay.startPayment(payment.id, paymentOptions);
});
´´´