The History
The client receives USSD-response on balance check in USD currency, but his tariffication is in a PLN currency.
We should convert USD balance to PLN in order to count our expenses in the same currency.
Client receives message like this: “Your balance is 25 USD”.
Solution
We create a USSD-request for balance checking. Assign it to current tariff and using action possibilities convert USD to PLN.
- Step 1: We should parse balance from message, using next regular expression:
Example of USSD-processing algorythm:
Your balance is (?P<sim__balance>-?\d+(\.\d*)?) USD
- Step 2: In action we should convert it to the PLN, using next expression:
float({sim__balance})*3,9
Where 3,9 – is current exchange rate for USD to PLN.
The GoAntiFraud system will calculate changes automatically.
USSD case will be look like this:
Have fun :)
You don't know how to use this case?
– Fill in an application form for a free webinar and we will instruct you! Or you can start your presentation right now in our chat.