aspose file tools*
The moose likes General Computing and the fly likes Payment Gateway - dual verification check Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Payment Gateway - dual verification check" Watch "Payment Gateway - dual verification check" New topic
Author

Payment Gateway - dual verification check

Jeevan Sunkersett
Ranch Hand

Joined: Jul 03, 2007
Posts: 75
Hi,

Not sure, if i am posting to the correct forum ... (Dear Moderator, please advise the correct one)

My environment: Struts + Spring + Hibernate application running on Jboss 5.1 GA with Oracle as backend.
Operating Sys: Windows
JDK: ver 1.7

My application is a B2C app, where in end users, add something to their cart and proceed to payment.

App is integrated with a Payment gateway, where in the happy flow is as

User --> browses-to -> https//myapp.com
--> adds-to-his-cart
--> proceeds to payment (transaction is marked 'PAYMENT-INITIATED' in database)
-----> user is redirected to https://paymentG.com
--> enters CC, Cvv etc (payment is processed)

-----> user is redirected from paymentGateway back to to https//myapp.com
--> myapp, processes the incoming details from PG and shows user confirmation/ thank you page.
(and transaction is marked 'PAYMENT-SUCCESS' or 'PAYMENT-FAILED' in database))

But in practice, it so happens, due to varied reasons, user leaves https//myapp.com (for payment), but never returns (could be network failure/ or simply user closed his browser)

So the status of the transaction on my application side, remains 'PAYMENT-INITIATED'; indefinitely.

Later support team gets calls from user, money has got debited from their account/ CC but they have received no acknowledgement from my B2C system.

What can be done for such transactions ?

For one, we have a cron job; which runs every hour, queries the payment-gateway about the state of these 'PAYMENT-INITIATED' transactions.
1. If payment gateway, reports that money has truly been debited; we mark the transaction as 'REFUNDABLE' and refund the money.
else mark it as FAILURE (if gateway reports it as so) or simply ABANDONED.

Is there a better way to handle this ?
Note; I cannot accept credit card/ Cvv info on my web-site and then call payment gateway;
so the synchronous round trip (myapp.com --to-- payment gateway --back-to-- myapp.com) cannot be done without.

thank you.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9315
    
109

This has some good explanation on how it typically works.


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Payment Gateway - dual verification check
 
Similar Threads
Stateful - transaction commit in CMT (Doubt)
Wireless Payment Gateway
Some do's & don'ts
Transaction Management
Forward or sendredirect