I am working on implementing Apple Pay for my application. Although I have everything that is mostly found out, I cannot reject the PKPaymentAuthorizationViewController, which is being authenticated. Here is my code ..
-(void) viewDidAppear:(BOOL)animated {
paymentPane = [[PKPaymentAuthorizationViewController alloc] initWithPaymentRequest:request];
paymentPane.delegate = self;
[self presentViewController:paymentPane animated:TRUE completion:nil];
}
The above function is called and successfully represents the Apple Pay View Controller for payment authentication. I executed the following methods from the delegate as follows:
-(void)paymentAuthorizationViewControllerDidFinish:(PKPaymentAuthorizationViewController *)controller {
[self dismissViewControllerAnimated:YES completion:nil];
}
- (void)paymentAuthorizationViewController:(PKPaymentAuthorizationViewController *)controller didAuthorizePayment:(PKPayment *)payment completion:(void (^)(PKPaymentAuthorizationStatus))completion {
NSLog(@"%@", [payment.token description]);
completion(PKPaymentAuthorizationStatusSuccess);
}
didAuthorizePayment, , paymentAuthorizationViewControllerDidFinish Apple View. , , ViewController . , "" Apple Pay View.
.
@interface ApplePayManager : UIViewController<PKPaymentAuthorizationViewControllerDelegate, UIAlertViewDelegate>
, ? ?
, iOS. / , !
:
http://www.raywenderlich.com/87300/apple-pay-tutorial
https://dzone.com/articles/integrating-your-ios-app-apple