//
//  FastWechatDelegator.m
//  react-native-fast-wechat
//
//  Created by _sseon on 2024/3/30.
//

#import "FastWechatDelegator.h"

@implementation FastWechatDelegator

+ (NSString *)event {
    return @"fast_wechat_delegator_event";
}
+ (void) setEvent:(NSString *)newValue
{
    //ignore
}

+ (void)handleReq:(nonnull BaseResp *)req {
}

+(void) handleResp: (BaseResp *)resp;
{
    if ([resp isKindOfClass:PayResp.class]) {
      //handle pay result
        [NSNotificationCenter.defaultCenter postNotificationName:FastWechatDelegator.event object:nil userInfo:@{@"type": @"pay",@"code": [NSNumber numberWithInt:resp.errCode]}];
    }
}

@end
