Knowledge Base

Get help for payment solutions. Search our articles or browse by category below.

.NET Hosted Payment

You can find below a high and a low level workflow diagram of the required integration.

Full documentation is available in section 4.1 of our Integrator Guide available here.

You should also use our Sandbox test accounts here to test against.

workflow-integratingtohostedpaymentpage-highlevel.pdf

workflow-integratingtohostedpaymentpage-lowlevel.pdf

Here is some sample code to help in this integration:

The code for generating a HASH is:

using System.Security.Cryptography;
using System.Text;
protected static String GetHash(String plainString)
{
    byte[] toBeHashed = System.Text.Encoding.UTF8.GetBytes(plainString);
    MD5CryptoServiceProvider cryptHandler = new MD5CryptoServiceProvider();
    byte[] hash = cryptHandler.ComputeHash(toBeHashed);
    String hashed = "";
    foreach (byte i in hash)
    {
        if (i < 16)
            hashed += "0" + i.ToString("x");
        else
            hashed += i.ToString("x");
    }
    return hashed;
}

You should generate the “datetime” value using:

System.DateTime.Now.ToString("dd-MM-yyyy:HH:mm:ss:fff");
Copyright © 2017 Worldnet Knowledge Base | Powered by DokuWiki
developer/sample_codes/net_hosted_payments.txt · Last modified: 2016/07/26 11:55 (external edit)