fix:1、接入合作方的sdk。2、支付逻辑接入sdk中的接口

This commit is contained in:
2026-05-09 09:37:34 +08:00
parent 1599bf4bbb
commit ee55c03120
1011 changed files with 167108 additions and 33552 deletions
+16 -8
View File
@@ -34,14 +34,22 @@ static const char* stringFromdictionary(NSDictionary* dictionary) {
static NSDictionary* dictionaryFromNSError(NSError* error) {
if(error){
NSInteger code = [error code];
NSString *localizedDescription = [error localizedDescription];
NSDictionary *errorDictionary = @{
@"code" : @(code) ?: @(-1),
@"localizedDescription" : localizedDescription,
};
return errorDictionary;
NSMutableDictionary *errorDictionary = [NSMutableDictionary dictionary];
errorDictionary[@"code"] = @(error.code);
errorDictionary[@"localizedDescription"] = error.localizedDescription ?: @"";
// Include userInfo fields for enhanced error reporting (iOS SDK 6.17.8+)
if (error.userInfo[@"error_code"]) {
errorDictionary[@"error_code"] = error.userInfo[@"error_code"];
}
if (error.userInfo[@"error_message"]) {
errorDictionary[@"error_message"] = error.userInfo[@"error_message"];
}
if (error.userInfo[@"invalid_fields"]) {
errorDictionary[@"invalid_fields"] = error.userInfo[@"invalid_fields"];
}
return errorDictionary;
}
return nil;