Paytronix internal steps for building a Push p12 Package¶
This is a description of how to use the
openssl tool to create the package file as expected by the Paytronix system on a machine running Mac OSX.
In a terminal window in a working directory of your choice run:
#!/bin/bash openssl genrsa -out private.key 2048 openssl req -new -key private.key -out req.pem echo "upload req.pem to Apple and download aps_development.cer to this directory"
When generating the signing request, use information consistent with your developer account. Under “Your Name” list the brands name. For example, we would answer these questions as such:
- Country Code: US
- State or Province Name (full name): Massachusetts
- Locality Name (eg, city): Newton
- Organization Name (eg, company): Paytronix Systems, Inc.
- Organizational Unit Name (eg, section): This can be left blank
- Common Name (e.g. server FQDN or YOUR name): Paytronix Cafe
- Email Address: This can be left blank
- A challenge password: Leave this blank
- An optional company name: This can be left blank
When finished, open the Apple developer portal and do the following things:
Create a new App ID (or find the existing App ID if you have already done so).
In the App ID choose “Create Certificate” in the Push section under either Development or Production depending on the Paytronix System you are using, then click the “Continue” button on the next page. You have already done the steps on this page.
req.pemfile to Apple.
Download the certificate file generated by Apple and copy it to your working directory. The file will be named either
aps_production.cerdepending on the environment you have chosen.
#!/bin/bash if [ ! -f aps_development.cer ]; then ls aps_development.cer exit 1; fi openssl x509 -in aps_development.cer -inform DER -out aps.pem -outform PEM cat private.key aps.pem > aps_certs.pem echo "choose a very random password." openssl pkcs12 -export -in aps_certs.pem -out package.p12 echo "send package.p12 and its associated password to Paytronix" rm private.key rm req.pem rm aps_development.cer rm aps.pem rm aps_certs.pem
You will be prompted to make a password during this step. Choose something secure. You will need to provide this password to Paytronix. Remove all files or store them somewhere secure. Provide Paytronix with the
package.p12file and the associated password.
The bash script above expects the certificate file to be named
aps_development.cer. If you are making a certificate for Production, you should update the file name in the script to