Advertisement
diamondpedia

Contoh Callback Transaksi

Jun 19th, 2019
714
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.67 KB | None | 0 0
  1. <?php
  2.  
  3. $ip_dpedia = "172.105.239.47";
  4.  
  5. if( $_SERVER['REMOTE_ADDR'] == $ip_dpedia ){
  6.    
  7.     $content = $_POST['content'];
  8.     $json = json_decode($content,TRUE);
  9.  
  10.     $oid        = $json['oid'];
  11.     $service    = $json['service'];
  12.     $price      = $json['price'];
  13.     $status     = $json['status'];
  14.     $date       = $json['date'];
  15.     $catatan    = $json['catatan'];
  16. }
  17.  
  18. //Contoh Respon Callback
  19. {
  20.     "content"  : {
  21.         "oid"       : "2006192456",
  22.         "service"   : "TSEL Reguler Promo 1.000",
  23.         "price"     : "1350",
  24.         "status"    : "sukses",
  25.         "date"      : "2019-06-09 12:12:12",
  26.         "catatan"   : "51003515164003"
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement