Hi I am working on a ecommerce sites payment gateway part. I am not able to understand how to handle the return url from that payment gateway. I am using EBS payment gateway.
Any help is appreciated.
Normally most of the e-commerce apps works like this, when you are redirecting to Payment Gateway website for payment processing.
1. From your aspx page, get all the values that are required to pass to the payment gateway page. By values, I mean the amount, qty, orderid, customerid, vat etc.
2. Pass the values to the payment gateway page through redirect. Disable the view state.
3. Now user enters all the cc information and click submit in payment gateway page
4. Payment Gateway page calls your aspx page (you need to configure or send the page to payment gateway prior)
5. You page is now called from payment gateway page. You now get the payment status, authorization code and other details in your page. Do your database stuff
6. After your //do stuff method, the page stays in payment gateway page.
7. You need to configure a link and pass it to the payment gateway page.
8. Users click the link and gets back to your apps.
Some payment gateway, just returns to your page after payment process and you need to skip the step 6-8
For the EBS Payment Gateway, you need to study their architecture and work accordingly.
Hope this clears some of your doubts.
Never, ever, accept code from a insecure website to handle anything to do with real money.
You do not know who is giving you the code, you do not know what it does, you do not know that it places the monies correctly into the appropriate account, without passing the details to any third parties.
Only get such code from reputable companies - EBS in this case - the scope for fraud otherwise is far to large. And remember, you personally could be liable for any monies lost if your action is seen to be negligent - which getting your code from a public forum would most certainly be!
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)