Google Wallet Objects
Component ID
2568325
Component name
Google Wallet Objects
Component type
module
Maintenance status
Development status
Component security advisory coverage
not-covered
Component created
Component changed
Component body
Provides some integration with the Google Wallet Objects API.
Provides an admin interface to input credentials. Provides hooks and form elements for displaying "Add to Google Wallet" buttons.
Requires Libraries and the google-api-php library from GitHub.
Example usage to generate a button:
$object_id = 'my_unique_id_' . rand(0, 999);
$settings = array(
'barcode' => array(
'type' => 'pdf417',
'value' => 123123,
),
'accountId' => 123,
'accountName' => 'Somebody Special',
'state' => 'active',
);
$object = gwo_create_loyalty_object($object_id, 'MyLoyaltyClass', $settings);
$jwt = gwo_jwt(array('loyaltyObjects' => array($object)));
$wallet = array(
'#type' => 'save_to_wallet',
'#jwt' => $jwt,
);
return $wallet;
