up
This commit is contained in:
@@ -149,3 +149,15 @@ func GetDlocalPaymentLogs(limit int) ([]DlocalPaymentLog, error) {
|
||||
}
|
||||
return logs, nil
|
||||
}
|
||||
|
||||
// GetDlocalPaymentLogsByRef devuelve todos los registros que coinciden con una referencia/order_id.
|
||||
func GetDlocalPaymentLogsByRef(ref string) ([]DlocalPaymentLog, error) {
|
||||
var logs []DlocalPaymentLog
|
||||
if err := app.Http.Database.DB.
|
||||
Where("referencia = ? OR order_id = ?", ref, ref).
|
||||
Order("id DESC").
|
||||
Find(&logs).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return logs, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user