售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Apple Pay Essentials
Table of Contents
Apple Pay Essentials
Credits
About the Author
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with Apple Pay
An overview of the online payment process
The Apple Pay payment workflow
Presenting the Apple Pay button
Creating the payment request
Presenting the payment sheet
Responding to order changes and payment authorization
Submitting the payment information to the payment gateway
Enabling Apple Pay in your app
Creating your app's Apple Pay merchant identifier
Installing your app's Apple Pay merchant certificate on your Mac
Enabling Apple Pay in your app's Xcode project
Summary
2. Payment Request Workflow
Getting information from an inventory service
Getting inventory information
Getting shipping information
Displaying the product card
Presenting product information
Presenting the Apple Pay button
Creating the payment request
Specifying payment details
Country and currency code
Merchant identifier and capabilities
Requiring shipping and billing information
Requiring shipping or billing addresses
Specifying shipping or billing addresses
Specifying shipping methods
Specifying summary items
Specifying custom information tied to the order
Summary
3. Payment Authorization Workflow
Actors and operations in the authorization workflow
Implementing a shared method to compute summary items
Responding to user interactions with the payment sheet
User changes shipping information
User changes shipping method
User authorizes payment request
Summary
4. Payment Processing Workflow
Actors and operations in the processing workflow
The preprocess phase
The merchant app receives the payment token
The merchant app receives the charge token from the payment gateway
The merchant app sends the order information to the order processing system
The process phase
The postprocess phase
The merchant app receives the transaction status from the order processing web app
The merchant app conveys the transaction status to the user
The merchant app dismisses the payment sheet
Summary
5. Designing an Order Management Server
Configuring an order management server web app
Defining order management data structures
Providing inventory information to clients
Processing orders from clients
Implementing secure communication
Summary
6. Apple Pay API Summary
Main classes
The PKPaymentButton class
Creating the button
+buttonWithType:style
The PKPaymentRequest class
Payment processing information
countryCode (NSString*)
currencyCode (NSString*)
merchantCapabilities (PKMerchantCapability)
merchantIdentifier (NSString*)
supportedNetworks (NSArray<NSString*>*)
Payment summary items
paymentSummaryItems (NSArray<PKPaymentSummaryItem*>*)
The required address fields
requiredBillingAddressFields (PKAddressField), requiredShippingAddressFields (PKAddressField)
Billing and shipping contacts
billingContact (PKContact*), shippingContact (PKContact*)
Shipping methods
shippingMethods (NSArray<PKShippingMethod*>*)
Shipping type
shippingType (PKShippingType)
Application data
applicationData (NSData*)
The PKPaymentSummaryItem class
Creating a summary item
+summaryItemWithLabel:amount:
+summaryItemWithLabel:amount:type:
Summary item components
label (NSString*)
amount (NSDecimalNumber*)
Pending or final
type (PKPaymentSummaryItemType)
The PKPaymentMethod class
Card tame
displayName (NSString*)
Card type
type (PKPaymentMethodType)
Payment network
network (NSString*)
Payment pass
paymentPass (PKPaymentPass*)
The PKShippingMethod class
User-friendly description
detail (NSString*)
App-level identifier
identifier (NSString*)
The PKPaymentAuthorizationViewController class
Determining Apple Pay support
+canMakePayments
+canMakePaymentsUsingNetworks:
+canMakePaymentsUsingNetworks:capabilities:
Initializing and presenting
-initWithPaymentRequest:
-initWithPaymentRequest:
Payment sheet delegate
delegate id <PKPaymentAuthorizationViewControllerDelegate>
The PKPayment class
Payment information
token (PKPaymentToken*)
Billing and shipping contacts
billingContact (PKContact*)
shippingContact (PKContact*)
shippingMethod
The PKPaymentToken class
Encrypted payment information
paymentData (NSData*)
Payment method and transaction identifier
paymentMethod (PKPaymentMethod*)
transactionIdentifier (NSString*)
Payment sheet user event protocol
The PKPaymentAuthorizationViewControllerDelegate protocol
The user chooses a payment card
-paymentAuthorizationViewController:didSelectPaymentMethod: completion:
The user selects a shipping address
-paymentAuthorizationViewController:didSelectShippingContact: completion:
The user selects a shipping method
-paymentAuthorizationViewController:didSelectShippingMethod: completion:
The user authorizes the payment request
-paymentAuthorizationViewControllerWillAuthorizePayment:
-paymentAuthorizationViewController:didAuthorizePayment: completion:
The payment sheet is done
-paymentAuthorizationViewControllerDidFinish:
Auxiliary classes
The PKContact class
Contact address components
emailAddress (NSString*)
name (NSPersonNameComponents*)
phoneNumber (CNPhoneNumber*)
postalAddress (CNPostalAddress*)
The NSPersonNameComponents class
Person name components
namePrefix (NSString*)
givenName (NSString*)
middleName (NSString*)
familyName (NSString*)
nameSuffix (NSString*)
nickname (NSString)
phoneticRepresentation (NSPersonNameComponents*)
The CNPhoneNumber class
Creating a phone number
+phoneNumberWithStringValue:
Phone number string
stringValue (NSString*)
The CNPostalAddress class
Postal address components
street (NSString*)
city (NSString*)
state (NSString*)
postalCode (NSString*)
country (NSString*)
ISOCountryCode (NSString*)
Summary
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜