Here, you need to deploy your server as well.
1) App launches
2) App asks for employerId/employeeId, typeOfUser(e.g..dummyX, dummyY) and sends to Server
Case A : typeOfUser is a employer (Mr X)
- server sends merchantID of Mr.A which, which then is used for in-app billing to unlock the level1 for two ids.This should return some transactionId and payment is sent to Mr X, account
- Then, send the transactionID (that just recieved ), employerId (of Mr. X) and two employeesID(for Y and Z) and google merchantId (of Mr. X, provided Mr.X has valid google wallet account).
- This information will be saved on server in mySQL Db.It would be used in case B , below.
Case B : typeOfUser is a employee (Mr Y or Mr Z)
- Server checks the employeeID, if its linked to any of the valid employerId.
- If yes, then it returns merchantID of employer (Mr. X), which is then used to make all google in-app purchasing.Hence, all these purchasing transactions are credited to Mr.X account.
I hope this gives whats is expected.
Going for weekend party.Let me know, if any confusions.I would be happy to help later.