Latest 1.0.0
Homepage https://github.com/ZWBNice/WBPayManager
License MIT
Platforms ios 8.0
Dependencies AlipaySDK-iOS, WechatOpenSDK
Frameworks UIKit, Foundation
Authors

Alipay and WXPay Manager
Tips: 支付宝 需要 先添加好URL Scheme
infoplist 中 添加

LSApplicationQueriesSchemes
wechatweixinalipayalipayshare

  1. appdelegate 中引入 头文件 #import
    • (BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictionary )launchOptions {
      [[WBPayManager shared] confingAppScheme:@"AppScheme"];
      [[WBPayManager shared] configWXPayIdWithWXid:@"wxKey"];
      return YES;
      }
  2. appdelegate 中添加
    • (BOOL)application:(UIApplication )app openURL:(NSURL )url options:(NSDictionary<NSString, id> )options{
      return [[WBPayManager shared] handleOpenURL:url];
      }

4.调用

[[WBPayManager shared] aliPayWithPayParam:@"" success:^(PayCode code) {

} failure:^(PayCode code, NSString * _Nonnull errorText) {

}];
PayReq* req             = [[PayReq alloc] init];
req.partnerId           = @"partnerId";
req.prepayId            = @"prepayid";
req.nonceStr            = @"noncestr";
req.timeStamp           = @"timestamp".intValue;
req.package             = @"Sign=WXPay";
req.sign                = @"sign";

[[WBPayManager shared] wxPayWithPayReq:req success:^(PayCode code) {

} failure:^(PayCode code, NSString * _Nonnull errorText) {

}];

Latest podspec

{
    "name": "WBPayManager",
    "version": "1.0.0",
    "summary": "Alipay and WXPay manager",
    "description": "Alipay and WXPay manager.",
    "homepage": "https://github.com/ZWBNice/WBPayManager",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "ifly": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/ZWBNice/WBPayManager.git",
        "tag": "1.0.0"
    },
    "source_files": [
        "Classes",
        "Classes/**/*.{h,m}"
    ],
    "exclude_files": "Classes/Exclude",
    "frameworks": [
        "UIKit",
        "Foundation"
    ],
    "static_framework": true,
    "dependencies": {
        "AlipaySDK-iOS": [],
        "WechatOpenSDK": []
    }
}

Pin It on Pinterest

Share This