package Ġorg . be ck n . one . sandbox . b ap . message . factories Ċ Ċ import Ġorg . be ck n . one . sandbox . b ap . message . entities . Payment Dao Ċ import Ġorg . be ck n . protocol . schemas . Protocol Payment Ċ import Ġjava . net . URI Ċ Ċ object ĠProtocol Payment Factory Ġ{ ĊĊĠ Ġfun Ġcreate () Ġ= ĠProtocol Payment ( ĊĠĠĠ Ġuri Ġ= ĠURI (" http :// host . pay . co . in "), ĊĠĠĠ Ġtl Method Ġ= ĠProtocol Payment . Tl Method . POST , ĊĠĠĠ Ġparams Ġ= Ġmap Of (" nonce " Ġto Ġ" J XN ASN "), ĊĠĠĠ Ġtype Ġ= ĠProtocol Payment . Type . ON ORDER , ĊĠĠĠ Ġstatus Ġ= ĠProtocol Payment . Status . PA ID , ĊĠĠĠ Ġtime Ġ= ĠProtocol Time Factory . fixed Timestamp (" Paid Ġon ") ĊĠ Ġ) ĊĊĠ Ġfun Ġcreate As Entity ( protocol : ĠProtocol Payment ?) Ġ= Ġprotocol ?. let Ġ{ ĊĠĠĠ ĠPayment Dao ( ĊĠĠĠĠĠ Ġuri Ġ= Ġprotocol . uri , ĊĠĠĠĠĠ Ġtl Method Ġ= ĠPayment Dao . Tl Method . values (). first Ġ{ Ġit . value Ġ== Ġprotocol . tl Method ?. value Ġ}, ĊĠĠĠĠĠ Ġparams Ġ= Ġprotocol . params , ĊĠĠĠĠĠ Ġtype Ġ= ĠPayment Dao . Type . values (). first Ġ{ Ġit . value Ġ== Ġprotocol . type ?. value Ġ}, ĊĠĠĠĠĠ Ġstatus Ġ= ĠPayment Dao . Status . values (). first Ġ{ Ġit . value Ġ== Ġprotocol . status ?. value Ġ}, ĊĠĠĠĠĠ Ġtime Ġ= ĠProtocol Time Factory . time As Entity ( protocol . time ) ĊĠĠĠ Ġ) ĊĠ Ġ} Ċ }