<?php
$xml = "<?xml version='1.0' encoding='utf-8' ?> 
<order> 
    <userAccountId>112402</userAccountId> 
    <currency>EUR</currency> 
    <label>order label</label> 
    <ageGroup>ALL</ageGroup> 
    <categoryId>558</categoryId> 
    <urlAcquital><![CDATA[http://ec2-107-20-54-41.compute-1.amazonaws.com/development/orkut_backurl.html]]></urlAcquital> 
    <urlOk><![CDATA[http://ec2-107-20-54-41.compute-1.amazonaws.com/development/orkut_backurl.html]]></urlOk> 
    <urlKo><![CDATA[http://ec2-107-20-54-41.compute-1.amazonaws.com/development/orkut_backurl.html]]></urlKo> 
    <urlCancel><![CDATA[http://ec2-107-20-54-41.compute-1.amazonaws.com/development/orkut_backurl.html]]></urlCancel> 
    <locale>fr_FR</locale> 
    <issuerAccountLogin>issuerlogin@hipay.com</issuerAccountLogin> 
    <data> 
        <nom1>value 1</nom1> 
    </data> 
    <items> 
        <item id='1'> 
            <name>Ruby</name> 
            <infos>24 Rubin</infos> 
            <amount>24</amount> 
            <categoryId>558</categoryId> 
            <quantity>1</quantity> 
        </item> 
    </items> 
</order>
";

 
/* 
 * Var $data contain the XML string describing your order 
 */ 
 $data = trim($xml); 
 
// your website Hipay key 
$signKey = '584b575239a1b783e408c8e0c54aa4f0';
$encodedData = base64_encode($data); 
$md5Sign = md5($encodedData.$signKey); 
 
?> 
 
<form target='_blank' action='https://test-payment.hipay.com/index/form/' method='post' > 
    <input type='hidden' name='mode' value='MODE_B' /> 
    <input type='hidden' name='website_id' value='6177' /> 
    <input type='hidden' name='sign' value="<?php echo $md5Sign ?>" /> 
    <input type='hidden' name='data' value="<?php echo $encodedData ?>" /> 
    <!-- <input type='hidden' name='pay-mode' value="mobile" /> --> 
    <input type='image' name='send' src="https://test-www.hipay.com/images/bt_payment3.gif" /> 
</form> 