<?php
namespace xh\run\server\controller;
use xh\library\request;
use xh\library\mysql;
use xh\unity\cog;
use xh\library\functions;
use xh\unity\sms;
use xh\unity\encrypt;
use xh\unity\callbacks;
use xh\library\url;
use xh\library\redis;


//支付宝-全自动版-服务端
class ddpayAutomatic{
    
    private $mysql;
    
    public function __construct(){
        $this->mysql = new mysql();
    }
    


    

	public function getRegular($str, $regularStr){
		preg_match_all ($regularStr, $str, $pat_array, PREG_PATTERN_ORDER);
		return ($pat_array);
	}
	
    
    //上载商户钉钉订单
    public function uploadOrder(){
		
		
		$mark = request::filter('request.mark');
		$remark= substr($mark,strripos($mark,"|")+1);

		file_put_contents("api/log/automatic/".$remark."shdd.txt", json_encode($_POST));
 } 
      //上载服务钉钉订单
    public function uploadfwOrder(){
		
	    $mark = request::filter('request.mark');
		$remark= substr($mark,strripos($mark,"|")+1);
	
		file_put_contents("api/log/service/".$remark."fwdd.txt", json_encode($_POST));
		

		
	 
    }   
   
    
}
