when I dock with Alipay sdk, ios can pay successfully or return to app, but I can never get a callback of let ret = await Alipay.pay (obj.alipay)
. I roughly know where the .h.m file on xcode is modified, but the native capacity is limited, please give me advice!
reactionary end:
let ret = await Alipay.pay(obj.alipay) // (ret)
if (ret.resultStatus === "9000") {
} else {
Toast.sad("")
}
xcode side:
AlipayModule.h
-sharpimport <React/RCTBridgeModule.h>
-sharpimport <React/RCTLog.h>
@interface AlipayMoudle : NSObject <RCTBridgeModule>
//+(void)handleCallback:(NSURL *)url;
@end
AlipayModule.m
-sharpimport "AlipayModule.h"
-sharpimport <AlipaySDK/AlipaySDK.h>
@implementation AlipayMoudle
RCT_EXPORT_METHOD(pay:(NSString *)orderInfo
resolver:(RCTPromiseResolveBlock)resolve
rejecter:(RCTPromiseRejectBlock)reject){
//scheme,AliSDKDemo-Info.plistURL types
NSString *appScheme = @"guyuApp";
[[AlipaySDK defaultService] payOrder:orderInfo fromScheme:appScheme callback:^(NSDictionary *resultDic) {
resolve(resultDic);
}];
}
RCT_EXPORT_MODULE(Alipay);
@end
where resolve (resultDic);
will not be triggered, ask for advice