PKPaymentAuthorizationStatus
General success and failure status for payment authorization.
Declaration
enum PKPaymentAuthorizationStatusOverview
You pass the payment authorization status along with related errors, if any, to the completion block in PKPaymentAuthorizationResult.
Use the PIN status constants only when working in a region that requires 6-digit PIN numbers. To authorize a payment, follow this workflow:
The app sets up the payment request and displays the authorization view controller.
The user authorizes the payment.
If the purchase amount exceeds the user’s PIN limit or if the purchase uses a currency code other than the one expected by the bank, Apple Pay prompts the user for their PIN.
The user enters their PIN.
Apple Pay calls the delegate’s paymentAuthorizationViewController(_:didAuthorizePayment:completion:) method.
The app either processes the payment or uses a third-party SDK to process the payment. During this step, the PIN number is passed to the bank as part of the PKPaymentToken object.
As soon as the payment is processed, the app calls the completion block, passing the appropriate PKPaymentAuthorizationStatus constant. If the bank reports a problem with the PIN, use the corresponding PIN status constant.
For more information on PIN requirements, check with your payment processor.
Topics
Payment authorization status constants
PKPaymentAuthorizationStatus.successPKPaymentAuthorizationStatus.failurePKPaymentAuthorizationStatus.invalidBillingPostalAddressPKPaymentAuthorizationStatus.invalidShippingPostalAddressPKPaymentAuthorizationStatus.invalidShippingContactPKPaymentAuthorizationStatus.pinRequiredPKPaymentAuthorizationStatus.pinIncorrectPKPaymentAuthorizationStatus.pinLockout