[solved] Easysendsms smsc plugin


(abeu) #1

i buy a pack of sms with https://www.easysendsms.com/ but no easysendsms smsc plugin in playsms how can i do for easysendsms to work with playsms
please help me
This is the http API
https://www.easysendsms.com/http-api


(Anton Raharja) #2

The easiest way is to hire php programmer to modify existing gateway plugin.

You can also try to use gateway plugin custom (the name of the gateway plugin is: custom)

Anton


(Anton Raharja) #3

Hi,

Out of curiosity I built a plugin gateway for Easy Send SMS, please test:

anton


(abeu) #4

There is not easysendsms in the playsms gateway plugin so how can I use the the http API to integrate with my playsms


(Anton Raharja) #5

Go to link I shared with you, read the doc

Anton


(abeu) #6

I see tthe link but don’t know how to process to this api in a custom plugin gateway
Please help me
My email is abeufrederic@gmail.com


(Anton Raharja) #7

Read this:

anton


(abeu) #8

OK THANK WORKING BUT I CHANGE THE
/*
* OK:1234567891011
* ERROR:1001
*/

	if ($response) {
		$c_response = explode(':', $response);
		
		if (strtolower($c_response[0] == 'ok')) {
			$c_message_id = $c_response[1];
		}

TO

/*
* OK:1234567891011
* ERROR:1001
*/

	if ($response) {
		$c_response = explode(':', $response);
		
		if (strtolower($c_response[0] == 'OK')) {
			$c_message_id = $c_response[1];
		}

It is uppercase O and K

Thank very much


(Anton Raharja) #9

I lower it, so it has to be smallcaps

anton


(abeu) #10

At this step
// no sender config yet
//if ($sms_sender && $sms_to && $sms_msg) {
if ($sms_to && $sms_msg) {

	$c_sms_type = ( $sms_type == "flash" ? 2 : 0 );
	
	$unicode_query_string = '';
	if ($unicode) {
		if (function_exists('mb_convert_encoding')) {
			// $sms_msg = mb_convert_encoding($sms_msg, "UCS-2BE", "auto");
			$sms_msg = mb_convert_encoding($sms_msg, "UCS-2", "auto");
			// $sms_msg = mb_convert_encoding($sms_msg, "UTF-8", "auto");
		}
		
		$c_sms_type = ( $sms_type == "flash" ? 3 : 1 );
	}
	
	// https://www.easysendsms.com/sms/bulksms-api/bulksms-api?username=testuser&password=secret&from=Test&to=12345678910&text=Hello%20world&type=0
	$url = $plugin_config['easysendsms']['url'] . "?";
	$url .= "username=" . $plugin_config['easysendsms']['user'];
	$url .= "&password=" . $plugin_config['easysendsms']['password'];
	$url .= "&to=" . urlencode($sms_to);
	$url .= "&text=" . urlencode($sms_msg);
	$url .= "&tipe=" . $c_sms_type;
	$url = trim($url);

How can I include the sender in my url , what it is the variable of my sender


(Anton Raharja) #11

try this:

anton


(abeu) #12

Thank Very Very Much for all the help things done well