Comments (3)
The es6-promise-plugin is installed. For others that run into this problem, I get it to work with statements of the form:
ApplePay.canMakePayments()
.then(function(message) {
// Apple Pay is enabled and a supported card is setup. Expect:
// 'This device can make payments and has a supported card'
console.log(message);
})
.catch(function(message) {
// There is an issue, examine the message to see the details, will be:
// 'This device cannot make payments.''
// 'This device can make payments but has no supported cards'
console.log("message);
});
from cordova-plugin-applepay.
Hi Howard,
Yes you're quite right. It's not the Promise in the older webviews that might be the problem, but it is the arrow functions that is shown in my examples.
The two snippets below are functionally identical.
Works in modern devices, or JavaScript projects using a transpiler:
.then((payment) => { });
Used in older devices, or non-transpiled projects:
.then(function(payment) { });
from cordova-plugin-applepay.
Thanks!
From: Sam Kelleher [mailto:[email protected]]
Sent: Monday, May 30, 2016 10:41 AM
To: samkelleher/cordova-plugin-applepay [email protected]
Cc: hsmith825 [email protected]; State change [email protected]
Subject: Re: [samkelleher/cordova-plugin-applepay] Cordova supported platforms lack suport for ES6 Promise (#5)
Hi Howard,
Yes you're quite right. It's not the Promise in the older webviews that might be the problem, but it is the arrow functions https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/Arrow_functions that is shown in my examples.
The two snippets below are functionally identical.
Works in modern devices, or JavaScript projects using a transpiler:
.then((payment) => { });
Used in older devices, or non-transpiled projects:
.then(function(payment) { });
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub #5 (comment) , or mute the thread https://github.com/notifications/unsubscribe/ABVFjE0117JDBeJeDxW-PqNvVSDY8Ty3ks5qGyEegaJpZM4Ip0a5 . https://github.com/notifications/beacon/ABVFjDzY-cOOzF_DA5OPU1WCvpQGJ2HHks5qGyEegaJpZM4Ip0a5.gif
from cordova-plugin-applepay.
Related Issues (20)
- Does not work with iOS 12 HOT 4
- Payment Response not returning stripetoken HOT 1
- What will be the method for setup Apple pay?
- Can't access methods
- Apple pay with stripe in ionic 3 HOT 6
- How to contribute to this repo? HOT 1
- How to process Base64 token on ApplePay.makePaymentRequest(order) ? HOT 4
- Getting error [General] Connection to remote alert view service failed
- Subscription payment HOT 1
- Trying to add PKPaymentSummaryItemTypePending support, got "PKPaymentAuthorizationViewController was nil" HOT 1
- How to charge stripe with paymentData HOT 7
- Compatibility with iOS 13 ?
- Trying to handle a timeout error before calling completeLastTransaction
- Apple store declined app: PAY END_MERCHANT_NAME
- Not working since ios 13.3 HOT 12
- Is it possible to use this plugin for subscription payments?
- Hi how I connect with stripe for applepay? HOT 2
- Payment Not Completed HOT 1
- How is this application used with payment processors like Stripe? HOT 3
- Ionic Capacitor2 Vue.js Apple Pay Question
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-applepay.