Is there a clean way to interface with CyberCash CashRegister service from a java servlet or EJB?

Alexandros Kotsiras

I haven't been able to find a "clean" way to do this.

The way cybercach MCK works is the following :

You submit the order to directpaycredit.cgi which connects to the Cybercash Server and from there to the Financial institution. The directpaycredit.cgi depending on the success or failure of the transaction sends it's response to a success.tem file or a failure.tem file. MCK provides a way to retrieve in those files inside hidden fields all the values of the input fields (CC_Number, Customer_Name etc.) that the user entered when he submitted the final form.

The problem is that you need to dump all the order details that you now have in the hidden fields into a database and MCK doesn't do this for you. So what i did was use some javascript in the success.tem file that does the following :

<body onload="document.successForm.submit()">
<FORM name="successForm" action="/context/jsp/success.jsp">

So the user receives the success response from Cybercash into a success.tem page which doesn't stay for long because it autosubmitts to a success.jsp page which can retrieve all the order/customer data from the hidden fields of success.tem and dump them into a database, send confirmation email , etc.

It works but the main problem is that if the user presses the browser's "Back" button from the success.jsp he will go to the success.tem which will autosubmit again and try to redump all the same order data to the database.

Unfortunately you cannot tell MCK to send the order response directly to a .jsp page and do it the right way.

You are supposed to know CGI programming and customize directly the directpaycradit.cgi script and dump all the transaction details from within that script before it forwards to the success.tem file.

I haven't been able to find a better way...

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.