the extension from @pavi2410 is based on Anjlab’s library (version 1.0.39)
I formerly also was using a 1.0.x library version for my billing extension , but upgraded it to 1.1 because Google planned to deprecate the Google Play Billing with AIDL, see also
https://developer.android.com/google/play/billing/api.html
you probably still can use that solution until Google shuts it down.
Taifun