-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c35b047
commit ca9716c
Showing
3 changed files
with
118 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,27 @@ | ||
<?php | ||
use Aimedidierm\FdiSms\SendSms; | ||
|
||
require_once __DIR__ . '/../vendor/autoload.php'; | ||
public function testing() | ||
{ | ||
$to = ""; | ||
$message = ""; | ||
$senderId = ""; | ||
$ref = ""; | ||
$callbackUrl = ""; | ||
|
||
use Aimedidierm\FdiSms\SendSms; | ||
try { | ||
$apiUsername = ""; | ||
$apiPassword = ""; | ||
$smsSender = new SendSms($apiUsername, $apiPassword); | ||
|
||
$response = $smsSender->sendSms($to, $message, $senderId, $ref, $callbackUrl); | ||
|
||
$sms = new SendSms(); | ||
$sms->SingleSms( | ||
$username = "", // Your API Username provided by FDI | ||
$password = "", // Your API Password provided by FDI | ||
$sender_id = "", // Your User ID provided by FDI | ||
$phone = "", // Receiver phone number | ||
$message = "", // Text message to be sent | ||
$ref = "", // Your unique message reference ID | ||
$callBackURL = "" // Optional Delivery Report destination | ||
); | ||
var_dump($sms); | ||
if ($response['success']) { | ||
return response()->json(['message' => 'SMS sent successfully']); | ||
} else { | ||
return response()->json(['message' => $response['message'], 500]); | ||
} | ||
} catch (\Exception $e) { | ||
return response()->json(['message' => $e->getMessage()], 500); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters