PayAbstract.php 1.48 KB
<?php

namespace WebPlugin\Pay;

abstract class PayAbstract implements PayInterface {
	
	/**
	 * 记录日志的前缀,每种支付方式都有三个项目,请求、回复成功,回复失败,如:alipay_request, alipay_success_response, alipay_error_response
	 */
	public $logProjectPrefix = '';
	
	/**
	 * 用于存储通知回调的基础url
     *
	 * @var
	 */
	public $baseNoticeUrl = "http://gray.yohobuy.com/pay/";

	/**
	 * 测试的回调地址
	 * Enter description here ...
	 * @var string
	 */
	public $testBaseNoticeUrl = "http://www.yohobuy.com/pay/";

    /**
     * 获取支付的基地址
     *
     * @param bool $isTest
     * @return string
     */
	public function getBaseNoticeUrl($isTest){
		return $isTest ? $this->testBaseNoticeUrl : $this->baseNoticeUrl;
	}

    /**
     * h(non-PHPdoc)
     * @see QPay_Utils_Interface::getPayRequestPars()
     * @param Reqparams $params
     */
	public function getPayRequestPars(Reqparams $params) {
		
	}

    /**
     * (non-PHPdoc)
     * @see QPay_Utils_Interface::parseResponse()
     * @param array $arrResponse
     * @return void
     */
	public function parseResponse(array $arrResponse){
		
	}
	
	/**
	 * (non-PHPdoc)
	 * @see QPay_Utils_Interface::convertResult()
	 */
	protected function convertResult($resultCode) {
		
	}
	
	/**
	 * (non-PHPdoc)
	 * @see QPay_Utils_Interface::verifResponse()
	 */
	protected function checkResponse(array $arrResponse){
		
	}
	
}