Hi Legends,
import wixPaidPlans from ‘wix-paid-plans’ ;
import wixPay from ‘wix-paid-plans’ ;
let planId = ‘41c65ec6-2601-4909-9a1d-8c1d91694c25’
$w . onReady ( function () {
wixPaidPlans . purchasePlan ( planId )
. then ( ( myPurchase ) => {
let myOrderId = myPurchase . orderId ;
let myWixPayOrderId = myPurchase . wixPayOrderId ;
let myWixPayStatus = myPurchase . wixPayStatus ;
} );
});
By Using this Code , Can we buy the Paid Plans using Velo ?
If So , How Or Where I should Pass the User Detail (id/Mail)
My Requirement is :
If i Pass a user id/Mail And The Plan Id ,
The Particular Paid Plan Get Purchased for that particular User:
Example:
user Mail is : keyboard@mouse.com and
Plan Id is “41c65ec6-2601-4909-9a1d-8c1d91694c25”
And this particular plan should be Enable for this user,
He no need to Go to Plans and Select Plans and Pay And then get the Access.
He Should get access Directly
Thanks in advance
Reference :
https://www.wix.com/velo/reference/wix-paid-plans.html