package Ġcom . merc ad op ago . android . px . model . internal Ċ Ċ import Ġcom . merc ad op ago . android . px . internal . datasource . Custom Option Id Solver Ċ import Ġcom . merc ad op ago . android . px . internal . helper . Security Code Helper Ċ import Ġcom . merc ad op ago . android . px . internal . map pers . Mapper Ċ import Ġcom . merc ad op ago . android . px . internal . repository . Amount Configuration Repository Ċ import Ġcom . merc ad op ago . android . px . internal . repository . Application Selection Repository Ċ import Ġcom . merc ad op ago . android . px . internal . repository . Pay er Cost Selection Repository Ċ import Ġcom . merc ad op ago . android . px . internal . view model . Split Selection State Ċ import Ġcom . merc ad op ago . android . px . model . Pay er Cost Ċ import Ġcom . merc ad op ago . android . px . model . Payment Methods Ċ import Ġcom . merc ad op ago . android . px . model . Payment Types Ċ Ċ internal Ġclass ĠFrom Express Metadata To Payment Configuration ( ĊĠĠĠ Ġprivate Ġval Ġamount Configuration Repository : ĠAmount Configuration Repository , ĊĠĠĠ Ġprivate Ġval Ġsplit Selection State : ĠSplit Selection State , ĊĠĠĠ Ġprivate Ġval Ġpay er Cost Selection Repository : ĠPay er Cost Selection Repository , ĊĠĠĠ Ġprivate Ġval Ġapplication Selection Repository : ĠApplication Selection Repository , ĊĠĠĠ Ġprivate Ġval Ġcustom Option Id Solver : ĠCustom Option Id Solver Ċ ) Ġ: ĠMapper < One Tap Item , ĠPayment Configuration >() Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġmap ( value : ĠOne Tap Item ): ĠPayment Configuration Ġ{ ĊĊĠĠĠĠĠĠĠ Ġval Ġcustom Option Id Ġ= Ġcustom Option Id Solver [ value ] ĊĠĠĠĠĠĠĠ Ġval Ġ( payment Method Id , Ġpayment TypeId ) Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġwith ( application Selection Repository [ value ]. payment Method ) Ġ{ Ġid Ġto Ġtype Ġ} ĊĊĠĠĠĠĠĠĠ Ġvar Ġpay er Cost : ĠPay er Cost ? Ġ= Ġnull ĊĠĠĠĠĠĠĠ Ġval Ġamount Configuration Ġ= Ġamount Configuration Repository . getConfiguration Selected For ( custom Option Id ) ĊĠĠĠĠĠĠĠ Ġval Ġsplit Payment Ġ= Ġsplit Selection State . user W ants To Split () Ġ&& Ġamount Configuration !!. allow Split () ĊĊĠĠĠĠĠĠĠ Ġif Ġ( Payment Types . is Card Payment Type ( payment TypeId ) Ġ|| ĠPayment Methods . CON SUM ER _ CRED ITS Ġ== Ġpayment Method Id ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpay er Cost Ġ= Ġamount Configuration !!. getCurrent Pay er Cost ( split Selection State . user W ants To Split (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġpay er Cost Selection Repository . get ( custom Option Id )) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġreturn ĠPayment Configuration ( payment Method Id , Ġpayment TypeId , Ġcustom Option Id , ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSecurity Code Helper . isRequired ( value . card ?. display Info ?. security Code ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsplit Payment , Ġpay er Cost ) ĊĠĠĠ Ġ} Ċ } Ċ