Compare commits
2 Commits
f23029e785
...
feature/ch
| Author | SHA1 | Date | |
|---|---|---|---|
| b273b2866f | |||
| 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()
|
||||
|
||||
@@ -22,6 +22,9 @@ class PurchaseController extends Controller
|
||||
->with(['items.variant.product', 'items.variant.definitions.productAttribute.attribute'])
|
||||
->where('tenant_codigo', $tenant->codigo)
|
||||
->where('user_id', $request->user()->id)
|
||||
->when($request->query('status'), function ($query, $status) {
|
||||
$query->where('status', $status);
|
||||
})
|
||||
->latest()
|
||||
->paginateFromRequest()
|
||||
)->response();
|
||||
|
||||
Reference in New Issue
Block a user