<?php

namespace App\Classes;

use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\Client;
use Log;
use Auth;
class SendBandles{


    public function sendBandles($object,$uri,$client,$response){
        
       //send Bundles
       $object = new stdClass();
       $uri="https://payments.africastalking.com/mobile/data/request";
       $client=new Client();
       $response=$client->request('POST',$uri, ['headers' => ['Content-Type' => 'application/json','Accept'=>'application/json','apiKey' => '1ef1c6d568b18b19f104f0d13e29e75b38f8d08bf712a99257a8ac2a32925124'],
       'json' => [
           'username' => 'mobisky',
           'productName' => 'Mobile _Data',
           'recipients' => [[
               'phoneNumber' => $contact['contact'],
               'quantity'=>(int)$qnty,
               'unit'=>$unit,
               'validity'=>$validity,
             'metadata'=>$object
           ]]
       ]
     ]);

    }

}