iOS 支付功能 回调必须添加的
下面是以Ping++ 代码为例,其他的支付方式,需要稍微的改动一下
#pragma mark - iOS9 以上-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary*)options
{
BOOL result = [UMSocialSnsService handleOpenURL:url];
if (result == FALSE) {
//调用其他SDK,例如支付宝SDK等
BOOL canHandleURL = [Pingpp handleOpenURL:url withCompletion:nil];
return canHandleURL;
}
return result;
}
#pragma mark - ios8 几以下
-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
{
BOOL result = [UMSocialSnsService handleOpenURL:url];
if (result == FALSE) {
//调用其他SDK,例如支付宝SDK等
BOOL canHandleURL = [Pingpp handleOpenURL:url withCompletion:nil];
return canHandleURL;
}
return result;
}