Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions ios/Classes/TobiasPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,25 @@ -(void) pay:(FlutterMethodCall*)call result:(FlutterResult)result{

-(void) _pay:(FlutterMethodCall*)call result:(FlutterResult)result urlScheme:(NSString *)urlScheme{
self.callback = result;

__weak TobiasPlugin* __self = self;

[[AlipaySDK defaultService] payOrder:call.arguments fromScheme:urlScheme callback:^(NSDictionary *resultDic) {

[__self onPayResultReceived:resultDic];
}];

}

-(void) _auth:(FlutterMethodCall*)call result:(FlutterResult)result urlScheme:(NSString *)urlScheme{
self.callback = result;

__weak TobiasPlugin* __self = self;

[[AlipaySDK defaultService] auth_V2WithInfo:call.arguments
fromScheme:urlScheme
callback:^(NSDictionary *resultDic) {}];
callback:^(NSDictionary *resultDic) {
[__self onAuthResultReceived:resultDic];
}];
}

-(void) getVersion:(FlutterMethodCall*)call result:(FlutterResult)result{
Expand Down