Error: Call to undefined method Endroid\QrCode\QrCode::writeDataUri() in C:\wamp64\www\eCommerce\eshopper\eshopper-1.0.0\payments.php on line 19
<?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); ?>
writeDataUri
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)