BUYApplePayHelpers Class Reference
Inherits from | NSObject |
---|---|
Conforms to | PKPaymentAuthorizationViewControllerDelegate |
Declared in | BUYApplePayHelpers.h |
– initWithClient:checkout:shop:
Initializes a helper to support Apple Pay
- (instancetype)initWithClient:(BUYClient *)client checkout:(BUYCheckout *)checkout shop:(BUYShop *)shop
Parameters
client |
A configured client |
---|---|
checkout |
The checkout which is to be completed using Apple Pay |
shop |
A shop object to alleviate the need for ApplePayHelper to retrieve it via the BUYClient |
Return Value
helper object
Declared In
BUYApplePayHelpers.h
– updateAndCompleteCheckoutWithPayment:completion:
Call this method in the PKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didAuthorizePayment:completion
- (void)updateAndCompleteCheckoutWithPayment:(PKPayment *)payment completion:(void ( ^ ) ( PKPaymentAuthorizationStatus status ))completion
Parameters
payment |
the authorized payment |
---|---|
completion |
completion block thats called after Shopify authorizes the payment |
Declared In
BUYApplePayHelpers.h
– updateCheckoutWithShippingMethod:completion:
Call this method in the PKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingMethod:completion
- (void)updateCheckoutWithShippingMethod:(PKShippingMethod *)shippingMethod completion:(void ( ^ ) ( PKPaymentAuthorizationStatus status , NSArray *methods ))completion
Parameters
shippingMethod |
The selected shipping method |
---|---|
completion |
the completion block called after shipping method is updated on the checkout |
Declared In
BUYApplePayHelpers.h
– updateCheckoutWithAddress:completion:
Call this method in the PKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingAddress:completion
- (void)updateCheckoutWithAddress:(ABRecordRef)address completion:(void ( ^ ) ( PKPaymentAuthorizationStatus status , NSArray *shippingMethods , NSArray *summaryItems ))completion
Parameters
address |
The selected shipping address |
---|---|
completion |
the completion block called after the shipping address is updated on the checkout |
Declared In
BUYApplePayHelpers.h
– updateCheckoutWithContact:completion:
Call this method in the PKPaymentAuthorizationViewControllerDelegate paymentAuthorizationViewController:didSelectShippingAddress:completion
- (void)updateCheckoutWithContact:(PKContact *)contact completion:(void ( ^ ) ( PKPaymentAuthorizationStatus , NSArray *shippingMethods , NSArray *summaryItems ))completion
Parameters
contact |
The selected contact |
---|---|
completion |
the completion block called after the shipping address is updated on the checkout |
Declared In
BUYApplePayHelpers.h
checkout
The current checkout
@property (nonatomic, strong, readonly) BUYCheckout *checkout
Declared In
BUYApplePayHelpers.h
client
The client used to communicate with Shopify
@property (nonatomic, strong, readonly) BUYClient *client
Declared In
BUYApplePayHelpers.h
lastError
The last error message
@property (nonatomic, strong, readonly) NSError *lastError
Declared In
BUYApplePayHelpers.h
shop
The shop object
@property (nonatomic, strong, readonly) BUYShop *shop
Declared In
BUYApplePayHelpers.h