Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $client = new Client(); //GuzzleHttp\Client
- $api_url = config('lunaz.api_url');
- $app_code = config('lunaz.app_code');
- $merchant_code = config('lunaz.merchant_code');
- $app_key = config('lunaz.app_key');
- $signature = hash('sha256', $merchant_code.hash('sha256', $app_key));
- $params = [
- 'offline' => false,
- 'code' => $app_code,
- 'signature' => $signature
- ];
- $result = $client->post($api_url.'trans/channel', [
- 'headers' => [
- 'Content-Type' => 'x-www-form-urlencoded',
- 'Accept'=> 'application/json'
- ],
- 'form_params' => $params
- ]);
- $response = json_decode($result->getBody());
- return response()->json($response);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement