chengkun
2025-05-22 1a8aea45ebb1582c9f65d9e8dcd520002f83ae12
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
/**
 * NOP API: nuomi.integration_cashier.IntegrationCashierConsumeNotify request
 * 
 * @author sdk-maker
 * @since 1.0, 2015.12.29
 */
abstract class NuomiNopBaseRequest extends NuomiBaseRequest
{
 
    protected $nopMethod = null;
 
    /**
     * @desc 设置需要请求的HOST
     * @var string
     */
    protected $host = 'http://nop.nuomi.com/nop/server/rest';
 
 
    /**
     * @var string 输入哪个平台的接口
     */
    protected $interfaceBelongToWhichPlatform = 'nop';
 
 
    public function __construct()
    {
        $this->apiParams = array(
            'nop_appid' => 'yrO7h9xWcw',
            'nop_method' =>  $this->getNopMethod(),
            'nop_sign' => 'nuomiopenplatfomsdk',
            'nop_timestamp'=> time(),
        );
    }
 
 
 
    /**
     * @desc 获取请求nop平台的method方法
     * @return string
     */
    public function getNopMethod()
    {
        return $this->nopMethod;
    }
 
    /**
     * 获取请求的URL
     * @param string $systemParams
     * @return string
     */
    public function getUrlForNop($systemParams){
 
        $querystring = http_build_query($systemParams);
 
        //系统参数放querystring
        $url = $this->host . '?' . $querystring;
 
        return $url;
    }//function getUrlForNop() end
 
 
}