up
This commit is contained in:
@@ -128,7 +128,7 @@ func verificarPago(ref string) (confirmado bool, fechaPago string) {
|
||||
if contrato.EnlacePagoLinkID != "" {
|
||||
boldCfg, boldErr := models.GetBoldConfig()
|
||||
if boldErr == nil {
|
||||
paid, paymentID, boldApiErr := services.CheckBoldLinkPaid(boldCfg, contrato.EnlacePagoLinkID)
|
||||
paid, paymentID, monto, boldApiErr := services.CheckBoldLinkPaid(boldCfg, contrato.EnlacePagoLinkID)
|
||||
if boldApiErr != nil {
|
||||
log.Printf("[PAGO-ESTADO] Bold API error para link %s: %v", contrato.EnlacePagoLinkID, boldApiErr)
|
||||
} else if paid {
|
||||
@@ -141,6 +141,8 @@ func verificarPago(ref string) (confirmado bool, fechaPago string) {
|
||||
Tipo: "API_CHECK",
|
||||
PaymentID: paymentID,
|
||||
Referencia: ref,
|
||||
PayerEmail: contrato.Cliente.Email,
|
||||
Monto: monto,
|
||||
Procesado: true,
|
||||
})
|
||||
}
|
||||
@@ -152,7 +154,7 @@ func verificarPago(ref string) (confirmado bool, fechaPago string) {
|
||||
// ─── 4. dLocal API ───────────────────────────────────────────────────────
|
||||
dlocalCfg, dlocalErr := models.GetLastActiveDlocalApi()
|
||||
if dlocalErr == nil {
|
||||
paid, paymentID, dlocalApiErr := services.CheckDlocalPaymentByOrderID(*dlocalCfg, ref)
|
||||
paid, paymentID, monto, payerEmail, dlocalApiErr := services.CheckDlocalPaymentByOrderID(*dlocalCfg, ref)
|
||||
if dlocalApiErr != nil {
|
||||
log.Printf("[PAGO-ESTADO] dLocal API error para order_id %s: %v", ref, dlocalApiErr)
|
||||
} else if paid {
|
||||
@@ -168,6 +170,8 @@ func verificarPago(ref string) (confirmado bool, fechaPago string) {
|
||||
Estado: "PAID",
|
||||
PaymentID: paymentID,
|
||||
Referencia: ref,
|
||||
PayerEmail: payerEmail,
|
||||
Monto: monto,
|
||||
Procesado: true,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user