-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathencode.php
More file actions
25 lines (21 loc) · 826 Bytes
/
encode.php
File metadata and controls
25 lines (21 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
require_once "../../vendor/autoload.php";
$UUID = \Paynl\DynamicUUID::encode(
'SL-1234-1234',
'abcdef1234567890abcdef1234567890abcdef12',
'INV001'
);
$ideal = \Paynl\DynamicUUID::ideal($UUID, true);
// load qr image from url
echo "<img src='".$ideal['QRUrl']."'>";
// load qr image from base64
echo "<img src='data:image/png;base64,".$ideal['QRBase64']."'>";
// the url the qr-code points to
echo "<br /><a href='".$ideal['url']."'>".$ideal['url']."</a><br />";
$bancontact = \Paynl\DynamicUUID::bancontact($UUID, true);
// load qr image from url
echo "<img src='".$bancontact['QRUrl']."'>";
// load qr image from base64
echo "<img src='data:image/png;base64,".$bancontact['QRBase64']."'>";
// the url the qr-code points to
echo "<br /><a href='".$bancontact['url']."'>".$bancontact['url']."</a><br />";