feat: update purchase query in TelepagosWebhookService to handle multiple statuses and normalize DNI format
This commit is contained in:
parent
f23029e785
commit
05a92b7ec3
|
|
@ -54,8 +54,8 @@ class TelepagosWebhookService
|
|||
$dni = substr($cuit, 2, -1);
|
||||
|
||||
$compra = Purchase::where('tenant_codigo', $tenantCodigo)
|
||||
->where('dni', $dni)
|
||||
->where('status', Purchase::STATUS_PENDING_PAYMENT)
|
||||
->whereRaw("REPLACE(dni, '.', '') = ?", [$dni])
|
||||
->whereIn('status', [Purchase::STATUS_CREATED, Purchase::STATUS_PENDING_PAYMENT])
|
||||
->where('payment_method', 'transfer')
|
||||
->where('total', $amount)
|
||||
->latest()
|
||||
|
|
|
|||
Loading…
Reference in New Issue