where(['order_id' => $order['order_id']])->find(); if(!empty($item)) { $ret = []; $ret['接收卡'] = $item['receive_card_no']; $ret['卡类别'] = mtopcard\scard_type($item['receive_card_type']); $ret['卡号'] = $item['card_no']; $ret['卡密'] = $item['card_key']; return $ret; } } elseif($handler['type'] == 'member_card') { return []; } else { return []; } } else { return []; } } //取消虚拟订单时的状态 public static function unfreeze_extra($order) { global $config; $handlers = $config['vgoods_handlers']; $goods_id = $order['goods_id']; if(array_key_exists($goods_id,$handlers)) { $handler = $handlers[$goods_id]; if($handler['type'] == 'oil_card' || $handler['type'] == 'phone_card') { $mod_card = Model('card_key'); $item = $mod_card->where(['order_id' => $order['order_id']])->find(); if(!empty($item)) { $card_id = $item['card_id']; $mod_card->reuse($card_id); } } } } }