Replies: 2 comments 8 replies
-
Hi @kh3m-7714, thanks for using passkit-generator! The phase of updating a pass cannot be achieved by using passkit-generator alone. You must integrate it Apple Wallet web services, notifications (apns) and a database. In order to listen to the routes of Apple Wallet Web Services, I've created another package that abstracts them in different frameworks (express, fastify, hono, ...). You can find it here: https://github.com/alexandercerutti/passkit-webservice-toolkit These two packages alone, tho, won't let you achieve the full pass update functionality. I suggest you to give a look at this Apple Developer page, which will give you more details about how you should proceed in the implementation and how to integrate the several pieces of the puzzle. Let me know if I can help you in any other way |
Beta Was this translation helpful? Give feedback.
-
Hey sir, Code async function createPassTemplate(data) {
try {
const certificates = await getCertificates();
let icon_url = bucket_baseurl + process.env.IMAGE_URL
let thumbnail_url = bucket_baseurl + data?.imgLink
const icon_image_promise = axios.get(icon_url, {
responseType: 'arraybuffer'
});
const thumbnail_image_promise = axios.get(thumbnail_url, {
responseType: 'arraybuffer'
});
let [icon_resp, thumbnail_resp] = await Promise.all([icon_image_promise, thumbnail_image_promise])
const icon_buffer = Buffer.from(icon_resp.data, 'binary');
const background_buffer = await sharp(thumbnail_resp.data)
.png()
.resize(1032, 336) //
.toBuffer();
let PassData = {
"pass.json": JSON.stringify({
"formatVersion": 1,
"passTypeIdentifier": passId,
"serialNumber": data.serial_no,
"teamIdentifier": team_id,
"webServiceURL": `${process.env.webServiceURL}`,
"authenticationToken": `test${data.serial_no}`,
"organizationName": "Test",
"description": "test card",
"logoText": "Sample",
"foregroundColor": "rgb(255, 255, 255)",
"backgroundColor": "rgb(255, 161, 38)",
"storeCard": {
}
}),
"icon.png": icon_buffer,
"[email protected]": icon_buffer,
"logo.png": icon_buffer,
"[email protected]": icon_buffer,
"background.png": background_buffer,
};
return new PKPass(PassData, {
wwdr: certificates.wwdr,
signerCert: certificates.signerCert,
signerKey: certificates.signerKey,
signerKeyPassphrase: certificates.signerKeyPassphrase,
});
} catch (error) {
return error
}
} I think i am missing something, but i am unable to figure it out, Please help me achieve it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi sir,
I have generate Generic passes successfully it is working fine.
But i just need to modify it and update it many times as per my project requirements
I have gone through documentation and examples also.
still i am not able to get it. How upload procedure work for this.
Could you please guide me?
Beta Was this translation helpful? Give feedback.
All reactions