1) The merchant server (CFC) send a Payment Init message to the Bank Payment Gateway.
2) The Bank Payment Gateway respond with a Payment ID and other params. PaymentID is the unique token used to recognize to which transaction belong the messages exchanged between the merchant server and the payment gateway.
3) The merchant server redirect the browser to the Bank URL and append the PaymentID to the URL
4) The Payment Gateway send a post message to the Merchant Server to notify the status of the transaction (approved, denied etc)
5) The Merchant Server responde to the Payment Gateway post request.
6) The Payment Gateway redirect the client browser to an URL in the Merchant Server
7) The Merchant Server display a page to the client browser.
8) The transaction could be end, but there are other possibilities like send a new message to the Payment gateway to roll-back the transaction.
So, the problem is that the same object have to be used by the client browser and by the merchant server and maybe it could be called from other resources. There are some circumstance that the validation have to be made against more than one Payment Gateway for different items in the same order (hotel+tickets+...).
I don't want to save the PaymentID in the database and I want to use the object for all the transaction process. The object have to be persistent, but if I save the obj in the session scope I don't have a way to use it when the Payment Gateway call the Merchant Server. I suppose the only available solution is to save the object in application scope. The question is: which is the best pattern to reference object in application? Do I have to create a structure with a UUID or the PaymentID to mantain the reference to the CFC instance? The CFC have to be a init metod to register every instance in the application scope?
How can I handle my own "garbage collector"? I don't want that the object remain in memory too much, so is there a way to save something in the application scope, but for a lesser time than the one defined in the <cfapplication> or in CFAM?
Thanks in advance.
-------------------------------------------------- FABIO SERRA - faser(at)faser.net PGP available --------------------------------------------------
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
