Latest 2.0.0
Homepage https://github.com/fox-one/foxone-pay-ios-sdk
License Apache License 2.0
Platforms ios 9.0, requires ARC
Dependencies Alamofire, SwiftyJSON, SwiftyRSA, CryptoSwift
Authors

Fox.ONE Pay SDK for iOS

Pay SDK 是加密货币支付解决方案的基础 SDK。基于Pay SDK 可以方便商户,开发者快速的集成数字化钱包。

  • 转入
  • 转出
  • 资产总览
  • 交易记录
  • 汇率
  • PIN码

集成到你的应用

确保你安装了最新的 CocoaPods :

在 Podfile 文件中添加:

pod 'FoxOnePaySDK'

在终端执行 pod install

在 App 中使用 SDK

  1. 商户平台中注册账户,通过验证之后,并且填写商户信息提交审核。

  2. 申请审核通过之后会发送 AppSecret 给您, AppSecret 是访问支付后台的令牌。

  3. 在您的应用中注册 SDK

import FoxOnePaySDK

//Register
PaySDK.registerSDK(key: "AppSerect", delegate: self)
  1. 实现 Pay SDK Delegate
extension AppDelegate: PaySDKProtcol {
    //session token 
    func f1AccessToken() -> String {
        return "" // 通过支付后端申请的Token
    }

    func f1PIN() -> String {
        return  "" // 用户的PIN码
    }
}
  1. 调用钱包的服务
// 获取用户钱包
PaySDKService.getAssets { completion in
            switch completion {
            case .success(let assets):
                self.handle(assets: assets)
            case .failure:
                break
            }
        }

具体 API 参考 和错误码

  • API – The PaySDKService API

Latest podspec

{
    "name": "FoxOnePaySDK",
    "version": "2.0.0",
    "summary": "FoxOne Pay SDK",
    "description": "FoxOne Pay SDK for iOS",
    "homepage": "https://github.com/fox-one/foxone-pay-ios-sdk",
    "license": "Apache License 2.0",
    "authors": {
        "moubuns": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/fox-one/foxone-pay-ios-sdk.git",
        "tag": "2.0.0"
    },
    "source_files": "paySDK/**/*.swift",
    "resources": "paySDK/Resource/**/*.*",
    "swift_version": "5.0",
    "requires_arc": true,
    "dependencies": {
        "Alamofire": [],
        "SwiftyJSON": [],
        "SwiftyRSA": [],
        "CryptoSwift": []
    }
}

Pin It on Pinterest

Share This