1092, "act" => "refill", "op" => "add_electric", 'order_sn' => $this->make_sn(), 'notifyurl' => 'https://www.xyzshops.cn' . '/mobile/notify/innercb.php', 'cardno' => '1004638637', 'amount' => 200, 'company_type' => 'nation', 'use_type' => 'home', 'card_id' => '051818', 'province' => 1, 'city' => '北京市' ]; $proxy = new refill_proxy('210fe406954220f56085997d6a4c5b80'); // $proxy->send(BASE_SITE_URL . "/mobile/index.php",$params); $proxy->send('https://www.xyzshops.cn' . "/mobile/index.php",$params); } public function testNet() { $params = [ 'mchid' => 1092, "act" => "refill", "op" => "add_electric", 'order_sn' => $this->make_sn(), 'notifyurl' => 'https://www.xyzshops.cn/mobile/callback/testcb.php', 'cardno' => '1004638637', 'amount' => 100, 'company_type' => 'south', 'use_type' => 'home', 'card_id' => '051818', 'province' => 1 ]; $x = http_request(BASE_SITE_URL . "/mobile/index.php",$params); } public function testSinopec_coupon() { $params = [ 'mchid' => 1092, "act" => "refill", "op" => "add_sinopec_coupon", 'order_sn' => $this->make_sn(), 'notifyurl' => 'https://www.xyzshops.cn/mobile/callback/testcb.php', 'cardno' => '13699279618', 'amount' => 5, 'province' => 19 ]; $proxy = new refill_proxy('210fe406954220f56085997d6a4c5b80'); $proxy->send('https://www.xyzshops.cn' . "/mobile/index.php",$params); } private function make_sn() { return mt_rand(1000, 9999) . sprintf('%010d', time()) . sprintf('%06d', (float)microtime() * 1000000); } }