paymentCouponCodeExpiredError(localizedDescription:)
Returns an error object that indicates an expired coupon.
Declaration
static func paymentCouponCodeExpiredError(localizedDescription: String? = nil) -> any ErrorParameters
- localizedDescription:
A user-readable error as a localized string.
Return Value
A new expired coupon error.
Discussion
Use this convenience method to create a payment error object instead of creating an NSError object yourself. This method indicates that the coupon code received from the Apple Pay sheet has expired.
The error you provide and its optional message appear on the Apple Pay sheet. There’s limited available space to display messages, so keep your messages concise.
See Also
Providing error information
paymentBillingAddressInvalidError(withKey:localizedDescription:)paymentContactInvalidError(withContactField:localizedDescription:)paymentShippingAddressInvalidError(withKey:localizedDescription:)paymentShippingAddressUnserviceableError(withLocalizedDescription:)paymentCouponCodeInvalidError(localizedDescription:)