I have a form that passes information such as 'name', 'email', 'orderno', 'amount' and 'note' to a payment form hosted at ePay.
In order to pass the field-values I use the standard-confirmation on the form with a type of redirect. I then pass the values in the query string. All is fine, except for one small problem: The query-string includes a callback parameter, which has it's own query-string (including 'note'). In order to make this work I have urlencoded the callback-url, and if I set a static single-word value for the note-parameter it works. However if I insert the field value from 'note' it fails (my guess is, due to spaces etc.).
So what I need to accomplish is to urlencode the value from the 'note'-field before it is being inserted into the query-string. But I have no idea how to do that.
This is what the query-string for the confirmation redirect looks like with a static single-word value in 'note' (this will work):
https://example.com/payment?merchantnumber=999999¤cy=208&amount={:5}&orderid={:3}&language=0&callbackurl=https%3A%2F%2Fexample.com%2Fepay.ashx%3Fnote%3Dsingleword
This is what it will look like with the value from 'note' as paragraph text (this will not work):
https://example.com/payment?merchantnumber=999999¤cy=208&amount={:5}&orderid={:3}&language=0&callbackurl=https%3A%2F%2Fexample.com%2Fepay.ashx%3Fnote%3Dlorem+ipsum+dolor+sit+amet
This is what I'm trying to accomplish (this should work):
https://example.com/payment?merchantnumber=999999¤cy=208&amount={:5}&orderid={:3}&language=0&callbackurl=https%3A%2F%2Fexample.com%2Fepay.ashx%3Fnote%3Dlorem%20ipsum%20dolor%20sit%20amet
I hope everything makes sense, and that someone can guide me in the right direction.
Thanks.