CocoaPods trunk is moving to be read-only. Read more on the blog, there are 9 months to go.
| TestsTested | ✗ |
| LangLanguage | Obj-CObjective C |
| License | MIT |
| ReleasedLast Release | Jun 2017 |
Maintained by jeff_njut.
An easy way for calling pay API
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[FJPayMgr sharedInstance] setWechatAppScheme:@"wxaXXXXXXXX"];
[[FJPayMgr sharedInstance] setAppScheme:@"schemeXXXXXXXX"];
}
- (BOOL)commonapplication:(UIApplication *)app openURL:(NSURL*)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
return [WXApi handleOpenURL:url delegate:[FJPayMgr sharedInstance]];
}
NSString *orderString = @"body=......&_input_charset=\"utf-8\"¬ify_url=......\"RSA\"";
[[FJPayMgr sharedInstance] setAppScheme:@"schemeXXXXXXXX"];
[[FJPayMgr sharedInstance] pay:FJPayType_Alipay weixinPayData:nil alipayOrderString:orderString completion:^(FJPayResult result) {
NSLog(@"%ld", (long)result);
}];
WechatpayData *paydata = [[WechatpayData alloc] init];
paydata.appid = @"wxaschemeXXXXXXXX";
paydata.partnerid = @"schemeXXXXXXXX";
paydata.package = @"Sign=WXPay";
paydata.noncestr = @"XXXXXXXX";
paydata.sign = @"XXXXXXXX";
paydata.prepayid = @"XXXXXXXX";
paydata.timestamp = 1488851934;
[[FJPayMgr sharedInstance] pay:FJPayType_Wechat weixinPayData:paydata alipayOrderString:nil completion:^(FJPayResult result) {
NSLog(@"%ld", (long)result);
}];if encountered , -canOpenURL: failed for URL: "alipay://" - error: "This app is not allowed to query for scheme alipay" info.plist中增加SSO白名单
Feel free to open an issue or pull request, if you need help or there is a bug.
FJPay is available under the MIT license. See the LICENSE file for more info.
The MIT License (MIT)
Copyright (c) 2017 Jeff
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.