<?php namespace Place\Lib;
use Dever;
use Place;
class Callback
{
    # 资源支付成功
    public function resource($place, $order_num, $app, $status, $body = array())
    {
        Dever::input('authorization', 'is_string', '入口码', $place);
        $order = Dever::db('order', $app)->find(array('order_num' => $order_num));
        if ($order && $order['status'] == 1) {
            $state = Dever::load('order', $app)->success($order, $status);
            if (!$state) {
                return '订单更新失败';
            }
        }
    }
}