Ver código fonte

choose proper key for leanwork when sending notifications

master
patrick 5 anos atrás
pai
commit
c7a75690d5
1 arquivos alterados com 10 adições e 1 exclusões
  1. +10
    -1
      leanworkOut.go

+ 10
- 1
leanworkOut.go Ver arquivo

@@ -111,10 +111,19 @@ func buildLeanworkOutByRpnIn(ri RpnIn) (ret LeanworkOut, err error) {
}

func (m *LeanworkOut) UpdateSignature() {
s := m.SignType + m.OrderNo + m.OrderAmount + m.OrderCurrency + m.TransactionId + m.Status + Config.LeanWork.MD5Key
s := m.SignType + m.OrderNo + m.OrderAmount + m.OrderCurrency + m.TransactionId + m.Status + m.getLeanworkMD5Key()
m.Sign = md5str(s)
}

func (m *LeanworkOut) getLeanworkMD5Key() string {
li, err := getLeanworkInById(m.Leanwork)
if err != nil {
log.Printf("Error determin P2P or FAT, leanworkIn = %d", m.Leanwork)
return ""
}
return li.MD5Key
}

func (m *LeanworkOut) add2db() (ret LeanworkOut, err error) {
if err = db.conn(Config); err != nil {
return

Carregando…
Cancelar
Salvar