cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Where to find Hosted Page sample code using c#

Hello,

 

Where can I find C# sample code for integrating hosted page?

 

I was going thru forum and found one but it seems very old and code does not work as expected. After payment it does not return to main application.

 

Here is the link I was talking about

 

https://community.developer.authorize.net/t5/Integration-and-Testing/Sample-C-Code-for-Hosted-Paymen...

 

I do not want to use iFrame code, and would need other option. 

 

Thank you in advance!

 

 

mehulbarot1
Member
6 REPLIES 6

@mehulbarot1

 

If you are creating a new integration using a hosted form, please use Accept Hosted: https://developer.authorize.net/api/reference/features/accept_hosted.html

 

Richard

RichardH
Administrator Administrator
Administrator

Thank you for the soluton, but I am looking forward to call Authorize.net hosted page from my c# code.

 

Here is some of the information

 

1) Prepare transaction details in my sample application

2) bundle the information and pass it to Authorize.Net hosted page

3) It should display Authorize.Net hosted page

4) Once user enters valid credit card information and pay on hosted page, I would like to return back to my sample application so that I can capture successful/failed transaction in my sample code

 

Looks like there is similar question asked in March 2018 and response was, for now they have only PHP sample and soon they would provide C# code sample. I am just looking for that sample.

 

Here is the post from March 2018

 

https://community.developer.authorize.net/t5/Integration-and-Testing/Hosted-Payment-Page-C-Code/td-p...

 

@mehulbarot1

There is sample code but not a sample app. You can go to the API reference and get C# code for the hosted payment form (Accept Hosted). In General for hosted payment pages the transaction information you prepare in your app will not be displayed or prefilled on the hosted page. This is especially true of user supplied data. So if you have an order description you want to pass to the form, that will display. But if you have a shipping and billing address on your app which is filled in by the customer when they order, that information will not display on the form.

The purpose of hosted payment pages is to reduce PCI compliance scope, primarily for most users. Part of the bargain you buy into there is that the form elements have to come from the PCI compliant gateway. That is why there are limitations on what can be posted to the form and also in most cases quite some limitations on how you can style it. The info you post in the API call will still be retained as part of the transaction and you can retrieve them later. They just donโ€™t become part of the code or markup of the payment form.

For getting results back after the transaction, I know of only 2 options- webhooks and iframe. I currently do not have any iframe integrations, but when I do I will be using webhooks anyways. They work so well I see no reason to not keep using them no matter what I do.
Sorry, I just noticed I read too quickly. You did not say the transaction details collected on your app should display on the hosted form. You said you wanted to display the hosted form.

Hi,

 

Do we have C# code for this:

 

1) Prepare transaction details in my sample application

2) bundle the information and pass it to Authorize.Net hosted page

3) It should display Authorize.Net hosted page

4) Once user enters valid credit card information and pay on hosted page, I would like to return back to my sample application so that I can capture successful/failed transaction in my sample code

Dear Mehul Bhai,

have you find the resolution.

if yes then kindly let us know as we r also today in same position as you were in aug 2019.

so i am thinking that you could have resolved it.

if yes then help us with the resolution

thanks and regards mehal bhai..