notification Orders on Whatsapp admin
etape 1 :
www.callmebot.com
You need to get the apikey form the bot before using the API:
Add the phone number +34 644 52 74 88 into your Phone Contacts. (Name it it as you wish)
Send this message "I allow callmebot to send me messages" to the new Contact created (using WhatsApp of course)
Wait until you receive the message "API Activated for your phone number. Your APIKEY is 123123" from the bot. As this is still in beta testing, the activation can take up to 2 minutes.
The WhatsApp message from the bot will contain the apikey needed to send messages using the API.
You can send text messages using the API after receiving the confirmation.
etape 2:
/app/Http/Controllers/OrderController.php
simple add this code on OrderController.php
after this line
$this->sendPushNotificationStoreOwner($restaurant_id, $unique_order_id); line 350
replace XXXX to your WhatsApp number & apikey
CODE
/* START SEND WHATSAPP WITH API TO OWNER AFTER ORDER PLACED*/
$msgMessage = "*New Order Arrived!*
*Restaurant Name* -". $restaurant->name."
*Customer No* - ". $user->phone."
*Order ID* - #". $newOrder->unique_order_id."
*Order Price* -". config('appSettings.currencyFormat') .$newOrder->total;
$message= urlencode($msgMessage);
//The URL with parameters / query string.
$url = 'https://api.callmebot.com/whatsapp.php?phone=XXXXXXXX&text='.$message.'&apikey=XXXXXX';
//Once again, we use file_get_contents to GET the URL in question.
$contents = file_get_contents($url);
/* END SEND WHATSAPP WITH API TO OWNER AFTER ORDER PLACED*/
etape 1 :

Free API to Send Whatsapp Messages
Note: The Free API is only for personal use.CallMeBot can now send WhatsApp Text Messages! Super easy using one simple API call. English English German Spanish...

Add the phone number +34 644 52 74 88 into your Phone Contacts. (Name it it as you wish)
Send this message "I allow callmebot to send me messages" to the new Contact created (using WhatsApp of course)
Wait until you receive the message "API Activated for your phone number. Your APIKEY is 123123" from the bot. As this is still in beta testing, the activation can take up to 2 minutes.
The WhatsApp message from the bot will contain the apikey needed to send messages using the API.
You can send text messages using the API after receiving the confirmation.
etape 2:
/app/Http/Controllers/OrderController.php
simple add this code on OrderController.php
after this line
$this->sendPushNotificationStoreOwner($restaurant_id, $unique_order_id); line 350
replace XXXX to your WhatsApp number & apikey
CODE
/* START SEND WHATSAPP WITH API TO OWNER AFTER ORDER PLACED*/
$msgMessage = "*New Order Arrived!*
*Restaurant Name* -". $restaurant->name."
*Customer No* - ". $user->phone."
*Order ID* - #". $newOrder->unique_order_id."
*Order Price* -". config('appSettings.currencyFormat') .$newOrder->total;
$message= urlencode($msgMessage);
//The URL with parameters / query string.
$url = 'https://api.callmebot.com/whatsapp.php?phone=XXXXXXXX&text='.$message.'&apikey=XXXXXX';
//Once again, we use file_get_contents to GET the URL in question.
$contents = file_get_contents($url);
/* END SEND WHATSAPP WITH API TO OWNER AFTER ORDER PLACED*/