loading
বিজ্ঞাপন

API Integration

আমাদের API ব্যবহার করতে নিচের উদাহরণ কোডগুলো অনুসরণ করুন। এখানে api-key এবং secret-key ব্যবহার করতে হবে।

PHP cURL Request Example POST
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://zachaikori.com/api/v1/fraud-check",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => array('mobile' => '01700000000'),
    CURLOPT_HTTPHEADER => array(
        'api-key: {Your api_key}',
        'secret-key: {Your secret_key}',
        'x-customer-domain: example.com'
    ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
    echo "cURL Error #:" . $err;
} else {
    echo $response;
}
                                        
Laravel HTTP Client Example POST
use Illuminate\Support\Facades\Http;

$url = "https://zachaikori.com/api/v1/fraud-check";
$api_key = "{Your api_key}";
$secret_key = "{Your secret_key}";
$mobile = "01700000000";

$response = Http::withHeaders([
    'api-key'    => $api_key,
    'secret-key' => $secret_key,
    'x-customer-domain' => request()->getHost(),
])->post($url, [
    'mobile' => $mobile,
]);

if ($response->successful()) {
    $data = $response->json();

    // Check for important messages
    if ($data['message']) {
        echo "Message: " . $data['message'];
    }

    return $data;
} else {
    return [
        'status' => 'error',
        'message' => 'API call failed',
        'error' => $response->body(),
    ];
}
                                        
WordPress Plugin Installation Step by Step
📋 পদ্ধতি ১: আপনার যদি ইতিমধ্যে WordPress সাইট থাকে

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

ধাপ ১: ZIP ফাইল ডাউনলোড করুন
   └─ উপরের "Download" বাটনে ক্লিক করুন

ধাপ ২: WordPress Admin এ লগইন করুন
   └─ https://yourwebsite.com/wp-admin
   └─ Username ও Password দিয়ে লগইন করুন

ধাপ ৩: Plugin Upload করুন
   ├─ Plugins → Add New এ ক্লিক করুন
   ├─ Upload Plugin বাটনে ক্লিক করুন
   ├─ zachaikori-fraud-check.zip সিলেক্ট করুন
   ├─ Install Now এ ক্লিক করুন
   └─ Install শেষ হলে Activate Plugin ক্লিক করুন

ধাপ ৪: API Settings করুন
   ├─ Settings → Fraud Check এ যান
   ├─ API Key দিন
   ├─ Secret Key দিন
   └─ Save Changes ক্লিক করুন

ধাপ ৫: একটি Page/Post তৈরি করুন (প্রয়োজনে)
   ├─ Pages → Add New এ যান
   ├─ Title দিন: Fraud Check
   ├─ Content area তে লিখুন: [zachaikori_fraud_check]
   ├─ Publish করুন
   └─ View Page ক্লিক করে দেখুন
                                        


Response Example

Response will be in JSON format
✅ Success Response

If the domain is allowed to use the Fraud Check API:


{
    "status": "success",
    "number": "019********",
    "message": "Important message for the user, its may be about offers, updates, notices, or account/package expiry.",
    "limit": 50,
    "life_time_request": "65",
    "used": 5,
    "total_delivery": 104,
    "total_success": 100,
    "total_canceled": 4,
    "subscription": "Free Plan",
    "data": {
        "pathao": {
            "name": "Pathao",
            "success": 43,
            "cancel": 1,
            "total": 44,
            "rate": 98,
            "customer_rating": "Excellent"
        },
        "redx": {
            "name": "RedX",
            "success": 32,
            "cancel": 2,
            "total": 34,
            "rate": 94,
            "customer_rating": "excellent_customer"
        },
        "steadfast": {
            "name": "SteadFast",
            "success": 25,
            "cancel": 1,
            "total": 26,
            "rate": 96,
            "customer_rating": "Excellent"
        },
        "paperfly": {
            "name": "PaperFly",
            "success": 0,
            "cancel": 0,
            "total": 0,
            "rate": 0,
            "customer_rating": "No History"
        }
    }
}
      
❌ Error Response (Invalid API Key)

{
    "status": "error",
    "message": "Unauthorized"
}
                                
❌ Error Response (Blocked User)

{
    "status": "error",
    "message": "আপনার অ্যাকাউন্টটি সাময়িকভাবে বন্ধ করা হয়েছে। অনুগ্রহ করে আপনার অ্যাকাউন্টটি পুনরায় সংযুক্ত করতে আমাদের সাথে যোগাযোগ করুন।"
}
                                
❌ Error Response (Unauthorized Domain)

{
    "status": "error",
    "message": "Unauthorized domain"
}
                                
⚠️ Expired Response

{
    "status": "expired",
    "message": "আপনার ফ্রি ট্রায়ালের আজকের দিনের লিমিট শেষ হয়ে গিয়েছে, পুনরায় চেক করার জন্য রাত ১২ টা পর্যন্ত অপেক্ষা করুন, অথবা আমাদের প্রিমিয়াম প্যাকেজে আপগ্রেড করুন । ধন্যবাদ !"
}
                                
বিজ্ঞাপন