I'm looking into integrating Apple Pay into a website using the new Apple Pay JS SDK. The documentation is currently pretty minimal, concerning just the API declarations and how to instantiate a new ApplePaySession
object.
Is there any example code available yet, or has anyone actually implemented this themselves yet, showing the typical API integration flow for a web application?
The only examples I've been able to find anything for all appear to be for third-party payment providers' own SDK integrations of Apple Pay.
You can pay using Apple Pay in stores, within apps and on the web, and more.
Overview. Safari supports two APIs for implementing payment requests: Apple Pay JS API, and the W3C Payment Request API. Both APIs present the same Apple Pay payment sheet on Safari, and offer nearly the same user experience.
I've published end-to-end ApplePayJS example code on github here
https://github.com/norfolkmustard/ApplePayJS
It uses PHP for the server-side part, needed for the initial vendor validation to begin the transaction. The rest is in javascript.
ApplePayJS != cash in the bank, just a means of getting a tokenised credit card from a customer. You hand that card number off to a third-party payment processor like stripe.com, braintreepayments.com, authorize.net
Cheers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With