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”
We create a USSD-request for balance checking. Assign it to current tariff and using action possibilities convert USD to PLN.
Step one: 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 two: In action we should convert it to the PLN, using next expression:
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?