EoPassbookBundle integrates the php-passbook library into Symfony2.
Note: See php-passbook documentation for more information on obtaining your p12 and wwdr certificates.
This version of the bundle requires Symfony 2.1+
Add EoPassbookBundle in your composer.json:
{
"require": {
"eo/passbook-bundle": "dev-master"
}
}
Now tell composer to download the bundle by running the command:
$ php composer.phar update eo/passbook-bundle
Composer will install the bundle to your project's vendor/eo directory.
Enable the bundle in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Eo\PassbookBundle\EoPassbookBundle(),
);
}
Now that you have properly installed and enabled EoPassbookBundle, the next step is to configure the bundle to work with the specific needs of your application.
Add the following configuration to your config.yml
file
# app/config/config.yml
eo_passbook:
pass_type_identifier: PASS-TYPE-IDENTIFIER
team_identifier: TEAM-IDENTIFIER
organization_name: ORGANIZATION-NAME
p12_certificate: /path/to/p12/certificate
p12_certificate_password: P12-CERTIFICATE-PASSWORD
wwdr_certificate: /path/to/wwdr/certificate
output_path: /path/to/save/pkpass
icon_file: /path/to/iconfile
All configuration values are required to use the bundle.
To browse the simple usage example you have to import the following file in your routing.yml
:
# app/config/routing.yml
eo_passbook_sample:
resource: "@EoPassbookBundle/Resources/config/routing/sample.xml"
You will now be able to access the example controller from: http://domain.tld/passbook/sample
This bundle currently adds only a single service, pass_factory
// Getting pass_factory service is straightforward:
$factory = $this->get('pass_factory');
See php-passbook documentation for the rest.
The following documents are available:
This bundle is under the MIT license. See the complete license in the bundle:
Resources/meta/LICENSE
Issues and feature requests related to this bundle are tracked in the Github issue tracker https://github.com/eymengunay/PassbookBundle/issues. PHP-Passbook related issues and requests should be opened under php-passbook library repository: https://github.com/eymengunay/php-passbook/issues