SHARE
TWEET

Untitled

echaa26 May 19th, 2019 111 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. require '../config.php';
  3.  
  4. $cekmutasi = $is->query("SELECT * FROM deposit WHERE provider = 'OVO' AND status = 'Pending'");
  5.  
  6. while($mutasi = $cekmutasi->fetch_assoc()) {
  7.     $data = array(
  8.        
  9.         "search" => array(
  10.            
  11.             "date" =>   array(
  12.                
  13.                 "from" => date($mutasi['date']),
  14.                 "to" => date($mutasi['date'])
  15.                 ),
  16.             "account_number" => "083142182276",
  17.             "amount" => $mutasi['quantity']
  18.             )
  19.         );
  20.        
  21. $ch = curl_init();
  22. curl_setopt_array($ch, array(
  23.    
  24.     CURLOPT_URL => "https://api.cekmutasi.co.id/v1/ovo/search",
  25.     CURLOPT_POST => TRUE,
  26.     CURLOPT_POSTFIELDS => http_build_query($data),
  27.     CURLOPT_HTTPHEADER => ["API-KEY:d673c04d0e7edacb81663caf8bb77d9b"],
  28.     CURLOPT_SSL_VERIFYHOST => 0,
  29.     CURLOPT_SSL_VERIFYPEER => 0,
  30.     CURLOPT_RETURNTRANSFER => TRUE,
  31.     CURLOPT_HEADER => FALSE,
  32.     )
  33.   );
  34.   $chresult = curl_exec($ch);
  35.   curl_close($ch);
  36.  
  37.   echo $chresult;
  38. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top