Reply
Member
Posts: 6
Registered: ‎02-08-2019

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!

 

 

Posts: 2,764
Topics: 57
Kudos: 245
Blog Posts: 67
Registered: ‎12-05-2011

Re: Where to find Hosted Page sample code using c#

@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


Build modern websites and mobile applications without increasing PCI burden using Authorize.Net Accept


Still using SIM, DPM or AIM? Please check our upgrade guide for details on migrating to our full Authorize.Net API.
Member
Posts: 6
Registered: ‎02-08-2019

Re: Where to find Hosted Page sample code using c#

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...

 

All Star
Posts: 530
Registered: ‎11-05-2018

Re: Where to find Hosted Page sample code using c#

@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.
Highlighted
All Star
Posts: 530
Registered: ‎11-05-2018

Re: Where to find Hosted Page sample code using c#

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.