DZPaySDK 1.0.2

DZPaySDK 1.0.2

测试已测试
语言语言 Obj-CObjective C
许可 MIT
发布最后发布2016年11月

mrLIHUAN 维护。



DZPaySDK 1.0.2

  • mrLIHUAN

支付中心

版本要求

iOS SDK 要求 iOS 8.0 及以上版本

接入方法

安装

额外配置

  1. iOS 9 以上版本如需使用支付宝和微信渠道,需要在 Info.plist 中添加以下代码

    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>weixin</string>
        <string>wechat</string>
        <string>alipay</string>
        <string>alipays</string>
        <string>mqq</string>
    </array>
    
  2. iOS 9 对 http 协议的访问进行了限制,如果 App 需要访问 http://,需要在 Info.plist 中添加如下代码

    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>
    
  3. 在 AppDelegate 中编写回调方法

    func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool {
        let annotation = options["UIApplicationOpenURLOptionsSourceApplicationKey"] as! NSString
        if(annotation .isEqualToString("com.tencent.xin")){
            return WXApi.handleOpenURL(url, delegate: TeldPayManager.sharedManager())
        }else if(annotation .isEqualToString("com.alipay.iphoneclient")){
            AlipaySDK .defaultService().processAuthResult(url, standbyCallback: { (dic) -> Void in
            })
        }
        return true;
    }