Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $api_key = "12345678"; // API Key Anda
- $order_id = "12345678"; // ID Pesanan yang ingin dicek.
- $order_postdata = "key=$api_key&action=status&order_id=$order_id";
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, "https://arifahpedia.com/api/pulsa.php");
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $order_postdata);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- $chresult = curl_exec($ch);
- curl_close($ch);
- $order_data = json_decode($chresult, true);
- if ($order_data['error'] == TRUE) {
- echo "ORDER GAGAL, PESAN : ".$order_data['error'];
- } else {
- echo "ORDER SUKSES, ORDER ID : ".$order_data['status'];
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement