Parcourir la source

official log for new transactions.

master
patrick il y a 5 ans
Parent
révision
7ca36bb7ea
1 fichiers modifiés avec 12 ajouts et 1 suppressions
  1. +12
    -1
      db.go

+ 12
- 1
db.go Voir le fichier

@@ -86,11 +86,22 @@ func (m *TransactionDB) addRequest(r *http.Request, md5key string) (row Leanwork
row.Valid = valid
row.Ip4 = ip4
row.MD5Key = md5key
log.Println("INSERT[" + strconv.FormatInt(row.Id, 10) + "]: customerId: " + customerId + " | orderAmount: " + orderCurrency + " " + orderAmount)

m.logNewLeanworkIn(row)

return row, err
}

func (m *TransactionDB) logNewLeanworkIn(row LeanworkIn) {
var insert_type string
if row.MD5Key == Config.LeanWork.MD5P2P {
insert_type = "P2P"
} else {
insert_type = "FAT"
}
log.Println(insert_type + " INSERT[" + strconv.FormatInt(row.Id, 10) + "]: customerId: " + row.CustomerId + " | orderAmount: " + row.OrderCurrency + " " + row.OrderAmount)
}

func (m *TransactionDB) addRpnOut(r RpnOut) (row RpnOut, err error) {
if err = m.conn(Config); err != nil {
return row, err

Chargement…
Annuler
Enregistrer