QADKFHAR3KWQCNYU25Z7PJUGMD5WL26IU3DOAHBTRN2A7NKPUPKAC
Y3LIJ5USPMYBG7HKCIQBE7MWVGLQJPJSQD3KPZCTKXP22GOB535QC
IZEVQF627FA7VV25KJAWYWGGC35LZUUBBQRPN5ZAINTQLPEDRTEAC
73NDXDEZRMK672GHSTC3CI6YHXFZ2GGJI5IKQGHKFDZKTNSQXLLQC
O5FVTOM6YFBLEPF3S576K6IMT6ZZ5VQCSB3YVXNS4CKBITKCRZ7AC
DFOBMSAODB3NKW37B272ZXA2ML5HMIH3N3C4GT2DPEQS7ZFK4SNAC
64C6AWH66FDKU6UE6Z6JPX2J2GBM2JOPTH2GL6LHKAIUBGNGDZ5AC
QMRKFEPGFBCEWAIXPEIG5ILKAJ2JH5L3TOITHR4HNJXK5FN3KXBQC
updateCache (CreatePayment _ ) = error "Not implemented"
updateCache dbop @ (CreatePayment req) = do
eventId <- requireEventId dbop
pinsert PaymentId
"INSERT INTO payments \
\(payment_request_id, event_id, payment_data) \
\VALUES (?, ?, ?) RETURNING id"
( req ^. (request . _PaymentRequestId)
, eventId ^. _EventId
, req ^. (payment . to (runPut . encodeMessage))
)