Link to home
Start Free TrialLog in
Avatar of MMsabry
MMsabry

asked on

Redirect and posting of encrypted information

So i have form, the users fill out, moves to a verify page which displays the information entered and calculates the costs, then he is prometed to submit. upon submit, a page open with a notification then this page has a  cfheader that referesh after 10 sec. and takes the user to the online payment processor. that all works perfect, the only problem is that the total amount due is displayed in the url, and if he edits this total amount, the online payment processor charges the edited value not the one passed from our site!

How can i do the redirection and send the information so that the user cannot edit it?
Avatar of pinaldave
pinaldave
Flag of India image

Hi MMsabry,
you can store your information in the session or application (not preferable) variable before you redirect.
Then after you can retrive those information new page.
You do not have to use url or forms param for that...

Regards,
---Pinal
Avatar of MMsabry
MMsabry

ASKER

sorry! the cc processing ask that we send them a url linke something like this
https://www.cardprocessorname/xxx/xxx/pay?myid=123&total=123&invoiceid=123&
now i need to hide everything after "pay"
Hi MMsabry,
here you can not do anything... as it is their page of cardprocessorname...
and the way they retrive the stored info..it is upto them... you can not change anything here..
if this was my page... i might have to stuck things in session or even in url.total param and retrive them without passing them to url...but you can do nothing here... you can talk with them and see what alternative they offer.

Regards,
---Pinal
Avatar of MMsabry

ASKER

hi pinal
thanks, i already contacted them and waiting!!, i will keep the question open to see if someone has any ideas!
No problem, let us wait what other experts says.
Regards,
---Pinal
Have a look at URLEncodedFormat() & URLDecode()
OR
<CFSET mykey = "Anand"><!--- set the key value for encrypt & decrypt --->

Encrypt the contents of the URL by using
#Encrypt(QUERY_STRING,mykey)#
so that users cannot edit the query string

& then later decrypt it as
#Decrypt(QUERY_STRING,mykey)#

hope that helps ...
hello Anand,
That is true but buddy... the url is passed to the credit card company... so user do not have control on that side of credit card...
that is what I was telling above that... he needs to contact the credit card...
if we have control on the other side buddy... I will try to use form variables or something like that...
otherwise, I respect your idea as always,
Good Day,
---Pinal
Avatar of MMsabry

ASKER

here is what the company said:
"
We do support MD5 hash checking so you can verifiy the integrity of the sale
to prevent this.

The MD5 hash is created as follows.

md5 ( secret word + vendor number + order number + total )"

Now i know what the md5 is and what is the hash, I'm still waiting for them to explain a little more how should i do that, or where on the url string passed to them this hashed key
ASKER CERTIFIED SOLUTION
Avatar of anandkp
anandkp
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MMsabry

ASKER

hey anandkp,
what you indicated is true, but the problem is: my payment processor when you first go there, you get a page that says the total amount and give you some options to chosse from (e.g. pay by credit card, pay by check, etc.) now when i click to proceed to the actual payment page, all the information is lost, no total amount, nothing the whole thing is empty! I think the cfhttp passes the info correctly to the first page, but it is lost afterwords!
Is there any known solution to this?
use form submission to pass values via hidden fields to subsequent pages - so that the information is retained.
Avatar of MMsabry

ASKER

Sorry,
you mean, i take the values and put them in a hidden form, or do you mean using the cfhttpparam form and submitting that?
Avatar of MMsabry

ASKER

to add to that, can one do something like
<cfheader name="refresh" value="10; <cfhttp  method="post" url="https://flkjshfklj"> <cfhttpparam name="1" type="formfield" value="xyz"></cfhttp>">

The idea is to still be able to display the page, then redirect after 10 seconds, and still use the cfhttp?
is there another way?