Redirection | Novalnet Docs

 Redirection

With this integration, your end-customer will be redirected to the Novalnet's hosted payment form to complete the purchase. The details about the transaction will be posted back to your shop securely. A simple solution that can be setup without much technical proficiency.

Upon successful execution of Step 1, you might have received an URL (result.redirect_url) from the Novalnet payment response. Redirect your end-customer to the hosted payment page immediately through header redirect.

How does it work?

When the customer clicks on the web-shop's order button to confirm the purchase, they will be redirected to the Novalnet's Hosted Payment page where they can choose to pay with their preferred payment method. Once the customer completes the payment process, you will receive the payment result to your corresponding return URL's (transaction.return_url, transaction.error_return_url). Additionally, you can perform the /transaction/details API call to retrieve the additional transaction result.

Steps to setup an redirect integration

Follow the below steps to perform setting up the redirection process in your webshop (we have described both server-side and client-side integration steps),

Step 1: Generating the PURL

Post all the required transaction parameters to Novalnet in advance without the user interaction, thus submitting all the transaction based data (user/order details, merchant credentials, etc. other than the sensitive payment data) in advance through server to server call, to create the payment URL (hosted at Novalnet server).

This payment URL is valid for a definite time-period of 45 minutes.

Merchant-defined identifier for the capture request. Used for tracking, reconciliation, auditing, or mapping the capture to an internal order, invoice, or reference ID.

The sample in the steps below will contain only the minimal parameters for the demo execution and explanation. To know more about all the parameters, it's descriptions, header explanation and results, refer this >>link<<.

Customization of payment page with your choice of layout & design

The payment page hosted at Novalnet is entirely customizable for the layout and design; you can adjust it as you desire. Please refer to the hosted_page block on the parameter reference link to customize the layout per stylesheet, header, footer, etc.

Run

Step 2: Directing user to the payment page

Upon successful execution of Step 1, you might have received an URL (result.redirect_url) from the Novalnet payment response. Redirect your end-customer to the hosted payment page immediately through header redirect.

Run


Step 3: Receiving / Handling payment status

On completion of payment the user will be redirected to the given transaction.return_url passed in the initial payment request (refer Step 1 above).

To use this option, in the initial payment request (refer Step 1 above), the transaction.return_url and the transaction.error_return_url parameter values had to be passed with the correct url values as per your requirement, where you want to redirect the user after the payment.

Authenticating the redirection response

It is highly recommended that the payment response reaching to your return_url's should be authenticated. To authenticate the redirection response, the previously stored txn_secret is required.

The authentication is made by the comparison against the checksum received in the redirection response. Here you need to re-generate your own checksum value. Below you could find the necessary steps,

  1. Check if the txn_secret and checksum parameter has been received in the redirection response.
  2. Build a token string by concatenating the request parameters tid, txn_secret, status and the string reverse of your payment access key.
  3. Generate your own checksum by using the SHA256 hashing over the token string.
  4. Compares the checksum received in the redirection response with the generated checksum.
  5. If the checksum matches, then the authentication is successful else there could be a possible manipulation in the data.

Retrieving all the transaction details (optional)

If you are already handling the webhook process, this step is not required because your webhook receives all the transaction details.

The Transaction response will give you only the minimum details about the transaction, to retrieve entire transaction details, make the /transaction/details API by using the tid returned in the response from Step 2

To know more about the parameters, sample codes and results for retrieving the transaction details API, refer this >>link<<