0

I'm using a Bank E-Payment webservice and set the redirectURL into http://Example.com/EPaymentResultCallback?Param1=0&Param2=1 when the bank finish it's job, browser redirects to preceding url.
But the problem is: Bank webservice has changed my url into http://Example.com/EPaymentResultCallback?Param1=0&Param2=1 (noticing the extra &).
In fact my innocent url encoded and therefore Param2 will be lost.
I cannot change the websercive obviously. but interested to know if there is a way to resolve the second url parameter (Param2) on my website?

For more general explanation: 'mywebsite' calls a webservice and redirected to a whole new website. after 'new website' done, browser redirects to the given URL (in fact 'mywebsite/somesubUrl/param1&param2') but parameter separator (&) changed into (&) so the second parameter (param2) won't delivered correctly to the action method and an exception raise, pointing that the second input parameter in the action method could not be null.

Actually i`m looking for a built-in solution to read encrypted url. that would be the best. but any other idea is welcomed.

Rzassar
  • 2,117
  • 1
  • 33
  • 55
  • 1
    I'd change the query parameters into an encoded/encrypted string or the like. If, for example, you encrypt your `Param1=0&Param2=1` to `yourencryptedstring12345`, then make the redirect URL `EPaymentResultCallback?action=yourencryptedstring`, then you can decrypt the action parameter `yourencryptedstring12345` into `Param1=0&Param2=1` and you're set – Milanzor Jun 20 '17 at 09:55
  • @Milanzorg Thats a good idea but not the best. actually i`m looking for a built-in solution to read encrypted url. – Rzassar Jun 20 '17 at 10:35
  • something like [base64-url-safe-encoding](https://stackoverflow.com/questions/26353710/how-to-achieve-base64-url-safe-encoding-in-c) and [encode-url-in-javascript](https://stackoverflow.com/questions/332872/encode-url-in-javascript?rq=1)? – oCcSking May 07 '18 at 07:16

0 Answers0