Pisah server penyimpanan dan update payment gateway
This commit is contained in:
@@ -27,8 +27,8 @@ foreach ($whatsapp as $waKey) {
|
||||
|
||||
$access_token = $waKey['token_access'];
|
||||
$phone_number_id = $waKey['number_id'];
|
||||
$url = "https://graph.facebook.com/v17.0/$phone_number_id/messages";
|
||||
$data = json_decode($pesan['pesan'], true);
|
||||
$url = "https://graph.facebook.com/v20.0/$phone_number_id/messages";
|
||||
$reply = json_decode($pesan['pesan'], true);
|
||||
|
||||
$ch = curl_init($url);
|
||||
curl_setopt($ch, CURLOPT_POST, true);
|
||||
@@ -37,7 +37,7 @@ foreach ($whatsapp as $waKey) {
|
||||
"Content-Type: application/json"
|
||||
]);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($reply));
|
||||
|
||||
$response = curl_exec($ch);
|
||||
|
||||
@@ -57,10 +57,15 @@ foreach ($whatsapp as $waKey) {
|
||||
}
|
||||
}
|
||||
|
||||
echo "<pre>";
|
||||
print_r($responseData);
|
||||
echo "</pre>";
|
||||
|
||||
// kirim ke aplikasi 2
|
||||
forwardToApp2([
|
||||
"data" => $data,
|
||||
"respon" => $response
|
||||
"data" => $reply,
|
||||
"phone_id" => $phone_number_id,
|
||||
"respon" => $response
|
||||
]);
|
||||
|
||||
curl_close($ch);
|
||||
|
||||
Reference in New Issue
Block a user