include_once "PassBookPass.class.php"; use PassBook\Pass as ApplePass; // Create boarding pass $obj = new ApplePass(BOARDING_PASS, "YOUR PASS IDENTIFIER", "YOUR TEAM IDENTIFIER", "Shaheen Airways", "Shaheen Airways Boarding Pass", "Shaheen Airways", "rgb(22, 55, 110)", "rgb(50, 91, 185)"); $obj->addBarCode("SHAW72EC20I"); // Add location $obj->addLocation("67.43903", "61.4532322"); $obj->addLocation("51.85342", "53.7540967"); $obj->boardingPass_addTransitType(TRANSIT_TYPE_AIR); $obj->boardingPass_addHeaderInfo("Gate", "10"); $obj->boardingPass_addDepartureInfo("New York", "ACE"); $obj->boardingPass_addArrivalInfo("Dallas", "DQT"); $obj->boardingPass_addDepartureTime("Time", "5:30 PM"); $obj->boardingPass_addFlightInfo("Flight #", "390"); $obj->boardingPass_addClassInfo("Class", "Economy"); $obj->boardingPass_addFlightDate("Date", "04/19"); $obj->boardingPass_addPessangerInfo("Name", "John"); $obj->addIcon("/var/www/passimages/icon.png"); $obj->addIconHD("/var/www/passimages/icon@2x.png"); $obj->addLogo("/var/www/passimages/logo.png"); $obj->addLogoHD("/var/www/passimages/logo@2x.png"); $obj->addBackScreenInfo("Copyrights", "All rights reserved"); if ($obj->generatePass("/var/www/passbook/test/", "BoardingPass")) { echo "<br> Your Pass has been generated. Now sign the pass by using following <a href='https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/PassKit_PG/Chapters/Introduction.html'>link</a>"; } // Create COUPON pass $obj2 = new ApplePass(COUPON, "YOUR PASS IDENTIFIER", "YOUR TEAM IDENTIFIER", "Super General Store", "Super General Store Coupon", "Super Store", "rgb(22, 55, 110)", "rgb(50, 91, 185)"); $obj2->addBarCode("SGSC00145UP"); $obj2->addLocation("27.43903", "69.4532322"); $obj2->addLocation("88.85342", "33.7540967"); $obj2->couponPass_addHeaderInfo("No", "6901");