PHP code example of farzai / promptpay
1. Go to this page and download the library: Download farzai/promptpay library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
farzai / promptpay example snippets
use Farzai\PromptPay\PromptPay;
$qrCode = PromptPay::create('0988888888', 100);
$imageUri = $qrCode->toDataUri('png');
echo '<img src="' . $imageUri . '" />';
use Farzai\PromptPay\PromptPay;
$qrCode = PromptPay::create('0988888888', 100):
$imagePath = $qrCode->toFile('qr-code.png');
echo 'QR code saved to ' . $imagePath;