<?php
/*
 * Created on 2016-5-19
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
namespace PHPEMS;
set_time_limit(0);
class action extends app
{
	public function display()
	{
        $this->pdo = \PHPEMS\ginkgo::make('pepdo');
	    $action = $this->ev->url(3);
		if(!method_exists($this,$action))
		$action = "index";
		$this->$action();
		exit;
	}
	
	public function searchimg()
	{
		$img = base64_encode(file_get_contents('test.jpg'));
		$baidu = \PHPEMS\ginkgo::make('baidu');
		$res = $baidu->searchItemImg(array('image' => $img));
		print_r($res);
	}

	public function index()
	{
		$mppay = \PHPEMS\ginkgo::make('mppay');
		$orders = \PHPEMS\ginkgo::make('orders','bank');
		$openid = $mppay->getmpopenid();
		$order = $orders->getOrderById('20221109172822257');
		$info = $mppay->outMpPay($order);
		print_r($info);
		exit;
	}
}


?>
