Skip to main content
Inspiring
April 6, 2011
Question

storing payment gateway verification variables - in application.cfc ?

  • April 6, 2011
  • 2 replies
  • 753 views

Every time an order is placed, a confirmation comes back from our payment gateway, to our page 'response.cfm'

It contains various items of data about the order (our gatewayID, orderValue, etc)

For security, I need to compare the gatewayID sent to us, with our own. I wondering where the best place to store our own copy ? I was going to place it in the application.cfc ?

Is this OK ? Or am I better storing it in a database table ?

    This topic has been closed for replies.

    2 replies

    Inspiring
    April 6, 2011

    Owain beat me to the first question.  if it is your own server then using session or app vars would be ok.  if it is a shared server then you want to avoid that since they are not secure.  Just do the database query and set a cachedwithin timespan so that you don't keep hitting the actual database for every transaction.  Or you could store the value in the request scope, which (I think) is pretty safe.  I've never heard of anyone being able to access request scoped vars from another request, but I guess anything's possible.

    -reed

    Inspiring
    April 6, 2011

    Its a shared server

    WoW! Really thought application.cfc would be secure, but it appears not

    I'll put the data into a table and cache the query as suggested.

    Thanks.

    Owainnorth
    Inspiring
    April 6, 2011

    Yup, it's probably my biggest gripe with CF, up there with not automatically scoping variables.

    Still never found a real way of securing an Application on a shared server.

    Owainnorth
    Inspiring
    April 6, 2011

    Shared server or dedicated server?