 ///  - parameter orderID:        订单id
 ///  - parameter failureHandler: 失败处理闭包
 ///  - parameter completion:     成功处理闭包
-func getChargeTokenWithChannel(channel: MalaPaymentChannel, orderID: Int, failureHandler: ((Reason, String?) -> Void)?, completion: JSONDictionary -> Void) {
+func getChargeTokenWithChannel(channel: MalaPaymentChannel, orderID: Int, failureHandler: ((Reason, String?) -> Void)?, completion: JSONDictionary? -> Void) {
     let requestParameters = [
         "action": PaymentMethod.Pay.rawValue,
         "channel": channel.rawValue
     ]
     
-    let parse: JSONDictionary -> JSONDictionary = { data in
-        return data
+    let parse: JSONDictionary -> JSONDictionary? = { data in
+        return parseChargeToken(data)
     }
     
     let resource = authJsonResource(path: "/orders/\(orderID)", method: .PATCH, requestParameters: requestParameters, parse: parse)

/// 订单JSON解析器
let parseOrderForm: JSONDictionary -> OrderForm? = { orderInfo in
    
    // 订单创建失败
    if let
        result = orderInfo["ok"] as? Bool,

    
    // 订单创建成功
    if let
        id          = orderInfo["id"] as? Int,
        teacher     = orderInfo["teacher"] as? Int,
        teacherName = orderInfo["teacher_name"] as? String,
        avatar      = orderInfo["teacher_avatar"] as? String,
        school      = orderInfo["school"] as? String,
        grade       = orderInfo["grade"] as? String,
        subject     = orderInfo["subject"] as? String,
        hours       = orderInfo["hours"] as? Int,
        status      = orderInfo["status"] as? String,
        orderId     = orderInfo["order_id"] as? String,
        amount      = orderInfo["to_pay"] as? Int,
        evaluated   = orderInfo["evaluated"] as? Bool {
        return OrderForm(id: id, orderId: orderId, teacherId: teacher, teacherName: teacherName, avatarURL: avatar, schoolName: school, gradeName: grade, subjectName: subject, orderStatus: status, amount: amount, evaluated: evaluated)
    }
    return nil
}
