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