Display repeater data based on logged in member price plan

Thanks so much for this. Please accept my apology for the questions that are going to follow as I’m not a coder.

As per the instructions, I have created an events.js file under backend with the following code:

import wixData from ‘wix-data’ ;

export function wixPaidPlans_onPlanPurchased(event) {

let orderData = {
“title” : “Member plan purchased” ,
“data” : event.order.memberId
};

wixData.insert( "Purchases" , orderData); 

}

I have created a database collection called ‘Purchases’. I have published my website and have conducted a few test purchases (of $0 value) through the live ‘book online’ page but the database is not getting populated with any member information.

Appreciate any help. Thank you.