How to integrate OpenEdge Payment in a .Net project?

How to integrate OpenEdge Payment in a .Net project?

16 June 2021

In this blog, we’ll see the way to integrate OpenEdge card payment implementation in Asp.Net.

Introduction to OpenEdge

OpenEdge is a payment entryway that accepts credit card payments. OpenEdge provides payment process services to businesses in a secured and PCI compliant manner.

How to start?

Following are the APIs  used for transaction processing:

  • PayField API
  • Transaction API

PayField:

We have to be compliant with the PCI Data security standards when processing or storing credit cards. PayField allows you to process transactions without passing any of the sensitive data through your servers, thus eliminating your need for PCI compliance.

This is accomplished through embedding the PayFields, which are hosted on servers, onto our website.

The PayFields are integrated seamlessly within an HTML element of your creation.

PayField is configured with an object containing three items:

  • Type: The PayField type
  • Element: The ID of the HTML element that you want the PayField integrated within.
  • Values: The preset value for the PayField. If your customer will be inputting data into the PayField (i.e. they will be inputting their address or credit card number) the value of the object is left blank.

We’ll see step by step process to integrate PayField API

Step 1: Adding the Script

To get started, you must add the following points to your checkout page using javascript to integrate PayField:

  • Add javascript library for payfield
  • Add public API key and environment
  • Add function to include PayField fields
    How_to_integrate_OpenEdge_Payment_in_a_dotNet_project_01

Step 2: Adding the Fields

In the body of the page, include a <div> for each field. To set the <div> to host your desired PayField, enter the <div> ID as the element item when configuring the PayField.

Step 3: Calling PayField

On click of submit button, and it will automatically send the request to the API. Using the javascript fetched the temporary token generated by Payfiled for the entered card details.
This temporary token is used in the transaction API call.

How_to_integrate_OpenEdge_Payment_in_a_dotNet_project_03

In the form action method, you can mention the file name where it’ll go after clicking on the “Submit” button to call the transaction APIs.

Transaction API:

OpenEdge Transactions APIs are used to securely accept credit cards. This API uses the resource collections – sales, auths, returns, and voids.
You have to pass the PayField generated token to the transaction API to process the transaction.

Step 4: Sales API

It’s primarily used to generate a payment. It returns the sales Id which can be stored in the database.

Following is the example to call the sales API for generating a payment.

How_to_integrate_OpenEdge_Payment_in_a_dotNet_project_04

How_to_integrate_OpenEdge_Payment_in_a_dotNet_project_05 How_to_integrate_OpenEdge_Payment_in_a_dotNet_project_06

search
Request a quote