Hi Team
I am having a problem with my qr code library because i have installed on compose correct qr-code and path. But i am getting this error “Call to undefined method Endroid\QrCode\QrCode”.
// path installed
C:\wamp64\www\vendor\endroid\qr-code
// logic to use qr code in php
<?php
require 'C:\wamp64\www\vendor\autoload.php';
use Endroid\QrCode\QrCode;
// Process the payment and get the necessary data
$amount = $_POST['amount'];
$description = $_POST['description'];
// Generate the payment QR code
$paymentData = [
'amount' => $amount,
'description' => $description
];
$qrCode = new QrCode(json_encode($paymentData));
$qrCode->setSize(300);
$qrCodeDataUri = $qrCode->writeDataUri();
// Prepare the response
$response = [
'qr_code_url' => $qrCodeDataUri
];
// Send the response as JSON
header('Content-Type: application/json');
echo json_encode($response);
?>