This commit is contained in:
Lizandro Guarnizo
2026-05-01 17:37:10 -05:00
parent c9024274f0
commit ddbabea23f
2 changed files with 105 additions and 6 deletions
+12
View File
@@ -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
}