$url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $data,
CURLOPT_HTTPHEADER => $headers,
CURLOPT_TIMEOUT => 10,
]);
$resp = curl_exec($ch);
curl_close($ch);
return json_decode($resp, true);
}
$firstName = ucfirst(strtolower(randomString(rand(6, 10))));
$num = rand(6, 9) . rand(100000000, 999999999);
$email = strtolower($firstName) . rand(1, 9999) . "@gmail.com";
$data1 = '{"msisdn":"'.$num.'","firstName":"'.$firstName.'","lastName":"","emailId":"'.$email.'","pinCode":"122001","consent1":1,"ssoId":"NA"}';
$resp1 = httpCall("https://web.myfidelity.in/api/v1/hul-lakme/save-user-detail", $data1, $num);
if ($resp1['msg'] === 'SAVE_USER_DETAIL_SUCCESS') {
$data2 = '{"msisdn":"'.$num.'","answersMap":{"trivia1":{"answer":"Dry & Flaky Skin","question":"What is your biggest skincare concern?"},"trivia2":{"answer":"26 - 35 years old","question":"What is your age range?"}}}';
$resp2 = httpCall("https://web.myfidelity.in/api/v1/hul-lakme/save-answers", $data2, $num);
if ($resp2['msg'] === 'SUCCESS') {
$data3 = '{"vpa":"' . $_GET['upi'] . '"}';
$resp3 = httpCall("https://web.myfidelity.in/api/v1/hul-lakme/save-upi-info", $data3, $num);
if ($resp3['msg'] === 'SUCCESS') {
$data4 = '{"redemptionType":"CASHBACK"}';
$resp4 = httpCall("https://web.myfidelity.in/api/v1/hul-lakme/redemption", $data4, $num);
if ($resp4['msg'] === 'The cashback will be credited to your UPI linked bank account within 72 hours.') {
echo "
₹" . $resp4['data']['redemptionValue'] . " Claimed successfully!
";
echo "";
exit;
} else {
echo "" . $resp4['msg'] . "
";
echo "";
exit;
}
} else if ($resp3['msg'] == 'Vpa already exits') {
echo "Already Claimed!
";
echo "";
exit;
} else {
echo "" . $resp3['msg'] . "
";
echo "";
exit;
}
} else {
echo "" . $resp2['msg'] . "
";
echo "";
exit;
}
} else {
echo "" . $resp1['msg'] . "
";
echo "";
exit;
}
} else {
echo 'PayTm Ads CashBack
';
}
?>