中石油简单接口
This commit is contained in:
58
app/Admin/Controllers/PetroController.php
Normal file
58
app/Admin/Controllers/PetroController.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
namespace App\Admin\Controllers;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use XuanChen\Petro;
|
||||
|
||||
class PetroController
|
||||
{
|
||||
|
||||
public function index(Request $request)
|
||||
{
|
||||
try {
|
||||
|
||||
// $res = Petro::Bill()->setParams([
|
||||
// 'matchDate' => Carbon::now()->format('Ymd'),
|
||||
// 'pageNo' => 1,
|
||||
// 'dzmaxResult' => 1000,
|
||||
// 'random' => Str::random(6),
|
||||
// ])->start();
|
||||
// dd($res);
|
||||
|
||||
// dd('作废');
|
||||
// $res = Petro::Invalid()->setParams([
|
||||
// 'cxcouponNo' => '61578832475977235',
|
||||
// 'random' => Str::random(6),
|
||||
// ])->start();
|
||||
// dd($res);
|
||||
|
||||
// dd('查询');
|
||||
$res = Petro::Detail()->setParams([
|
||||
'couponNo' => '61578832475977235',
|
||||
'random' => Str::random(6),
|
||||
])->start();
|
||||
//
|
||||
dd($res);
|
||||
// $grant = [
|
||||
// 'requestCode' => 'Z591xRQ9fv1u',
|
||||
// 'tradeId' => 111222,
|
||||
// 'ticketSum' => 1,
|
||||
// 'amount' => 10,
|
||||
// 'random' => Str::random(6),
|
||||
// ];
|
||||
//
|
||||
// $res = Petro::Grant()->setParams($grant)->start();
|
||||
// dd($res);
|
||||
|
||||
} catch (\Exception $exception) {
|
||||
dd('error'.$exception->getMessage());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user