<?php
namespace Common\Base\Pay;
/*
*֧ص
*
*/
abstract class PayBase{
	private function pluginwap() {
		$root  =  static :: getFileDir();//ȡļ·
		list(,$module) = explode('plugins',$root);
		return '/plugins/'.trim($module,'/,\\').'/wap/';
	}
	function successurl() {//֧ɹתַ
		$wap = $this->pluginwap();
		return $wap.'success.html';
	}
	function failurl() {
		$wap = $this->pluginwap();
		return $wap.'fail.html';//ʧַܵ
	}
	function detailurl() {
		$wap = $this->pluginwap();
		return $wap.'detail.html';//ʧַܵ
	}
	abstract function selectOrderBySn($order_sn); //ѯӿ
	abstract function saveOrder($orderinfo); //֧ɹص涩ӿ
	abstract function payresult($group_sn);//֧ɹسɹҳ ѯϵϢӿ
	abstract function selectOrderByReturnSn($return_sn) ; //˿ŲѯϢ
	abstract function saveReturnOrder($data,$return_type) ; //˿ŲѯϢ return_type ˿ɷص״̬ true ɹ
	
	abstract function getFileDir();
	/*ʵ
	*	public function getFileDir(){
			return dirname(__FILE__);
		}
	*
	*
	*
	*/
}