diff --git a/ios/Classes/WechatKitPlugin.m b/ios/Classes/WechatKitPlugin.m index 116bc03..9957597 100644 --- a/ios/Classes/WechatKitPlugin.m +++ b/ios/Classes/WechatKitPlugin.m @@ -612,19 +612,17 @@ - (void)onResp:(BaseResp *)resp { [dictionary setValue:openBusinessWebviewResp.result forKey:ARGUMENT_KEY_RESULT_RESULTINFO]; } [_channel invokeMethod:METHOD_ONOPENBUSINESSWEBVIEWRESP arguments:dictionary]; - } else { + } #ifndef NO_PAY - if ([resp isKindOfClass:[PayResp class]]) { - // 支付 - if (resp.errCode == WXSuccess) { - PayResp *payResp = (PayResp *)resp; - [dictionary setValue:payResp.returnKey - forKey:ARGUMENT_KEY_RESULT_RETURNKEY]; - } - [_channel invokeMethod:METHOD_ONPAYRESP arguments:dictionary]; + else if ([resp isKindOfClass:[PayResp class]]) { + // 支付 + if (resp.errCode == WXSuccess) { + PayResp *payResp = (PayResp *)resp; + [dictionary setValue:payResp.returnKey forKey:ARGUMENT_KEY_RESULT_RETURNKEY]; } -#endif + [_channel invokeMethod:METHOD_ONPAYRESP arguments:dictionary]; } +#endif } #pragma mark - WechatAuthAPIDelegate