Payment system in dynamic pages

I am not sure where you are stuck and where it is saying it must be a string. But if you want to convert a number to string just use
numbervariable.tostring() method.