package Ġcom . bee bee o ii . snap sol ves udoku . fragments Ċ Ċ import Ġandroid . content . Intent Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġcom . anj lab . android . i ab . v 3 . Billing Processor Ċ import Ġcom . anj lab . android . i ab . v 3 . Transaction Details Ċ import Ġcom . bee bee o ii . snap sol ves udoku . R Ċ import Ġcom . google . android . material . app bar . Material Toolbar Ċ import Ġcom . google . android . material . card . Material Card View ĊĊ Ċ private Ġlateinit Ġvar Ġapp Bar : ĠMaterial Toolbar Ċ private Ġlateinit Ġvar Ġdon ate C offee : ĠMaterial Card View Ċ private Ġlateinit Ġvar Ġdon ate Cake : ĠMaterial Card View Ċ private Ġlateinit Ġvar Ġdon ate P izza : ĠMaterial Card View Ċ private Ġlateinit Ġvar Ġdon ate W ine : ĠMaterial Card View Ċ private Ġlateinit Ġvar Ġbilling Processor : ĠBilling Processor Ċ Ċ class ĠDon ate Fragment Ġ: ĠFragment (), ĠBilling Processor . IB illing Handler Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( in flater : ĠLayoutInflater , Ġcontainer : ĠViewGroup ?, ĠsavedInstanceState : ĠBundle ?): ĠView ? Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġroot View Ġ= Ġinflater . inflate ( R . layout . fragment _ don ate , Ġcontainer , Ġfalse ) ĊĊĠĠĠĠĠĠĠ Ġapp Bar Ġ= Ġroot View . findViewById ( R . id . app Bar ) ĊĠĠĠĠĠĠĠ Ġdon ate C offee Ġ= Ġroot View . findViewById ( R . id . don ate C offee ) ĊĠĠĠĠĠĠĠ Ġdon ate Cake Ġ= Ġroot View . findViewById ( R . id . don ate Cake ) ĊĠĠĠĠĠĠĠ Ġdon ate P izza Ġ= Ġroot View . findViewById ( R . id . don ate P izza ) ĊĠĠĠĠĠĠĠ Ġdon ate W ine Ġ= Ġroot View . findViewById ( R . id . don ate W ine ) ĊĊĠĠĠĠĠĠĠ Ġbilling Processor Ġ= ĠBilling Processor ( require Context (), Ġ" MI IB Ij AN Bg k qh ki G 9 w 0 BA QE FA AO CA Q 8 AM I IB Cg K CA Q EA i XZ Hi S jb FS J re S uz Zs I Um Wh vy Td ud AAD a 6 b 2 e Hz 6 C 9 Mi u 9 p vk hk J od 2 fi 4 dG lt 6 4 y N 2 V go 6 XO Ji / 1 g Qm 5 E 4 T 4 v Rm L 9 Wk 7 g JE GY 3 le HY Z 6 5 Y FX P it E 9 7 lp 0 Vc D vl P Qu Zl // H 9 d Qi 0 c Xo os Z 6 x pr fv q cr 7 v L php Vt G 3 1 FT b YW j Vm 2 pk X uE IZ dp So BOX Vd TD 7 0 e Y 5 Z TB to U aw fu 5 3 Gr 0 CX hm UK / ww LT d ax Y k YN 8 3 / o G ij 6 b 2 HI J G zv q 7 CX gc 3 G du lo u Q + Y XX / D 3 P Zh xd 6 Xz Sr 4 C kc Gg T 6 HM 8 h HK aa AS J TD s Gp J 4 Z UT k qq Ys 0 OG Q 6 Ct JK n H 0 FF ym B vo CS N yi HK WN dl m 8 Ew ID AQ AB ", Ġthis ) ĊĠĠĠĠĠĠĠ Ġbilling Processor . initialize () ĊĊĠĠĠĠĠĠĠ Ġapp Bar . set Navigation OnClickListener Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrequire Activity (). on Back Pressed () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġdon ate C offee . setOnClickListener Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbilling Processor . purchase ( require Activity (), Ġ" coffee ", Ġ" dev Test ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbilling Processor . consume Purchase (" coffee ") ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġdon ate Cake . setOnClickListener Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbilling Processor . purchase ( require Activity (), Ġ" cake ", Ġ" dev Test ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbilling Processor . consume Purchase (" cake ") ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġdon ate P izza . setOnClickListener Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbilling Processor . purchase ( require Activity (), Ġ" p izza ", Ġ" dev Test ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbilling Processor . consume Purchase (" p izza ") ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġdon ate W ine . setOnClickListener Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbilling Processor . purchase ( require Activity (), Ġ" wine ", Ġ" dev Test ") ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbilling Processor . consume Purchase (" wine ") ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn Ġroot View ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Activity Result ( request Code : ĠInt , ĠresultCode : ĠInt , Ġdata : ĠIntent ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ(! billing Processor . handle Activity Result ( request Code , ĠresultCode , Ġdata )) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsuper . on Activity Result ( request Code , ĠresultCode , Ġdata ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Billing Initialized () Ġ{ ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Purchase History Restore d () Ġ{ ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Product Purchase d ( productId : ĠString , Ġdetails : ĠTransaction Details ?) Ġ{ ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Billing Error ( errorCode : ĠInt , Ġerror : ĠThrowable ?) Ġ{ ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Destroy () Ġ{ ĊĠĠĠĠĠĠĠ Ġbilling Processor . release () ĊĠĠĠĠĠĠĠ Ġsuper . on Destroy () ĊĠĠĠ Ġ} Ċ }