How to send a USSD code containing decimal floating point (.)?

前端 未结 2 1123
不思量自难忘°
不思量自难忘° 2020-12-17 15:02

I need to send a USSD code containing a double value, that represents the balance account amount to be transferred. This value is composed by an integer number, and optional

2条回答
  •  感情败类
    2020-12-17 15:23

    Thinking about the way the pinpad, which my bank sent me, works, you always have to enter the two digits after the decimal point and the formatting on the display deals with the position of the point.

    So if i enter "1", it is interpreted as 0.01. Similarly "1023" would be 10.23.

    I think the same approach could work nicely for you. So 1.23 is entered as "123" and 0.80 as "80"

    I can't see a reference that limits the characters to 0-9#* but all the examples follow this format. However, your example starts *234, which seems to fit this rule in the specification

    Case a) 1, 2 or 3 digits from the set (*, #) followed by 1X(Y), where X=any number 0-4, Y=any number 0-9, then, optionally "* followed by any number of any characters", and concluding with # SEND: This case is reserved for HPLMN use. When a serving network receives such a message from a visiting subscriber, it shall pass the USSD message directly to the HPLMN. If it receives it from a home subscriber, it is up to the network to decide whether to treat it locally or to pass it to the HLR

    http://www.etsi.org/deliver/etsi_ts/100600_100699/100625/07.00.00_60/ts_100625v070000p.pdf

    In general, I am not sure the HPLMN (Home Public Land Mobile Network) or HLR (Home Location Register) would expect the extra characters, even though the whole character set and even other character sets are allowed in the USSD protocol.

提交回复
热议问题