How to redirect to sucess page after payments?

Hi all

I have another payment gateways and I just testing it , but I have problem

For example , when i place order , it redirect me to Merchant Site , and I make payment here , it’s success and redirect me to My site , but the cart content is still here because the success page i make just only have

echo '<script language="javascript"><br />
							   window.location = "index.php?";<br />
```<br />
<br />
i know it must be ```php
index.php?dispatch=checkout.complete&orderid=XX(my orderID)
``` but i don't know how write code here , please help me<br />
<br />
Thank you very much

Your payment method should be returning to a payment controller and it should be keeping track of the order_id that was passed to it when the order was created and the payment method requested. Generally the order_id is retuned by the payment provider.

Take a look at payments/paypal.php or other “offsite” payment methods to see how they are handling it.

If you're using a payment provider distributed by cs-cart, you shouldn't have to create any success page, it should be handled automatically.

In my case when buyer done the payment through CC (3rd Party) it redirect to homepage and shows Incomplete order… never shows the order was processed… than i have to switch to Processed from Admin and than buyer can able to see their order…

yes , this is my case . the merchant gateways is success , but customer only see the Incomplete Order . I don't know how to solve it

Then there is something wrong with either the callback URL you've told the payment provider to return to or the 'payments' code in the 'payments' directory related to the payment provider.

The offsite provider should return a success indicator to the payments code and this will then call fn_finish_payment() to set the appropriate order status, send email notifications, etc. But if it never gets called, the order will remain in an Incomplete status since the payment provider never communicated success to the cart.

It is NOT normal for a successful payment to leave an Incomplete order.

This is my 2 file , 1 file is send to merchant , and one is success file , can you help me include [color=#282828][font=arial, verdana, tahoma, sans-serif]fn_finish_payment() into this file o[/font][/color]r can you explain more clear [color=#282828][font=arial, verdana, tahoma, sans-serif] Thank you very much [/font][/color] .

Sorry, that's more development than I can provide for free in the forums.

If your payment provider interface was provided by cs-cart. Simply open a ticket and they will resolve any bugs.

If it was provided by another developer, contact the developer and have them fix their bug.