Hi,
Please provide me more informations especially when it's about dev!
1) Which Store version do you use?
2) What's the provider name?
3) Do you have a link to their dev documentation?
Your provider seems to works like the PayPal provider, then I will use this provider to explain how it works in the code and I suppose you use the last Store version (03.01.07). PayPal have 3 URL parameters: ReturnURL, CancelURL and NotifyURL. If you look at the code of this provider, you can see that a ReturnURL, CancelURL and NotifyURL are computed (PayPalPayment.ascx.cs, method ConfirmOrder) and added as parameters (form fields) to the form submited to the provider address (this is done inside provider.ProcessTransaction(...) and return an instance of DotNetNuke.Store.Cart.RemoteForm). ReturnURL and CancelURL uses a PayPalNavigation object to create both URLs, the resulting URL is the current URL with two query string parameters added at the end: http://www.domainname.tld/pagename/default.aspx?GatewayExit=[return/cancel]&OrderID=[order number]. Those query string parameters are required, we will see later how to use it. NotifyURL is build by string concatenation because this is a different URL used by PayPal to inform your website of the transaction result (accepted, rejected, ...) in the background (IPN process).
When the visitor return from the provider page, your payment control (PROVIDERNAMEPayment.ascx.cs) is reloaded by the Checkout control. You have to test the query string parameters to decide what to do in your control! The PayPal provider (PayPalPayment.ascx.cs) check the order status in the Page_Load event. If the query string contains a parameter GatewayExit with the value equal to RETURN, the order status is checked (PayPalIPNParameters object) and depending of the result, InvokePaymentSucceeded() or InvokePaymentRequiresConfirmation() is called. Those events callback are used to display the correct message (thank you..., awaiting payment...) to the user. Finally, the payment control is hidden (CheckoutControl.Hide()) and the wrapper panel is hidden (this is not really required, it's just a double security!). If you want to display something else than the order number and confirmation message, DON'T call CheckoutControl.Hide()! Instead, you should have two panels in your control. The first one with message and button to build the form and redirect to the provider website, and a second one to display a specific message when you return from the provider website. This way, by default you will have to hide the second panel in the Page_Load event and depending of the query string parameters hide the first one and display the second one!
Gilles