-
Notifications
You must be signed in to change notification settings - Fork 6
/
example.php
39 lines (34 loc) · 1.61 KB
/
example.php
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
require("bezahlcode.class.php");
// IBAN, BIC, accountowner, qrcodeprovider, use Bezahlcode-Frame
// string qrprovider = default phpqrcode, options: phpqrcode, google
// boolean use_frame = default true // Use the Frame around the QR-Code with the text "Zahlen mit Code"
// it's possible to change the frame by setting the variable $bezahlcode->base64_frame with your own frame
$bezahlcode = new Bezahlcode("DE72 3702 0500 0009 7097 00", "BFSWDE33XXX", "Ärzte ohne Grenzen e.V.");
$bezahlcode = new Bezahlcode("DE72 3702 0500 0009 7097 00", "BFSWDE33XXX", "Ärzte ohne Grenzen e.V.", "phpqrcode", false);
$bezahlcode = new Bezahlcode("DE72 3702 0500 0009 7097 00", "BFSWDE33XXX", "Ärzte ohne Grenzen e.V.", "google");
$bezahlcode->generatePayload("Donation", 10.99);
/* get Bezahlcode as base64-string
generateBase64(filetype)
filetype defaults to jpg; options: jpg, png, gif
----------------------------------- */
$base64 = $bezahlcode->generateBase64('png');
echo "<img src=\"".$base64."\" title=\"Donate via Bezahlcode\">";
/* save Bezahlcode
saveImage(filename, filetype)
filetype defaults to jpg; options: jpg, png, gif
----------------------------------- */
$filename = $bezahlcode->saveImage("donation.jpg", "jpg");
// or
$filename = $bezahlcode->saveImage("output.jpg");
// or
$filename = $bezahlcode->saveImage("output.png", "png");
// or
$filename = $bezahlcode->saveImage();
/* output Bezahlcode to Webbrowser
outputImage(filetype)
filetype defaults to jpg; options: jpg, png, gif
----------------------------------- */
$bezahlcode->outputImage('png');
// or
$bezahlcode->outputImage();