Sending USSD codes to MTN from PHP?

samvb

New Member
Joined
Aug 4, 2015
Messages
2
Reaction score
0
Any ideas on how to do that please? I want to check balance and on confirmed PIN, transfer money from account to another. Or generally send USSD codes from PHP? I donno where to beging tho i heard XML RPC is what MTN uses?

Any tips please?
 
From my knowledge this type of USSD interaction cannot be done. The transactions you are referring to require authentication that is done by the use of your MSISDN in the session that gets set up on the USSD gateway. You won't be able to transact with the OCS (Online Charging System) without this authentication. You can create your own menu structure and register as a WASP with the networks, or use a 3rd party for a paid-for gateway but to spoof a MSISDN programmatically is not possible and if you do get it right please inform this forum so we can sue the network(s).
 
Is this the best approach? Do you need to use USSD?

You could do everything via SMS and them when a certain confirmation SMS is processed you proceed with the transaction. USSD is its own platform and works with cellphones as it depends on MSISDN. So just like @Roo! said, shout us out if you get this working.
 
Hey guys,

thanks for the input. I dont have much background on this side of programming so cant decide. it is just i saw stackoverflow people who did the same thing for other networks abroad. I was so curious to implement into my current mobile app.

Regarding the SMS, it can trigger balance check and stuff?
 
Smsing balance to 100 on Vodacom used to give balance back when people used USB modems.
 
Let's see if MTN come up with a solution.

Difficult to believe the retards have no way of checking the balance on an inaccessible SIM. Plenty of us have them in camera traps and our alarms.
 
Mmm - look back in this thread somewhere.

IIRC,

exec('echo "AT+CUSD=1,\"*141#\",15\r\n" > /dev/ttyUSB');

Is that for me Gregorgy? I hope not because it looks like Russian, Greek, Arabic and Chinese all rolled into one :-(
 
Is that for me Gregorgy? I hope not because it looks like Russian, Greek, Arabic and Chinese all rolled into one :-(

What? Do you know any php at all? That is php right there and to prove that it is for you, there's a *141# in there. Not saying it would work but that is php to anyone who has used the language. I know this even though I'm a dot-net guy.
 
Is that for me Gregorgy? I hope not because it looks like Russian, Greek, Arabic and Chinese all rolled into one :-(

There's no 'r' in geek :)

Nah, it is an answer to the OP. An answer which assumes many things, including that the PHP is running on a posix system. As for inaccessible SIMs, I would have no idea - MTN wouldn't seem to care either.
 
What? Do you know any php at all? That is php right there and to prove that it is for you, there's a *141# in there. Not saying it would work but that is php to anyone who has used the language. I know this even though I'm a dot-net guy.


Yeah - I was getting the OP's question. As for the others, I don't know how they would go about sending USSDs as it would be specific to each device. And even the above probably won't work, come to think of it, for php.
 
What? Do you know any php at all? That is php right there and to prove that it is for you, there's a *141# in there. Not saying it would work but that is php to anyone who has used the language. I know this even though I'm a dot-net guy.

Hahaha no Hackson I had to google what php is :)

I know nothing about programming but myBB is full of knowledgable, helpful people so the question was worth asking.

Thanks to GreGorGy anyway.
 
Top
Sign up to the MyBroadband newsletter
X