This commit is contained in:
2026-07-16 10:00:12 -03:00
7 changed files with 102 additions and 4 deletions

View File

@@ -68,10 +68,16 @@ class PurchaseController extends Controller
$method = $request->validated('method');
$totalAmount = $compra->calculateCurrentTotalAmount();
$compra->update([
$purchaseUpdate = [
'payment_method' => $method,
'total' => $totalAmount,
]);
];
if ($method === 'transfer') {
$purchaseUpdate['payer_dni'] = preg_replace('/\D+/', '', (string) $request->validated('payer_dni'));
}
$compra->update($purchaseUpdate);
if ($method === 'transfer') {
$telepagosService = new TelepagosIntegrationService;