Jump to content

How to validate order after payment is done and empty cart


shridhar

Recommended Posts

look at the bankwire or check module.  open the /controllers/front/validation.php and you will see what needs to be done

 

I have refered that but didnt got a idea the situation is that my payment provider uses a POST method redirection, i.e datas are posted to them and after payment they post back the data to us .

 

Now i am able to send then data and make a payment but when it returns i am not able to validate order as i have got no idea how to do that.

i can get the posted string by them.

 

also want to know what will be the exact solution to this.

 

Thanks in advance

Link to comment
Share on other sites

it is very similar to bankwire.  in your validation controller, you would just take their POST'ed parameters, apply whatever logic you feel you need to apply, and then just follow what the bankwire module does, by executing the validateOrder.

 

You didn't provide any information about your payment gateway, so I can only guess at what they provide to you, but your validation controller should be doing the following high level things

1) Receive the request and perhaps validate the origin.  What IP address did it come from?

2) Does the POST'ed information contain a payment status?  Is it possible that the payment fails?

3) If the payment succeeds, then you execute validateOrder function to create the Order

4) If the payment fails, are you going to create an Order using Payment Error status?  Or are you going to redirect them back to the checkout flow so they can try again?

 

You should continue your attempt and come back with specific questions or issues you encounter.

Link to comment
Share on other sites

it is very similar to bankwire.  in your validation controller, you would just take their POST'ed parameters, apply whatever logic you feel you need to apply, and then just follow what the bankwire module does, by executing the validateOrder.

 

You didn't provide any information about your payment gateway, so I can only guess at what they provide to you, but your validation controller should be doing the following high level things

1) Receive the request and perhaps validate the origin.  What IP address did it come from?

2) Does the POST'ed information contain a payment status?  Is it possible that the payment fails?

3) If the payment succeeds, then you execute validateOrder function to create the Order

4) If the payment fails, are you going to create an Order using Payment Error status?  Or are you going to redirect them back to the checkout flow so they can try again?

 

You should continue your attempt and come back with specific questions or issues you encounter.

 

I dont want the ip to be traces as i am checking the checksum

The Posted information contains payment status.

i am not aware about how to execute validateOrder function as i an not a developer but i can developer if i can get some hints on what to do.

If payment is success then i want to redirect them to thankyou page if failure i want to redrect them to try again page.

 

Now i am stuck at validateOrder function it seems not to work for me

how do i use that

 

i have no idea i can send you the code if you want to have a look at that.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...