Annulleret

hsbc cpi integration

Legz11 HSBC CPI Intigration

OrderHash.e

Overview

This file will create the hash key for use with HSBC intigration it will also take information posted from the legz11 order process, then the OrderHash.e file must post the information collected from the legz11 order process and post it to HSBC including the hash key included. The system uses a lib file called libCcCpiTools this contains the algarithm and takes the eyncription key from the cgi-bin in a file called ss.txt.

Requirements

· Must Auto-submit (no user imput)

· Must not display any information (no text or graphics)

· Has to auto submit in less than 1-2 sec

· Must work fully on SSL

Source Code for C

Source: HSBC CPI Intigration guide

“C Code Sample

The CcCpiTools.h file contains two functions. The GenerateHash function creates a base64-encoded

hash of the specified parameters using a specified key. The function returns a pointer to the hash if

successful, or NULL if the case of a failure. Its syntax is as follows:

GenerateHash(char **params, const char *key );

The params argument is a NULL-terminated array of C strings. The key argument is the CPI Hash

Key sent by letter to the Merchant. The DestroyHash function deletes a hash created by

GenerateHash function. Its syntax is as follows:

DestroyHash(char *hash );

The following sample code illustrates the use of the OrderHash functionality.

/* TestHash.c */

#include <CcCpiTools.h>

#include <stdio.h>

int main( int argc, char **argv )

{

char *strEncryptedKey;

char **ppHashElements;

char *strHashValue;

int rc = 0;

if ( argc < 3 )

{

fprintf( stderr, "Usage: TestHash encryptedKey

hashElement...n" );

return 1;

}

strEncryptedKey = argv[ 1 ];

ppHashElements = &argv[ 2 ];

strHashValue = GenerateHash( ppHashElements, strEncryptedKey );

if ( !strHashValue )

{

fprintf( stderr, "Error generating hash!n" );

rc = 2;

}

else

{

fprintf( stdout, "Hash value: %sn", strHashValue );

}

DestroyHash( strHashValue );

return rc;

}

This is how it should work but without the

Fields and text and buttons showing

Also auto submitting

HTML Source for this page is

<HTML>

<HEAD>

<TITLE>Sample CPI OrderHash Generator</TITLE>

<SCRIPT>

function singleSubmit(trgForm)

{

[url removed, login to view] = true;

}

</SCRIPT>

</HEAD>

<BODY>

<BODY>

<CENTER>

<H1>Sample CPI Merchant OrderHash</H1>

<p>

This page creates an OrderHash of submitted items.<BR>

Changing any fields should result in a validation error at the CPI.<BR>

Press Submit to submit the data to the CPI.<BR>

<FORM name="cpiForm" action="https://www.cpi.hsbc.com/servlet" method="POST" onSubmit="singleSubmit(this)">

<INPUT TYPE="submit" NAME="submitButton" VALUE="Submit">

<BR>

<TABLE>

<TR><TD>OrderHash:</TD><TD><INPUT type="text" name="OrderHash" value="6uy47rURcahmDrjiI/BvIWz1sbY="></TD></TR>

<TR><TD>OrderId:</TD><TD><INPUT type="text" name="OrderId" value="6770839559"></TD></TR>

<TR><TD>TimeStamp:</TD><TD><INPUT type="text" name="TimeStamp" value="1161709815882"></TD></TR>

<TR><TD>CpiReturnUrl:</TD><TD><INPUT type="text" name="CpiReturnUrl" value="https://www.secure.legz11.com/hsbc_return.php"></TD></TR>

<TR><TD>CpiDirectResultUrl:</TD><TD><INPUT type="text" name="CpiDirectResultUrl" value="https://www.secure.legz11.com/cgi-bin/Results.e"></TD></TR>

<TR><TD>StorefrontId:</TD><TD><INPUT type="text" name="StorefrontId" value="******861GBP"></TD></TR>

<TR><TD>OrderDesc:</TD><TD><INPUT type="text" name="OrderDesc" value="Legz11 Goods"></TD></TR>

<TR><TD>PurchaseCurrency:</TD><TD><INPUT type="text" name="PurchaseCurrency" value="826"></TD></TR>

<TR><TD>TransactionType:</TD><TD><INPUT type="text" name="TransactionType" value="Auth"></TD></TR>

<TR><TD>UserId:</TD><TD><INPUT type="text" name="UserId" value="****80"></TD></TR>

<TR><TD>Mode:</TD><TD><INPUT type="text" name="Mode" value="P"></TD></TR>

<TR><TD>MerchantData:</TD><TD><INPUT type="text" name="MerchantData" value="31d0182a2e419dffb44893127575885b"></TD></TR>

<TR><TD>BillingAddress1:</TD><TD><INPUT type="text" name="BillingAddress1" value="Wil***w Vi**a "></TD></TR>

<TR><TD>BillingAddress2:</TD><TD><INPUT type="text" name="BillingAddress2" value="****** *****"></TD></TR>

<TR><TD>BillingCity:</TD><TD><INPUT type="text" name="BillingCity" value="******** "></TD></TR>

<TR><TD>BillingCountry:</TD><TD><INPUT type="text" name="BillingCountry" value="826"></TD></TR>

<TR><TD>BillingCounty:</TD><TD><INPUT type="text" name="BillingCounty" value="Jersey "></TD></TR>

<TR><TD>BillingFirstName:</TD><TD><INPUT type="text" name="BillingFirstName" value="**********"></TD></TR>

<TR><TD>BillingLastName:</TD><TD><INPUT type="text" name="BillingLastName" value="****oy "></TD></TR>

<TR><TD>BillingPostal:</TD><TD><INPUT type="text" name="BillingPostal" value="*** 6QB "></TD></TR>

<TR><TD>ShippingAddress1:</TD><TD><INPUT type="text" name="ShippingAddress1" value="Willow Villa "></TD></TR>

<TR><TD>ShippingAddress2:</TD><TD><INPUT type="text" name="ShippingAddress2" value="Willow Grove"></TD></TR>

<TR><TD>ShippingCity:</TD><TD><INPUT type="text" name="ShippingCity" value="St Clement "></TD></TR>

<TR><TD>ShippingCountry:</TD><TD><INPUT type="text" name="ShippingCountry" value="826"></TD></TR>

<TR><TD>ShippingCounty:</TD><TD><INPUT type="text" name="ShippingCounty" value="Jersey "></TD></TR>

<TR><TD>ShippingFirstName:</TD><TD><INPUT type="text" name="ShippingFirstName" value="******nn"></TD></TR>

<TR><TD>ShippingLastName:</TD><TD><INPUT type="text" name="ShippingLastName" value="***y "></TD></TR>

<TR><TD>ShippingPostal:</TD><TD><INPUT type="text" name="ShippingPostal" value="J*** 6QB "></TD></TR>

<TR><TD>ShopperEmail:</TD><TD><INPUT type="text" name="ShopperEmail" value="***"></TD></TR>

<TR><TD>PurchaseAmount:</TD><TD><INPUT type="text" name="PurchaseAmount" value="2600"></TD></TR>

</TABLE>

<BR>

<INPUT TYPE="submit" NAME= "submitButton" VALUE="Submit">

<BR>

</FORM>

</CENTER>

</BODY>

</HTML>

Included in the zip for reference is the HSBC intigration, OrderHash.e and this docutment

Our current test site resides at [url removed, login to view]

Thanks

Joe Quigley

Færdigheder: C programmering, Linux, PHP

Se mere: use case include, true results, thanks letter sample, test data generator, test code generator, sn it, sample system using php, sample reference letter, sample letter reference, sample data generator, reference letter sample, php script null, letter reference sample, less press, html source code generator, hash strings, e value, data page pointer, test generator, algarithm, hsbc hash value, hsbc cpi servlet, hsbc error generating hash, hsbc hash key test, example php hsbc

Om arbejdsgiveren:
( 0 bedømmelser ) st. helier, United Kingdom

Projekt-ID: #102240

2 freelancere byder i gennemsnit $38 for dette job

phaseonemedia

Im no expert in c or anything. But I would love to at least try for the experience.

$30 USD in 0 dage
(22 bedømmelser)
4.1
kmkumar1982

hi, i'm ready to take this project.I have good exposure in C/C++.i know HTML/PHP too.I can provide you the quality result.i bid for 45$.It can be considered depending on your wish.waiting for your reply.

$45 USD på 1 dag
(0 bedømmelser)
0.0