Closed haiworler closed 3 years ago
You will need to provide a couple of HTTP endpoints to implement this functionality.
Some tips/starting points:
webServiceURL
in your pass JSONHello, and Thank you for the prompt response, On this topic I have been researching and still do not understand how the process is, to receive by the web service the push token of the phone. this is my code.
$data = [ 'description' => 'Name', 'formatVersion' => 1, 'organizationName' => 'Flight Express', 'passTypeIdentifier' => 'pass.com.example', // Change this! 'serialNumber' => $serialNumber, 'teamIdentifier' => '589F9Z9FP3', // Change this! "webServiceURL" => "https://example/api/registerPasskit", "authenticationToken" => $authenticationToken, 'boardingPass' => [ 'primaryFields' => [ [ 'key' => 'origin', 'label' => 'San Francisco', 'value' => 'SFO', ], [ 'key' => 'destination', 'label' => 'London', 'value' => 'LHR', ], ], 'secondaryFields' => [ [ 'key' => 'gate', 'label' => 'Gate', 'value' => 'F12', ], [ 'key' => 'date', 'label' => 'Departure date', 'value' => "2021-04-09T05:00-07:00", ], ], 'backFields' => [ [ 'key' => 'passenger-name', 'label' => 'Passenger', 'value' => 'Cuarta prueba v4', ], [ "changeMessage" => "%@", "label" => " ", "value" => "I will change this soon", "key" => "fieldToChange" ] ], 'transitType' => 'PKTransitTypeAir', ], 'barcode' => [ 'format' => 'PKBarcodeFormatQR', 'message' => 'Flight-GateF12-ID6643679AH7B', 'messageEncoding' => 'iso-8859-1', ], 'backgroundColor' => 'rgb(32,110,247)', 'logoText' => 'Colombia', 'relevantDate' => "2021-04-09T05:00-07:00" ]; $pass->setData($data);
// Add files to the pass package
$pass->addFile(base_path('public/images/icon.png'));
$pass->addFile(base_path('public/images/logo.png'));
$pkpass = $pass->create();
I already created the pass with the url of the web service post type. But I don’t know when I should get the push token of the iphone. If it is when the customer gives you to add pass to the wallet or if I have to do an additional process. I also don’t know if I need to enable something in my Apple account when creating the pass type ID. I would be grateful for any assistance in respect of these matters.
I don’t know how I can update a pass to get the client’s iphone push token, and then send notifications.