cancel
Showing results for 
Search instead for 
Did you mean: 

Need my custom Thank you page after payment submitted instead of inbuilt thank you page

Hello Team,

I am successfully charging cc details through Hosted payment redirect method c# code.

But I want to redirect my custom thank you page as someone fills cc details on payment form.

I want to skip your inbuilt thank you page. How can I do that? Please help.

cgsshankar
Member
4 REPLIES 4

Hello,

To redirect to your custom thank-you page instead of the built-in one after processing a payment through the Hosted Payment Redirect method in C#, you'll need to adjust the redirect URL in your code.

Typically, after a successful payment submission, there should be a section in your code that handles the redirection. Locate the point where the redirection URL is set and replace it with the URL of your custom thank-you page.

For example, if you are using a response object or a redirection URL, modify it to point to your custom page:

Make sure to replace the placeholder URLs with the actual URLs of your pages.

If you have specific sections of code that handle the redirection, you may need to review and modify those areas accordingly. If you encounter any difficulties or need further assistance, feel free to provide more details or consult the documentation of the payment service you are using for specific implementation guidance.

// Existing code for redirection string redirectUrl = "

// Existing code for redirection
string redirectUrl = "https://www.builtinthankyoupage.com";
// Update to your custom thank-you page URL
string customThankYouPageUrl = "https://www.yourcustomthankyoupage.com";

if (paymentIsSuccessful)
{
// Redirect to your custom thank-you page
Response.Redirect(customThankYouPageUrl);
}
else
{
// Redirect to the built-in thank-you page or handle other scenarios
Response.Redirect(redirectUrl);
}

"; // Update to your custom thank-you page URL string customThankYouPageUrl = "https://www.yourcustomthankyoupage.com"; if (paymentIsSuccessful) { // Redirect to your custom thank-you page Response.Redirect(customThankYouPageUrl); } else { // Redirect to the built-in thank-you page or handle other scenarios Response.Redirect(redirectUrl); }

Hope this helps!

jhoney12
Member

Check for a Built-in Setting:

Many payment gateways offer a setting within their configuration or dashboard to specify a custom thank you page URL.
Access your payment gateway's settings and look for an option to enable a custom thank you page.

ativadore
Member

Respected sir,

How to send directly to my thank you page after payment? I am using authorize.net housted page method c# code.
My below code sending me to inbuilt thank you page.Their is continue button.After clicking continue button it is going to my custom thank you page.
I want directly to go to my custom thank you page.I dont want continue buton extra step. Please help in my below code as I am stuck here from last 2 months. My code is below.
-------------------------------------------------------------------------------------------------------------

settingType[] settings = new settingType[3];

settings[0] = new settingType();
settings[0].settingName = settingNameEnum.hostedPaymentButtonOptions.ToString();
settings[0].settingValue = "{\"text\": \"Pay Now\"}";

settings[1] = new settingType();
settings[1].settingName = settingNameEnum.hostedPaymentOrderOptions.ToString();
settings[1].settingValue = "{\"show\": false}";

settings[2] = new settingType();
settings[2].settingName = settingNameEnum.hostedPaymentReturnOptions.ToString();
settings[2].settingValue = "{\"showReceipt\": false,\"url\": \"https://mysite.com?id=" + txtinvoiceno+ "\",\"cancelUrl\": \"<https://mysite.com/cancel\"} ";

-----------------------------------------------------------------------------------------------------------------

Please help I tried my best but not successfull.

cgsshankar
Member

Respected sir, Your solution not working for me.Please suggest.