Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
cordova-apple-wallet-ng
Advanced tools
Readme
This plugin provides support for adding your credit/debit cards to Apple Wallet
Adding payment passes requires a special entitlement issued by Apple. Your app must include this entitlement before you can use this class. For more information on requesting this entitlement, see the Card Issuers section at developer.apple.com/apple-pay/.
cordova plugin add cordova-apple-wallet-ng --save
In order to use it with Ionic 3, please follow this instructions
In order to use it with normal cordova based project, please define a global variable, so that you can use it without lint errors
var AppleWallet;
Simple call to check whether the app can add cards to Apple Pay.
AppleWallet.available()
.then((res) => {
// Apple Wallet is enabled and a supported card is setup. Expect:
// boolean value, true or false
})
.catch((message) => {
console.error("ERROR AVAILBLE>> ", message);
});
Simple call with the configuration data needed to instantiate a new PKAddPaymentPassViewController object.
The encryption scheme, cardholder name, and primary account suffix are required for configuration. The configuration information is used for setup and display only. It should not contain any sensitive information.
In order to get testing data check this Apple Sandbox
let data = {
cardholderName: 'Test User',
primaryAccountNumberSuffix: '1234',
localizedDescription: 'Description of payment card',
paymentNetwork: 'VISA'
}
AppleWallet.startAddPaymentPass(data)
.then((res) => {
// User proceed and successfully asked to add card to his wallet
// Use the callback response JSON payload to complete addition process
})
.catch((err) => {
// Error or user cancelled.
});
You should expect the callback success response to be as follow
{
data: {
"certificateSubCA":"Base64 string represents certificateSubCA",
"certificateLeaf":"Base64 string represents certificateLeaf"
"nonce":"Base64 string represents nonce",
"nonceSignature":"Base64 string represents nonceSignature",
}
}
This method provides the data needed to create an add payment request. Pass the certificate chain to the issuer server. The server returns an encrypted JSON file containing the card data. After you receive the encrypted data, pass it to completeAddPaymentPass
method
For more information, please check Apple docs from here
Simple call contains the card data needed to add a card to Apple Pay.
activationData
: The request’s activation data.encryptedPassData
: An encrypted JSON file containing the sensitive information needed to add a card to Apple Pay.ephemeralPublicKey
The ephemeral public key used by elliptic curve cryptography (ECC). or wrappedKey
if you are using RSA let encryptedData = {
activationData: "encoded Base64 activationData from your server",
encryptedPassData: "encoded Base64 encryptedPassData from your server",
wrappedKey: "encoded Base64 wrappedKey from your server"
}
AppleWallet.completeAddPaymentPass(encryptedData)
.then((res) => {
// callback success response means card has been added successfully,
// PKAddPaymentPassViewController will be dismissed
})
.catch((err) => {
// Error and can not add the card, or something wrong happend
// PKAddPaymentPassViewController will be dismissed
});
Please support us by giving advice on how to apply best practice to Objective-C native code.
MIT
Made with ❤️ by Hatem. Follow me on Twitter to get the latest news first! I will be happy to receive your feedback via Email ! We're always happy to hear your feedback. Enjoy!
░░░░░░░░░░░░░▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
░░░░░░░░░░█░░░░░░▀█▄▀▄▀██████░░░▀█▄▀▄▀██████
░░░░░░░░ ░░░░░░░░░░▀█▄█▄███▀░░░░░░▀█▄█▄███▀░
All copyrights reserved © 2018 | TOmas™ Inc.
FAQs
This plugin allows you to add passes and credit/debit cards to Apple Wallet
The npm package cordova-apple-wallet-ng receives a total of 6 weekly downloads. As such, cordova-apple-wallet-ng popularity was classified as not popular.
We found that cordova-apple-wallet-ng demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).