@ file : Jvm Name (" Open pay Checkout ") Ċ Ċ package Ġau . com . open pay . sdk android Ċ Ċ import Ġandroid . net . Uri Ċ import Ġandroid . util . Patterns Ċ import Ġandroidx . activity . Component Activity Ċ import Ġandroidx . activity . result . Activity Result Launcher Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġau . com . open pay . sdk android . internal . Checkout Result Contract Ċ import Ġau . com . open pay . sdk android . internal . Open pay Checkout Activity Ċ Ċ /** Ċ Ġ* ĠReturns Ġa Ġ[ launcher ][ Checkout With Open pay ] Ġthat Ġwill Ġpresent Ġan Ġ[ Open pay Checkout Activity ] Ġand Ċ Ġ* Ġpass Ġthe Ġ[ result ][ Open pay Checkout Result ] Ġto Ġthe Ġgiven Ġ[ callback ][ on Checkout Result ]. Ċ Ġ*/ Ċ @ Jvm Name (" comm ence ") Ċ fun ĠComponent Activity . checkout With Open pay ( ĊĠĠĠ Ġon Checkout Result : Ġ( Open pay Checkout Result ) Ġ-> ĠUnit Ċ ): ĠCheckout With Open pay Ġ= ĠCheckout With Open pay ( ĊĠĠĠ Ġcheckout Launcher Ġ= Ġregister For Activity Result ( Checkout Result Contract ()) Ġ{ Ġon Checkout Result ( it ) Ġ} Ċ ) Ċ Ċ /** Ċ Ġ* ĠReturns Ġa Ġ[ launcher ][ Checkout With Open pay ] Ġthat Ġwill Ġpresent Ġan Ġ[ Open pay Checkout Activity ] Ġand Ċ Ġ* Ġpass Ġthe Ġ[ result ][ Open pay Checkout Result ] Ġto Ġthe Ġgiven Ġ[ callback ][ on Checkout Result ]. Ċ Ġ*/ Ċ @ Jvm Name (" comm ence ") Ċ fun ĠFragment . checkout With Open pay ( ĊĠĠĠ Ġon Checkout Result : Ġ( Open pay Checkout Result ) Ġ-> ĠUnit Ċ ): ĠCheckout With Open pay Ġ= ĠCheckout With Open pay ( ĊĠĠĠ Ġcheckout Launcher Ġ= Ġregister For Activity Result ( Checkout Result Contract ()) Ġ{ Ġon Checkout Result ( it ) Ġ} Ċ ) Ċ Ċ data Ġclass ĠCheckout With Open pay ( private Ġval Ġcheckout Launcher : ĠActivity Result Launcher < String >) Ġ{ ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠLa unches Ġan Ġ[ Open pay Checkout Activity ] Ġwith Ġa ĠURL Ġcomp ris ing Ġthe Ġgiven ĊĠĠĠĠ Ġ* Ġ[ hand over ĠURL ][ hand over Url ] Ġand Ġ[ transaction Ġtoken ][ transaction Token ]. ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġoperator Ġfun Ġinvoke ( ĊĠĠĠĠĠĠĠ Ġhand over Url : ĠString , ĊĠĠĠĠĠĠĠ Ġtransaction Token : ĠString , ĊĠĠĠ Ġ) Ġ{ ĊĠĠĠĠĠĠĠ Ġrequire ( Patterns . WEB _ URL . matcher ( hand over Url ). matches ()) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" A Ġvalid Ġhand over ĠURL Ġis Ġrequired " ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġrequire ( transaction Token . isNotBlank ()) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ" A Ġvalid Ġtransaction Ġtoken Ġis Ġrequired " ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġcheckout Launcher . launch ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠUri . parse ( hand over Url ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. build Up on () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. encoded Query (" Transaction Token =$ transaction Token ") ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. toString () ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} Ċ } Ċ