Help Article

Ask the Community

Find answers or join the conversation in the Community Help Forum.

How do I set up and process an API call using the Payflow .NET SDK?

=123&AMT=99.00&FIRSTNAME=John&LASTNAME=Smith&STREET=123 Main St.&CITY=San Jose&STATE=CA&ZIP=12345&COMMENT1=Reservation&VERBOSITY=MEDIUM"; //build a Payflow API Object with the address, port, and timeout PayflowNETAPI pfObj = new PayflowNETAPI(hostAddress, hostPort, timeOut); //set the response variable to the value of the response from the call and make the call string response = pfObj.SubmitTransaction(Request + PayflowUtility.RequestId, PayflowUtility.RequestId); //get the status from the response string status = PayflowUtility.GetStatus(response); //print the status to the page Response.Write(status); Response.Write("<br />");//line break //API Request: Response.Write("API Request:\n"); Response.Write("<br />");//line break //print the raw request string to the page Response.Write(Request); Response.Write("<br />");//line break //API Response: Response.Write("\nAPI Response:\n"); Response.Write("<br />");//line break //print the raw API response String to the page Response.Write(response);
  • Set the USER, VENDOR, PARTNER, and PWD variables to your API credentials for the Payflow API.
  • Set the preceding code between the curly braces for the Button1_Click function.
  •  
    Build and run the application
    1. Under Build, select Build MyFirstAPICall.
    2. Click the green arrow to run the application.
    3. Your browser will open and you'll see the button, which will be labeled Button (unless you changed it).
    4. Click the button to show your API Request and Response. For example, the following message indicates a successful transaction:
       
    Note: Read through the SDK documentation so you can use it to its full potential. You may also want to review the Payflow Gateway Developer Guide and Reference for more information.
    We’re sorry, the page you’re looking for is no longer available. Please try your search again in our Help Center if you have a question or want to contact us.