Hi,
I want to show apple pay action sheet while making payment. But, Now it is not showing default one. I need a sample code for showing apple pay default action sheet.
Thanks, Vimal M
Hi vimalmurugan1761,
This is handled by Apple – by the PKPaymentAuthorizationViewController class
https://developer.apple.com/library/prerelease/ios/ApplePay_Guide/Authorization.html#//apple_ref/doc/uid/TP40014764-CH4-SW3
from our SDK ..
// DISPLAY THE APPLE PAY AUTHORIZATION SHEET (which prompts the user to authorize via TouchID)
BOOL bPaymentOK = [appDelegate.pePaymentProcessor presentPaymentAuthorizationViewControllerWithPaymentRequest:pmtRqst presentingController:self delegate:self];
// If fails then there is something wrong with your payment request
if( !bPaymentOK ) {
self.alert = [[UIAlertView alloc] initWithTitle:@"Error"
message:@"Payment request was rejected by Apple Pay server" delegate:self
cancelButtonTitle:@"Dismiss"
otherButtonTitles:nil];
[self.alert show];
}
Thanks and Regards,
Nilesh Dafe
Hi vimalmurugan1761,
This is handled by Apple – by the PKPaymentAuthorizationViewController class
https://developer.apple.com/library/prerelease/ios/ApplePay_Guide/Authorization.html#//apple_ref/doc/uid/TP40014764-CH4-SW3
from our SDK ..
// DISPLAY THE APPLE PAY AUTHORIZATION SHEET (which prompts the user to authorize via TouchID)
BOOL bPaymentOK = [appDelegate.pePaymentProcessor presentPaymentAuthorizationViewControllerWithPaymentRequest:pmtRqst presentingController:self delegate:self];
// If fails then there is something wrong with your payment request
if( !bPaymentOK ) {
self.alert = [[UIAlertView alloc] initWithTitle:@"Error"
message:@"Payment request was rejected by Apple Pay server" delegate:self
cancelButtonTitle:@"Dismiss"
otherButtonTitles:nil];
[self.alert show];
}
Thanks and Regards,
Nilesh Dafe