feat: update Telepagos webhook and payment intent logic for improved data handling
This commit is contained in:
parent
7b2a741884
commit
eca3b01083
|
|
@ -98,8 +98,8 @@ class TelepagosWebhookService
|
|||
|
||||
$paymentData = [
|
||||
'compra_id' => $compra->id,
|
||||
'cuit_buyer' => $details['data']['cuit_buyer'] ?? $details['cuit_buyer'] ?? null,
|
||||
'cvu_buyer' => $details['data']['cvu_buyer'] ?? $details['cvu_buyer'] ?? null,
|
||||
'cuit_buyer' => $details['data']['buyer']['cuit'] ?? $details['buyer']['cuit'] ?? null,
|
||||
'cvu_buyer' => $details['data']['buyer']['cvu'] ?? $details['buyer']['cvu'] ?? null,
|
||||
'amount' => $amount,
|
||||
'concept' => $details['data']['concept'] ?? $details['concept'] ?? null,
|
||||
'operation' => $details['data']['operation'] ?? $details['operation'] ?? null,
|
||||
|
|
|
|||
|
|
@ -99,8 +99,8 @@ class PurchaseController extends Controller
|
|||
);
|
||||
|
||||
$telepagosQr = $compra->telepagosQr()->create([
|
||||
'qr_order_id' => (string) ($qrResponse['id'] ?? $qrResponse['order_id'] ?? $qrResponse['cashin_id'] ?? ''),
|
||||
'qr_code' => $qrResponse['qr'] ?? $qrResponse['qr_code'] ?? $qrResponse['qr_data'] ?? '',
|
||||
'qr_order_id' => (string) ($qrResponse['qr_order_id'] ?? ''),
|
||||
'qr_code' => $qrResponse['qr_code'] ?? '',
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
return response()->json([
|
||||
|
|
|
|||
Loading…
Reference in New Issue