Reader small image

You're reading from  Apple Pay Essentials

Product typeBook
Published inFeb 2016
Reading LevelBeginner
Publisher
ISBN-139781785886386
Edition1st Edition
Languages
Right arrow
Author (1)
Ernest Bruce
Ernest Bruce
author image
Ernest Bruce

Ernest Bruce is an accomplished technical writer and software engineer. He has worked for 13 years at Apple, Inc., where he held the position of Senior Technical Writer writing developer documentation. At Apple, Ernest specialized in writing documentation for the Xcode toolset, focusing on the Xcode user guide, and Xcode overview, as well as unit testing documentation and sample code. He also worked extensively on API documentation for the OS X and iOS platforms. Ernest helped design and develop the Xcode help articles that aid developers in getting around the user interface of the Xcode app. Before his years at Apple, Ernest worked as a programmer for Ping, Inc., where he helped manage the manufacturing processes using APL (A Programming Language). Ernest also has extensive experience in customer service, which has been instrumental to him developing content that readers find clear and easy to read, and that makes complex concepts more approachable. Ernest is the head of Nerd Brawn, LLC, a software development company that focuses on developing platforms that help people learn about their environment and each other in innovative ways. The company is also working on new techniques to present content on desktop computers, tablets, and mobile phones.
Read more about Ernest Bruce

Right arrow

Preface

Whether you are relatively new to iOS app development or a seasoned expert, Apple Pay Essentials provides the skills that you need to easily incorporate Apple Pay into the payment workflows of your apps. This book shows you how to obtain the certificates that ensure payment information is securely transmitted between the user's iOS device, your payment gateway, and the banks involved in an Apple Pay transaction. The book teaches you how to provide a simple and consistent user experience, which expedites the time between desire and acquire. You learn how to respond to changes that the user makes to your preconfigured payment sheet, which is where the user confirms or modifies order and payment details. This book guides you through the interactions that your app makes with your payment gateway and your order-processing system. Finally, this book shows you how to design a simple order-processing web app that processes orders and payments submitted by client apps.

What this book covers

Chapter 1, Getting Started with Apple Pay, describes how online payments work in general, and it introduces Apple Pay—a simpler and more secure online payment model. This chapter also shows you how to obtain the Apple Pay merchant certificates that ensure that only the appropriate entities have access to sensitive payment information.

Chapter 2, Payment Request Workflow, describes how to create a payment request, which is an object that stores information that is critical to payment processing (such as currency and payment network requirements) and details about the customer's order. It also shows you how to manage the main elements of the Apple Pay user experience: the Apple Pay button, and the payment sheet. This chapter also explains how to get inventory details from an order-processing web app, and how to present product information to the user.

Chapter 3, Payment Authorization Workflow, shows you how your app should respond to payment sheet events, such as shipping address change, and user authorization of the payment.

Chapter 4, Payment Processing Workflow, describes the actors and operations involved in processing a payment, including your order processing web app.

Chapter 5, Designing an Order Management Server, describes the main components of an order management server, including its data structure, and client API.

Chapter 6, Apple Pay API Summary, summarizes the API that is used for Apple Pay transactions.

What you need for this book

To follow along with the content presented in this book, which is based on the book's example code, you need the hardware and software needed for iOS development: a development Mac, an iOS device that supports Apple Pay, and a recent version of the Xcode developer tools. You need to be able to build apps on your Mac and run them on the iOS device, which requires a wired connection between the computer and the device (so that Xcode can install the app on the device). When running the example app on iOS Simulator, the example app connects to the order management web app running on the computer through a URI that targets the appropriate process. When running the app on the iOS device, however, the connection must be done wirelessly. Therefore, you need to configure your development Mac as a proxy server so that HTTP requests to the order management web app from the iOS device are resolved by the web app on the computer and do not go to the wider network. The documentation in the example code explains how to configure your development Mac as a proxy server using the SquidMan proxy-server software.

Who this book is for

This book is intended for people who want to learn how to incorporate Apple Pay into their iOS apps so that their customers can pay for goods and services quickly and securely. A moderate knowledge of the iOS API and the Xcode developer tools is required.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Enter the identifier string in the ID field—for example, merchant.com.company.merchantapp."

A block of code is set as follows:

PKContact contact= [PKContact new];
contact.phoneNumber= 
  [CNPhoneNumber phoneNumberWithStringValue: @"678-555-1234"];

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

- (void) paymentAuthorizationViewControllerDidFinish:
            (PKPaymentAuthorizationViewController*) controller
{
   [self dismissViewControllerAnimated:true completion:nil];
}

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Under iOS Apps, click on Identifiers."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Apple Pay Essentials
Published in: Feb 2016Publisher: ISBN-13: 9781785886386
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Ernest Bruce

Ernest Bruce is an accomplished technical writer and software engineer. He has worked for 13 years at Apple, Inc., where he held the position of Senior Technical Writer writing developer documentation. At Apple, Ernest specialized in writing documentation for the Xcode toolset, focusing on the Xcode user guide, and Xcode overview, as well as unit testing documentation and sample code. He also worked extensively on API documentation for the OS X and iOS platforms. Ernest helped design and develop the Xcode help articles that aid developers in getting around the user interface of the Xcode app. Before his years at Apple, Ernest worked as a programmer for Ping, Inc., where he helped manage the manufacturing processes using APL (A Programming Language). Ernest also has extensive experience in customer service, which has been instrumental to him developing content that readers find clear and easy to read, and that makes complex concepts more approachable. Ernest is the head of Nerd Brawn, LLC, a software development company that focuses on developing platforms that help people learn about their environment and each other in innovative ways. The company is also working on new techniques to present content on desktop computers, tablets, and mobile phones.
Read more about Ernest Bruce