"barcode": { "format": "PKBarcodeFormatPDF417", "message": "' . $id . '", "messageEncoding": "iso-8859-1", "altText": "' . $id . '" } }'); // add files to the PKPass package $pass->addFile('icon.png'); $pass->addFile('*****@*****.**'); $pass->addFile('logo.png'); $pass->addFile('background.png', 'strip.png'); if ( !$pass->create(true)) { // Create and output the PKPass echo 'Error: ' . $pass->getError(); } exit; } else { // User lands here, there are no $_POST variables set ?><html> <head> <title>Starbucks pass creator - PHP class demo</title> <!-- Reusing some CSS from another project of mine --> <link href="http://www.lifeschool.nl/static/bootstrap.css" rel="stylesheet" type="text/css"/> <meta name="viewport" content="width=320; user-scalable=no"/> <style> .header { background-color: #CCC;
} // add files to the PKPass package $pass->addFile('../images/icon.png'); $pass->addFile('../images/icon@2x.png'); $pass->addFile('../images/logo.png'); // specify english and french localizations $pass->addFile('en.strings', 'en.lproj/pass.strings'); $pass->addFile('fr.strings', 'fr.lproj/pass.strings'); if ($pass->checkError($error) == true) { exit('An error occured: ' . $error); } //If you pass true, the class will output the zip into the browser. $result = $pass->create(true); if ($result == false) { // Create and output the PKPass echo $pass->getError(); } } else { // User lands here, there are no $_POST variables set ?> <html> <head> <title>Flight pass creator - PHP class demo</title> <!-- Reusing some CSS from another project of mine --> <link href="http://www.lifeschool.nl/static/bootstrap.css" rel="stylesheet" type="text/css"/> <meta name="viewport" content="width=320; user-scalable=no"/> <style> .header { color: white; background-color: #6699cc;