Initial commit
This commit is contained in:
commit
1308b5339b
42
License.txt
Normal file
42
License.txt
Normal file
@ -0,0 +1,42 @@
|
||||
#==============================================================================
|
||||
#
|
||||
# "Open source" kit for Monetico Paiement(TM).
|
||||
# Integration sample in a merchant site for PHP
|
||||
#
|
||||
# Author : Euro-Information/e-Commerce
|
||||
# Version : 4.0
|
||||
# Date : 05/06/2014
|
||||
#
|
||||
# Copyright: (c) 2014 Euro-Information. All rights reserved.
|
||||
#
|
||||
#==============================================================================
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice and the following disclaimer in the documentation and/or
|
||||
other materials provided with the distribution.
|
||||
- Neither the name of Euro-Information nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Note: Euro-Information does not provide person-to-person technical
|
||||
support for tryout of Monetico Paiement examples.
|
||||
|
||||
#==============================================================================
|
23
MoneticoPaiement_Config.php
Normal file
23
MoneticoPaiement_Config.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/***************************************************************************************
|
||||
* Warning !! MoneticoPaiement_Config contains the key, you have to protect this file with all *
|
||||
* the mechanism available in your development environment. *
|
||||
* You may for instance put this file in another directory and/or change its name *
|
||||
***************************************************************************************/
|
||||
|
||||
define ("MONETICOPAIEMENT_KEY", "12345678901234567890123456789012345678P0");
|
||||
define ("MONETICOPAIEMENT_EPTNUMBER", "0000001");
|
||||
define ("MONETICOPAIEMENT_VERSION", "3.0");
|
||||
define ("MONETICOPAIEMENT_URLSERVER", "https://p.monetico-services.com/test/");
|
||||
define ("MONETICOPAIEMENT_COMPANYCODE", "12345");
|
||||
//define ("MONETICOPAIEMENT_URLOK", "http://www.foo.org/OK");
|
||||
//define ("MONETICOPAIEMENT_URLKO", "http://www.foo.org/NOK");
|
||||
|
||||
define ("MONETICOPAIEMENT_CTLHMAC", "V%s.sha1.php--[CtlHmac%s%s]-%s");
|
||||
define ("MONETICOPAIEMENT_CTLHMACSTR", "CtlHmac%s%s");
|
||||
define ("MONETICOPAIEMENT_PHASE2BACK_RECEIPT","version=2\ncdr=%s");
|
||||
define ("MONETICOPAIEMENT_PHASE2BACK_MACOK","0");
|
||||
define ("MONETICOPAIEMENT_PHASE2BACK_MACNOTOK","1\n");
|
||||
define ("MONETICOPAIEMENT_URLPAYMENT", "paiement.cgi");
|
||||
|
||||
?>
|
238
MoneticoPaiement_Ept.inc.php
Normal file
238
MoneticoPaiement_Ept.inc.php
Normal file
@ -0,0 +1,238 @@
|
||||
<?php
|
||||
/*****************************************************************************
|
||||
*
|
||||
* "open source" kit for Monetico paiement(TM)
|
||||
*
|
||||
* File "MoneticoPaiement_Ept.inc.php":
|
||||
*
|
||||
* Author : Euro-Information/e-Commerce
|
||||
* Version : 4.0
|
||||
* Date : 05/06/2014
|
||||
*
|
||||
* Copyright: (c) 2014 Euro-Information. All rights reserved.
|
||||
* License : see attached document "License.txt".
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Classe / Class : MoneticoPaiement_Ept
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
class MoneticoPaiement_Ept {
|
||||
|
||||
|
||||
public $sVersion; // Version du TPE - EPT Version (Ex : 3.0)
|
||||
public $sNumero; // Numero du TPE - EPT Number (Ex : 1234567)
|
||||
public $sCodeSociete; // Code Societe - Company code (Ex : companyname)
|
||||
public $sLangue; // Langue - Language (Ex : FR, DE, EN, ..)
|
||||
public $sUrlOK; // Url de retour OK - Return URL OK
|
||||
public $sUrlKO; // Url de retour KO - Return URL KO
|
||||
public $sUrlPaiement; // Url du serveur de paiement - Payment Server URL (Ex : https://p.monetico-services.com/paiement.cgi)
|
||||
|
||||
private $_sCle; // La cl<63> - The Key
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Constructeur / Constructor
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
function __construct($sLangue = "FR") {
|
||||
|
||||
// contr<74>le de l'existence des constantes de param<61>trages.
|
||||
$aRequiredConstants = array('MONETICOPAIEMENT_KEY', 'MONETICOPAIEMENT_VERSION', 'MONETICOPAIEMENT_EPTNUMBER', 'MONETICOPAIEMENT_COMPANYCODE');
|
||||
$this->_checkEptParams($aRequiredConstants);
|
||||
|
||||
$this->sVersion = MONETICOPAIEMENT_VERSION;
|
||||
$this->_sCle = MONETICOPAIEMENT_KEY;
|
||||
$this->sNumero = MONETICOPAIEMENT_EPTNUMBER;
|
||||
$this->sUrlPaiement = MONETICOPAIEMENT_URLSERVER . MONETICOPAIEMENT_URLPAYMENT;
|
||||
|
||||
$this->sCodeSociete = MONETICOPAIEMENT_COMPANYCODE;
|
||||
$this->sLangue = $sLangue;
|
||||
|
||||
$this->sUrlOK = MONETICOPAIEMENT_URLOK;
|
||||
$this->sUrlKO = MONETICOPAIEMENT_URLKO;
|
||||
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Fonction / Function : getCle
|
||||
//
|
||||
// Renvoie la cl<63> du TPE / return the EPT Key
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
public function getCle() {
|
||||
return $this->_sCle;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Fonction / Function : _checkEptParams
|
||||
//
|
||||
// Contr<74>le l'existence des constantes d'initialisation du TPE
|
||||
// Check for the initialising constants of the EPT
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
private function _checkEptParams($aConstants) {
|
||||
|
||||
for ($i = 0; $i < count($aConstants); $i++)
|
||||
if (!defined($aConstants[$i]))
|
||||
die ("Erreur param<61>tre " . $aConstants[$i] . " ind<6E>fini");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Classe / Class : MoneticoPaiement_Hmac
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
class MoneticoPaiement_Hmac {
|
||||
|
||||
private $_sUsableKey; // La cl<63> du TPE en format op<6F>rationnel / The usable TPE key
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Constructeur / Constructor
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
function __construct($oEpt) {
|
||||
|
||||
$this->_sUsableKey = $this->_getUsableKey($oEpt);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Fonction / Function : _getUsableKey
|
||||
//
|
||||
// Renvoie la cl<63> dans un format utilisable par la certification hmac
|
||||
// Return the key to be used in the hmac function
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
private function _getUsableKey($oEpt){
|
||||
|
||||
$hexStrKey = substr($oEpt->getCle(), 0, 38);
|
||||
$hexFinal = "" . substr($oEpt->getCle(), 38, 2) . "00";
|
||||
|
||||
$cca0=ord($hexFinal);
|
||||
|
||||
if ($cca0>70 && $cca0<97)
|
||||
$hexStrKey .= chr($cca0-23) . substr($hexFinal, 1, 1);
|
||||
else {
|
||||
if (substr($hexFinal, 1, 1)=="M")
|
||||
$hexStrKey .= substr($hexFinal, 0, 1) . "0";
|
||||
else
|
||||
$hexStrKey .= substr($hexFinal, 0, 2);
|
||||
}
|
||||
|
||||
|
||||
return pack("H*", $hexStrKey);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Fonction / Function : computeHmac
|
||||
//
|
||||
// Renvoie le sceau HMAC d'une chaine de donn<6E>es
|
||||
// Return the HMAC for a data string
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
public function computeHmac($sData) {
|
||||
|
||||
return strtolower(hash_hmac("sha1", $sData, $this->_sUsableKey));
|
||||
|
||||
// If you don't have PHP 5 >= 5.1.2 and PECL hash >= 1.1
|
||||
// you may use the hmac_sha1 function defined below
|
||||
//return strtolower($this->hmac_sha1($this->_sUsableKey, $sData));
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Fonction / Function : hmac_sha1
|
||||
//
|
||||
// RFC 2104 HMAC implementation for PHP >= 4.3.0 - Creates a SHA1 HMAC.
|
||||
// Eliminates the need to install mhash to compute a HMAC
|
||||
// Adjusted from the md5 version by Lance Rushing .
|
||||
//
|
||||
// Impl<70>mentation RFC 2104 HMAC pour PHP >= 4.3.0 - Cr<43>ation d'un SHA1 HMAC.
|
||||
// Elimine l'installation de mhash pour le calcul d'un HMAC
|
||||
// Adapt<70>e de la version MD5 de Lance Rushing.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
public function hmac_sha1 ($key, $data) {
|
||||
|
||||
$length = 64; // block length for SHA1
|
||||
if (strlen($key) > $length) { $key = pack("H*",sha1($key)); }
|
||||
$key = str_pad($key, $length, chr(0x00));
|
||||
$ipad = str_pad('', $length, chr(0x36));
|
||||
$opad = str_pad('', $length, chr(0x5c));
|
||||
$k_ipad = $key ^ $ipad ;
|
||||
$k_opad = $key ^ $opad;
|
||||
|
||||
return sha1($k_opad . pack("H*",sha1($k_ipad . $data)));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// function getMethode
|
||||
//
|
||||
// IN:
|
||||
// OUT: Donn<6E>es soumises par GET ou POST / Data sent by GET or POST
|
||||
// description: Renvoie le tableau des donn<6E>es / Send back the data array
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
function getMethode()
|
||||
{
|
||||
if ($_SERVER["REQUEST_METHOD"] == "GET")
|
||||
return $_GET;
|
||||
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST")
|
||||
return $_POST;
|
||||
|
||||
die ('Invalid REQUEST_METHOD (not GET, not POST).');
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// function HtmlEncode
|
||||
//
|
||||
// IN: chaine a encoder / String to encode
|
||||
// OUT: Chaine encod<6F>e / Encoded string
|
||||
//
|
||||
// Description: Encode special characters under HTML format
|
||||
// ********************
|
||||
// Encodage des caract<63>res sp<73>ciaux au format HTML
|
||||
// ----------------------------------------------------------------------------
|
||||
function HtmlEncode ($data)
|
||||
{
|
||||
$SAFE_OUT_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890._-";
|
||||
$encoded_data = "";
|
||||
$result = "";
|
||||
for ($i=0; $i<strlen($data); $i++)
|
||||
{
|
||||
if (strchr($SAFE_OUT_CHARS, $data{$i})) {
|
||||
$result .= $data{$i};
|
||||
}
|
||||
else if (($var = bin2hex(substr($data,$i,1))) <= "7F"){
|
||||
$result .= "&#x" . $var . ";";
|
||||
}
|
||||
else
|
||||
$result .= $data{$i};
|
||||
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
?>
|
358
Phase1Go.php
Normal file
358
Phase1Go.php
Normal file
@ -0,0 +1,358 @@
|
||||
<?php
|
||||
/*****************************************************************************
|
||||
*
|
||||
* "Open source" kit for Monetico Paiement (TM)
|
||||
*
|
||||
* File "Phase1Go.php":
|
||||
*
|
||||
* Author : Euro-Information/e-Commerce
|
||||
* Version : 4.0
|
||||
* Date : 05/06/2014
|
||||
*
|
||||
* Copyright: (c) 2014 Euro-Information. All rights reserved.
|
||||
* License : see attached document "License.txt".
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
// =============================================================================================================================================================
|
||||
// SECTION INCLUDE : Cette section ne doit pas être modifié.
|
||||
// Attention !! MoneticoPaiement_Config contient la clé, vous devez protéger ce fichier avec tous les mécanismes disponibles dans votre environnement de développement.
|
||||
// Vous pouvez pour l'instance mettre ce fichier dans un autre répertoire et/ou changer son nom. Dans ce cas, n'oubliez pas d'adapter le chemin d'inclusion ci-dessous.
|
||||
//
|
||||
// INCLUDE SECTION : This section must not be modified
|
||||
// Warning !! MoneticoPaiement_Config contains the key, you have to protect this file with all the mechanism available in your development environment.
|
||||
// You may for instance put this file in another directory and/or change its name. If so, don't forget to adapt the include path below.
|
||||
// =============================================================================================================================================================
|
||||
|
||||
require_once("MoneticoPaiement_Config.php");
|
||||
|
||||
// PHP implementation of RFC2104 hmac sha1 ---
|
||||
require_once("MoneticoPaiement_Ept.inc.php");
|
||||
|
||||
// =============================================================================================================================================================
|
||||
// FIN SECTION INCLUDE
|
||||
//
|
||||
// END INCLUDE SECTION
|
||||
// =============================================================================================================================================================
|
||||
|
||||
// =============================================================================================================================================================
|
||||
// SECTION PAIEMENT : Cette section doit être modifiée
|
||||
// Ci-après, vous trouverez un exemple des valeurs requises pour effectuer un paiement en utilisant la solution Monetico Paiement.
|
||||
// L'ordre des variables et le format des valeurs doivent correspondre aux spécifications techniques.
|
||||
//
|
||||
// PAYMENT SECTION : This section must be modified
|
||||
// Here after, you will find an example of the values needed to demand a payment using the Monetico paiement solution.
|
||||
// The order of the variables and the format of the values must follow the technical specification.
|
||||
// =============================================================================================================================================================
|
||||
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// SECTION PAIEMENT - Section générale
|
||||
//
|
||||
// PAYMENT SECTION - General section
|
||||
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
// Reference: unique, alphaNum (A-Z a-z 0-9), 12 characters max
|
||||
$sReference = "ref" . date("His");
|
||||
|
||||
// Amount : format "xxxxx.yy" (no spaces)
|
||||
$sMontant = 1.01;
|
||||
|
||||
// Currency : ISO 4217 compliant
|
||||
$sDevise = "EUR";
|
||||
|
||||
// Contextual information related to the order : JSON, UTF-8, hexadecimally encoded
|
||||
// cart details, shipping and delivery addresses, technical context
|
||||
$rawContexteCommand = '{
|
||||
"billing" :
|
||||
{
|
||||
"firstName" : "Ada",
|
||||
"lastName" : "Lovelace",
|
||||
"addressLine1" : "101 Rue de Roisel",
|
||||
"city" : "Y",
|
||||
"postalCode" : "80190",
|
||||
"country" : "FR"
|
||||
},
|
||||
"shipping" :
|
||||
{
|
||||
"firstName" : "Ada",
|
||||
"lastName" : "Lovelace",
|
||||
"addressLine1" : "101 Rue de Roisel",
|
||||
"city" : "Y",
|
||||
"postalCode" : "80190",
|
||||
"country" : "FR",
|
||||
"email" : "ada@some.tld",
|
||||
"phone" : "+33-612345678",
|
||||
"shipIndicator" : "billing_address",
|
||||
"deliveryTimeframe" : "two_day",
|
||||
"firstUseDate" : "2017-01-25",
|
||||
"matchBillingAddress" : true
|
||||
},
|
||||
"client" :
|
||||
{
|
||||
"email" : "ada@some.tld",
|
||||
"mobilePhone" : "+33-612345678",
|
||||
"birthCity" : "Londre",
|
||||
"birthPostalCode" : "W1",
|
||||
"birthCountry" : "GB",
|
||||
"birthdate" : "1815-12-10"
|
||||
}
|
||||
}';
|
||||
$utf8ContexteCommande = utf8_encode( $rawContexteCommand );
|
||||
$sContexteCommande = base64_encode( $utf8ContexteCommande );
|
||||
|
||||
// free texte : a bigger reference, session context for the return on the merchant website
|
||||
$sTexteLibre = "Texte Libre";
|
||||
|
||||
// transaction date : format d/m/y:h:m:s
|
||||
$sDate = date("d/m/Y:H:i:s");
|
||||
|
||||
// Language of the company code
|
||||
$sLangue = "FR";
|
||||
|
||||
// customer email
|
||||
$sEmail = "test@test.zz";
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// SECTION PAIEMENT FRACTIONNE - Section spécifique au paiement fractionné
|
||||
//
|
||||
// INSTALMENT PAYMENT SECTION - Section specific to the installment payment
|
||||
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
// between 2 and 4
|
||||
// entre 2 et 4
|
||||
//$sNbrEch = "4";
|
||||
$sNbrEch = "";
|
||||
|
||||
// date echeance 1 - format dd/mm/yyyy
|
||||
//$sDateEcheance1 = date("d/m/Y");
|
||||
$sDateEcheance1 = "";
|
||||
|
||||
// montant <20>ch<63>ance 1 - format "xxxxx.yy" (no spaces)
|
||||
//$sMontantEcheance1 = "0.26" . $sDevise;
|
||||
$sMontantEcheance1 = "";
|
||||
|
||||
// date echeance 2 - format dd/mm/yyyy
|
||||
$sDateEcheance2 = "";
|
||||
|
||||
// montant <20>ch<63>ance 2 - format "xxxxx.yy" (no spaces)
|
||||
//$sMontantEcheance2 = "0.25" . $sDevise;
|
||||
$sMontantEcheance2 = "";
|
||||
|
||||
// date echeance 3 - format dd/mm/yyyy
|
||||
$sDateEcheance3 = "";
|
||||
|
||||
// montant <20>ch<63>ance 3 - format "xxxxx.yy" (no spaces)
|
||||
//$sMontantEcheance3 = "0.25" . $sDevise;
|
||||
$sMontantEcheance3 = "";
|
||||
|
||||
// date echeance 4 - format dd/mm/yyyy
|
||||
$sDateEcheance4 = "";
|
||||
|
||||
// montant <20>ch<63>ance 4 - format "xxxxx.yy" (no spaces)
|
||||
//$sMontantEcheance4 = "0.25" . $sDevise;
|
||||
$sMontantEcheance4 = "";
|
||||
|
||||
// =============================================================================================================================================================
|
||||
// FIN SECTION PAIEMENT
|
||||
//
|
||||
// END PAYMENT SECTION
|
||||
// =============================================================================================================================================================
|
||||
|
||||
// =============================================================================================================================================================
|
||||
// SECTION CODE : Cette section ne doit pas être modifiée
|
||||
//
|
||||
// CODE SECTION : This section must not be modified
|
||||
// =============================================================================================================================================================
|
||||
|
||||
$oEpt = new MoneticoPaiement_Ept($sLangue);
|
||||
|
||||
$oHmac = new MoneticoPaiement_Hmac($oEpt);
|
||||
|
||||
// Control String for support
|
||||
$CtlHmac = sprintf(MONETICOPAIEMENT_CTLHMAC, MONETICOPAIEMENT_VERSION, $oEpt->sVersion, $oEpt->sNumero, $oHmac->computeHmac(sprintf(MONETICOPAIEMENT_CTLHMACSTR, $oEpt->sVersion, $oEpt->sNumero)));
|
||||
|
||||
// Data to certify
|
||||
$phase1go_fields = implode(
|
||||
'*',
|
||||
[
|
||||
"TPE={$oEpt->sNumero}",
|
||||
"contexte_commande=$sContexteCommande",
|
||||
"date=$sDate",
|
||||
"dateech1=$sDateEcheance1",
|
||||
"dateech2=$sDateEcheance2",
|
||||
"dateech3=$sDateEcheance3",
|
||||
"dateech4=$sDateEcheance4",
|
||||
"lgue=$sLangue",
|
||||
"mail=$sEmail",
|
||||
"montant=$sMontant{$sDevise}",
|
||||
"montantech1=$sMontantEcheance1",
|
||||
"montantech2=$sMontantEcheance2",
|
||||
"montantech3=$sMontantEcheance3",
|
||||
"montantech4=$sMontantEcheance4",
|
||||
"nbrech=$sNbrEch",
|
||||
"reference=$sReference",
|
||||
"societe={$oEpt->sCodeSociete}",
|
||||
"texte-libre=$sTexteLibre",
|
||||
"url_retour_err=$oEpt->sUrlKO",
|
||||
"url_retour_ok=$oEpt->sUrlOK",
|
||||
"version={$oEpt->sVersion}"
|
||||
]
|
||||
);
|
||||
|
||||
// MAC computation
|
||||
$sMAC = $oHmac->computeHmac($phase1go_fields);
|
||||
|
||||
// =============================================================================================================================================================
|
||||
// FIN SECTION CODE
|
||||
//
|
||||
// END CODE SECTION
|
||||
// =============================================================================================================================================================
|
||||
?>
|
||||
|
||||
<!--============================================================================================================================================================
|
||||
SECTION PAGE HTML
|
||||
Ci-dessous se trouve un exemple de code html comprenant le formulaire de paiement. La partie importante est la section FORMULAIRE. Le reste de la section
|
||||
PAGE HTML est uniquement là pour mettre en forme l'exemple.
|
||||
|
||||
HTML PAGE SECTION
|
||||
Here after is an example of html code including the payment form. The important part is the FORM section. The rest of the HTML PAGE section is only here
|
||||
for the example.
|
||||
===========================================================================================================================================================-->
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
|
||||
<meta http-equiv="cache-control" content="no-store, no-cache, must-revalidate, post-check=0, pre-check=0" />
|
||||
<meta http-equiv="Expires" content="Mon, 26 Jul 1997 05:00:00 GMT" />
|
||||
<meta http-equiv="pragma" content="no-cache" />
|
||||
<title>Connexion au serveur de paiement</title>
|
||||
<link type="text/css" rel="stylesheet" href="moneticopaiement.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="header">
|
||||
<a href="http://www.monetico.ca"><img src="logomoneticopaiement.png" alt="Monetico Paiement" title="Monetico Paiement" /></a>
|
||||
</div>
|
||||
<h1>Connexion au serveur de paiement / <span class="anglais">Connection to the payment server</span></h1>
|
||||
<div id="presentation">
|
||||
<p>
|
||||
Cette page génère le formulaire de paiement avec des données arbitraires.<br />
|
||||
<span class="anglais">This page generates the payment form with some arbitrary data.</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="frm">
|
||||
<p>
|
||||
Cliquez sur le bouton ci-dessous pour vous connecter au serveur de paiement.<br />
|
||||
<span class="anglais">Click on the following button to be redirected to the payment server.</span>
|
||||
</p>
|
||||
<!--============================================================================================================================================================
|
||||
SECTION FORMULAIRE : cette section doit être copiée dans votre propre page afin d'afficher le bouton de paiement. Aucune modification n'est requise.
|
||||
|
||||
FORM SECTION : this section must be copied into your own page in order to display payment button. No modification are needed.
|
||||
=============================================================================================================================================================-->
|
||||
<form action="<?php echo $oEpt->sUrlPaiement;?>" method="post" id="PaymentRequest">
|
||||
<p>
|
||||
<input type="hidden" name="version" id="version" value="<?php echo $oEpt->sVersion;?>" />
|
||||
<input type="hidden" name="TPE" id="TPE" value="<?php echo $oEpt->sNumero;?>" />
|
||||
<input type="hidden" name="date" id="date" value="<?php echo $sDate;?>" />
|
||||
<input type="hidden" name="contexte_commande" id="contexte_commande" value="<?php echo $sContexteCommande;?>" />
|
||||
<input type="hidden" name="montant" id="montant" value="<?php echo $sMontant . $sDevise;?>" />
|
||||
<input type="hidden" name="reference" id="reference" value="<?php echo $sReference;?>" />
|
||||
<input type="hidden" name="MAC" id="MAC" value="<?php echo $sMAC;?>" />
|
||||
<input type="hidden" name="url_retour_ok" id="url_retour_ok" value="<?php echo $oEpt->sUrlOK;?>" />
|
||||
<input type="hidden" name="url_retour_err" id="url_retour_err" value="<?php echo $oEpt->sUrlKO;?>" />
|
||||
<input type="hidden" name="lgue" id="lgue" value="<?php echo $oEpt->sLangue;?>" />
|
||||
<input type="hidden" name="societe" id="societe" value="<?php echo $oEpt->sCodeSociete;?>" />
|
||||
<input type="hidden" name="texte-libre" id="texte-libre" value="<?php echo HtmlEncode($sTexteLibre);?>" />
|
||||
<input type="hidden" name="mail" id="mail" value="<?php echo $sEmail;?>" />
|
||||
<!-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
SECTION PAIEMENT FRACTIONNE - Section spécifique au paiement fractionné
|
||||
|
||||
INSTALLMENT PAYMENT SECTION - Section specific to the installment payment
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------->
|
||||
<input type="hidden" name="nbrech" id="nbrech" value="<?php echo $sNbrEch;?>" />
|
||||
<input type="hidden" name="dateech1" id="dateech1" value="<?php echo $sDateEcheance1;?>" />
|
||||
<input type="hidden" name="montantech1" id="montantech1" value="<?php echo $sMontantEcheance1;?>" />
|
||||
<input type="hidden" name="dateech2" id="dateech2" value="<?php echo $sDateEcheance2;?>" />
|
||||
<input type="hidden" name="montantech2" id="montantech2" value="<?php echo $sMontantEcheance2;?>" />
|
||||
<input type="hidden" name="dateech3" id="dateech3" value="<?php echo $sDateEcheance3;?>" />
|
||||
<input type="hidden" name="montantech3" id="montantech3" value="<?php echo $sMontantEcheance3;?>" />
|
||||
<input type="hidden" name="dateech4" id="dateech4" value="<?php echo $sDateEcheance4;?>" />
|
||||
<input type="hidden" name="montantech4" id="montantech4" value="<?php echo $sMontantEcheance4;?>" />
|
||||
<!-------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
FIN SECTION PAIEMENT FRACTIONNE
|
||||
|
||||
END INSTALLMENT PAYMENT SECTION
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------->
|
||||
<input type="submit" name="bouton" id="bouton" value="Connexion / Connection" />
|
||||
</p>
|
||||
</form>
|
||||
<!--============================================================================================================================================================
|
||||
FIN SECTION FORMULAIRE
|
||||
|
||||
END FORM SECTION
|
||||
=============================================================================================================================================================-->
|
||||
</div>
|
||||
<div id="source">
|
||||
<h2>Uniquement pour le débogage / <span class="anglais">For debug purpose only</span></h2>
|
||||
<p>
|
||||
Code source du formulaire. <br />
|
||||
<span class="anglais">Form source code.</span>
|
||||
</p>
|
||||
<pre>
|
||||
<form <span class="name">action</span>="<span class="value"><?php echo $oEpt->sUrlPaiement;?>"</span> method="post" id="PaymentRequest">
|
||||
<!-- Uniquement pour le Paiement fractionné / Only for installment payment -->
|
||||
<input type="hidden" name="<span class="name">MAC</span>" value="<span class="value"><?php echo $sMAC;?></span>" />
|
||||
<input type="hidden" name="<span class="name">TPE</span>" value="<span class="value"><?php echo $oEpt->sNumero;?></span>" />
|
||||
<input type="hidden" name="<span class="name">contexte_commande</span>" value="<span class="value"><?php echo $sContexteCommande;?></span>" />
|
||||
<input type="hidden" name="<span class="name">date</span>" value="<span class="value"><?php echo $sDate;?></span>" />
|
||||
<input type="hidden" name="<span class="name">dateech1</span>" value="<span class="value"><?php echo $sDateEcheance1;?></span>" />
|
||||
<input type="hidden" name="<span class="name">dateech2</span>" value="<span class="value"><?php echo $sDateEcheance2;?></span>" />
|
||||
<input type="hidden" name="<span class="name">dateech3</span>" value="<span class="value"><?php echo $sDateEcheance3;?></span>" />
|
||||
<input type="hidden" name="<span class="name">dateech4</span>" value="<span class="value"><?php echo $sDateEcheance4;?></span>" />
|
||||
<input type="hidden" name="<span class="name">lgue</span>" value="<span class="value"><?php echo $oEpt->sLangue;?></span>" />
|
||||
<input type="hidden" name="<span class="name">mail</span>" value="<span class="value"><?php echo $sEmail;?></span>" />
|
||||
<input type="hidden" name="<span class="name">montant</span>" value="<span class="value"><?php echo $sMontant . $sDevise;?></span>" />
|
||||
<input type="hidden" name="<span class="name">montantech1</span>" value="<span class="value"><?php echo $sMontantEcheance1;?></span>" />
|
||||
<input type="hidden" name="<span class="name">montantech2</span>" value="<span class="value"><?php echo $sMontantEcheance2;?></span>" />
|
||||
<input type="hidden" name="<span class="name">montantech3</span>" value="<span class="value"><?php echo $sMontantEcheance3;?></span>" />
|
||||
<input type="hidden" name="<span class="name">montantech4</span>" value="<span class="value"><?php echo $sMontantEcheance4;?></span>" />
|
||||
<input type="hidden" name="<span class="name">nbrech</span>" value="<span class="value"><?php echo $sNbrEch;?></span>" />
|
||||
<input type="hidden" name="<span class="name">reference</span>" value="<span class="value"><?php echo $sReference;?></span>" />
|
||||
<input type="hidden" name="<span class="name">societe</span>" value="<span class="value"><?php echo $oEpt->sCodeSociete;?></span>" />
|
||||
<input type="hidden" name="<span class="name">texte-libre</span>" value="<span class="value"><?php echo HtmlEncode($sTexteLibre);?></span>" />
|
||||
<input type="hidden" name="<span class="name">url_retour_err</span>" value="<span class="value"><?php echo $oEpt->sUrlKO;?></span>" />
|
||||
<input type="hidden" name="<span class="name">url_retour_ok</span>" value="<span class="value"><?php echo $oEpt->sUrlOK;?></span>" />
|
||||
<input type="hidden" name="<span class="name">version</span>" value="<span class="value"><?php echo $oEpt->sVersion;?></span>" />
|
||||
<!-- -->
|
||||
<input type="submit" name="<span class="name">bouton</span>" value="<span class="value">Connexion / Connection</span>" />
|
||||
</form>
|
||||
</pre>
|
||||
</div>
|
||||
<div>
|
||||
<p>
|
||||
Chaîne de contrôle à fournir au support en cas de problèmes <br />
|
||||
<span class="anglais">Control string needed by support in case of problems</span>
|
||||
</p>
|
||||
<pre><?php echo $CtlHmac;?></pre>
|
||||
<p>
|
||||
Chaîne utilisée pour le calcul du sceau HMAC <br />
|
||||
</p>
|
||||
<pre><?php echo $phase1go_fields;?></pre>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>
|
||||
Cette page est fournie comme un exemple d'implémentation de Monetico Paiement.<br />
|
||||
Elle n'a pas pour but de répondre à toutes les configurations existantes. © 2014 Euro Information.<br />
|
||||
<span class="anglais">This page is just an example of the use of Monetico Paiement.<br />
|
||||
Its main purpose is not to give an answer to every existing configurations. © 2014 Euro Information</span>
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<!--============================================================================================================================================================
|
||||
FIN SECTION PAGE HTML
|
||||
|
||||
END HTML PAGE SECTION
|
||||
=============================================================================================================================================================-->
|
197
Phase2Back.php
Normal file
197
Phase2Back.php
Normal file
@ -0,0 +1,197 @@
|
||||
<?php
|
||||
/*****************************************************************************
|
||||
*
|
||||
* "Open source" kit for Monetico Paiement(TM).
|
||||
* Process Monetico Paiement. Sample RFC2104 compliant with PHP4 skeleton.
|
||||
*
|
||||
* File "Phase2Back.php":
|
||||
*
|
||||
* Author : Euro-Information/e-Commerce
|
||||
* Version : 4.0
|
||||
* Date : 05/06/2014
|
||||
*
|
||||
* Copyright: (c) 2014 Euro-Information. All rights reserved.
|
||||
* License : see attached document "Licence.txt".
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
header("Pragma: no-cache");
|
||||
header("Content-type: text/plain");
|
||||
|
||||
// =============================================================================================================================================================
|
||||
// SECTION INCLUDE : Cette section ne doit pas être modifié.
|
||||
// Attention !! MoneticoPaiement_Config contient la clé, vous devez protéger ce fichier avec tous les mécanismes disponibles dans votre environnement de développement.
|
||||
// Vous pouvez pour l'instance mettre ce fichier dans un autre répertoire et/ou changer son nom. Dans ce cas, n'oubliez pas d'adapter le chemin d'inclusion ci-dessous.
|
||||
//
|
||||
// INCLUDE SECTION : This section must not be modified
|
||||
// Warning !! MoneticoPaiement_Config contains the key, you have to protect this file with all the mechanism available in your development environment.
|
||||
// You may for instance put this file in another directory and/or change its name. If so, don't forget to adapt the include path below.
|
||||
// =============================================================================================================================================================
|
||||
|
||||
require_once("MoneticoPaiement_Config.php");
|
||||
|
||||
// --- PHP implementation of RFC2104 hmac sha1 ---
|
||||
require_once("MoneticoPaiement_Ept.inc.php");
|
||||
|
||||
// =============================================================================================================================================================
|
||||
// FIN SECTION INCLUDE
|
||||
//
|
||||
// END INCLUDE SECTION
|
||||
// =============================================================================================================================================================
|
||||
|
||||
// =============================================================================================================================================================
|
||||
// SECTION CODE : Cette section ne doit pas être modifiée
|
||||
//
|
||||
// CODE SECTION : This section must not be modified
|
||||
// =============================================================================================================================================================
|
||||
|
||||
// Begin Main : Retrieve Variables posted by Monetico Paiement Server
|
||||
$MoneticoPaiement_bruteVars = getMethode();
|
||||
|
||||
// TPE init variables
|
||||
$oEpt = new MoneticoPaiement_Ept();
|
||||
$oHmac = new MoneticoPaiement_Hmac($oEpt);
|
||||
|
||||
function computeHmacSource($source, $oEpt)
|
||||
{
|
||||
$anomalies = null;
|
||||
if( array_key_exists('TPE', $source) )
|
||||
$anomalies = $source["TPE"] != $oEpt->sNumero ? ":TPE" : null;
|
||||
if( array_key_exists('version', $source) )
|
||||
$anomalies .= $source["version"] == $oEpt->sVersion ? ":version" : null;
|
||||
|
||||
// sole field to exclude from the MAC computation
|
||||
if( array_key_exists('MAC', $source) )
|
||||
unset($source['MAC']);
|
||||
else
|
||||
$anomalies .= ":MAC";
|
||||
|
||||
if($anomalies != null)
|
||||
return "anomaly_detected" . $anomalies;
|
||||
|
||||
// order by key is mandatory
|
||||
ksort($source);
|
||||
// map entries to "key=value" to match the target format
|
||||
array_walk($source, function(&$a, $b) { $a = "$b=$a"; });
|
||||
// join all entries using asterisk as separator
|
||||
return implode( '*', $source);
|
||||
}
|
||||
|
||||
// Message Authentication
|
||||
$MAC_source = computeHmacSource($MoneticoPaiement_bruteVars, $oEpt);
|
||||
$computed_MAC = $oHmac->computeHmac($MAC_source);
|
||||
$congruent_MAC = array_key_exists('MAC', $MoneticoPaiement_bruteVars) &&
|
||||
$computed_MAC == strtolower($MoneticoPaiement_bruteVars['MAC']);
|
||||
|
||||
if ($congruent_MAC)
|
||||
{
|
||||
// =============================================================================================================================================================
|
||||
// FIN SECTION CODE
|
||||
//
|
||||
// END CODE SECTION
|
||||
// =============================================================================================================================================================
|
||||
|
||||
// =============================================================================================================================================================
|
||||
// SECTION IMPLEMENTATION : Vous devez modifier ce code afin d'y mettre votre propre logique métier
|
||||
//
|
||||
// IMPLEMENTATION SECTION : You must adapt this code with your own application logic.
|
||||
// =============================================================================================================================================================
|
||||
|
||||
switch($MoneticoPaiement_bruteVars['code-retour']) {
|
||||
|
||||
case "Annulation" :
|
||||
// Paiement refusé
|
||||
// Insérez votre code ici (envoi d'email / mise à jour base de données)
|
||||
// Attention : une autorisation peut toujours être délivrée pour ce paiement
|
||||
//
|
||||
// Payment has been refused
|
||||
// put your code here (email sending / Database update)
|
||||
// Attention : an authorization may still be delivered for this payment
|
||||
break;
|
||||
|
||||
case "payetest":
|
||||
// Paiement accepté sur le serveur de test
|
||||
// Insérez votre code ici (envoi d'email / mise à jour base de données)
|
||||
//
|
||||
// Payment has been accepted on the test server
|
||||
// put your code here (email sending / Database update)
|
||||
break;
|
||||
|
||||
case "paiement":
|
||||
// Paiement accepté sur le serveur de production
|
||||
// Insérez votre code ici (envoi d'email / mise à jour base de données)
|
||||
//
|
||||
// Payment has been accepted on the productive server
|
||||
// put your code here (email sending / Database update)
|
||||
break;
|
||||
|
||||
|
||||
/*** SEULEMENT POUR LES PAIEMENTS FRACTIONNES ***/
|
||||
/*** ONLY FOR MULTIPART PAYMENT ***/
|
||||
case "paiement_pf2":
|
||||
case "paiement_pf3":
|
||||
case "paiement_pf4":
|
||||
// Paiement accepté sur le serveur de production pour l'échéance #N
|
||||
// Le code de retour est du type paiement_pf[#N]
|
||||
// Insérez votre code ici (envoi d'email / mise à jour base de données)
|
||||
// Le montant du paiement pour cette échéance se trouve dans $MoneticoPaiement_bruteVars['montantech']
|
||||
//
|
||||
// Payment has been accepted on the productive server for the part #N
|
||||
// return code is like paiement_pf[#N]
|
||||
// put your code here (email sending / Database update)
|
||||
// You have the amount of the payment part in $MoneticoPaiement_bruteVars['montantech']
|
||||
break;
|
||||
|
||||
case "Annulation_pf2":
|
||||
case "Annulation_pf3":
|
||||
case "Annulation_pf4":
|
||||
// Paiement refusé sur le serveur de production pour l'échéance #N
|
||||
// Le code de retour est du type Annulation_pf[#N]
|
||||
// Insérez votre code ici (envoi d'email / mise à jour base de données)
|
||||
// Le montant du paiement pour cette échéance se trouve dans $MoneticoPaiement_bruteVars['montantech']
|
||||
//
|
||||
// Payment has been refused on the productive server for the part #N
|
||||
// return code is like Annulation_pf[#N]
|
||||
// put your code here (email sending / Database update)
|
||||
// You have the amount of the payment part in $MoneticoPaiement_bruteVars['montantech']
|
||||
break;
|
||||
}
|
||||
|
||||
// =============================================================================================================================================================
|
||||
// FIN SECTION IMPLEMENTATION
|
||||
//
|
||||
// END IMPLEMENTATION SECTION
|
||||
// =============================================================================================================================================================
|
||||
|
||||
// =============================================================================================================================================================
|
||||
// SECTION CODE 2 : Cette section ne doit pas être modifiée
|
||||
//
|
||||
// CODE SECTION 2 : This section must not be modified
|
||||
// =============================================================================================================================================================
|
||||
|
||||
$receipt = MONETICOPAIEMENT_PHASE2BACK_MACOK;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// traitement en cas de HMAC incorrect
|
||||
// your code if the HMAC doesn't match
|
||||
$receipt = MONETICOPAIEMENT_PHASE2BACK_MACNOTOK.$computed_MAC.
|
||||
"\n$MAC_source";
|
||||
;
|
||||
}
|
||||
|
||||
// =============================================================================================================================================================
|
||||
// FIN SECTION CODE 2
|
||||
//
|
||||
// END CODE SECTION 2
|
||||
// =============================================================================================================================================================
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Send receipt to Monetico Paiement server
|
||||
//-----------------------------------------------------------------------------
|
||||
printf (MONETICOPAIEMENT_PHASE2BACK_RECEIPT, $receipt);
|
||||
|
||||
// Copyright (c) 2014 Euro-Information
|
||||
// All rights reserved. ---
|
||||
?>
|
1
[Content_Types].xml
Normal file
1
[Content_Types].xml
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="txt" ContentType="text/plain" /><Default Extension="png" ContentType="text/plain" /><Default Extension="css" ContentType="text/plain" /><Default Extension="php" ContentType="text/plain" /></Types>
|
33
lexicon.txt
Normal file
33
lexicon.txt
Normal file
@ -0,0 +1,33 @@
|
||||
#========================================================#
|
||||
# The purpose of this document is to provide #
|
||||
# a lexicon explaining the meaning of the variables #
|
||||
# sent to Monetico Paiement #
|
||||
#========================================================#
|
||||
|
||||
Kit paiement :
|
||||
|
||||
Version = version of the EPT
|
||||
TPE = EPT number
|
||||
Date = transaction date
|
||||
Montant = order amount
|
||||
Devise = currency
|
||||
Reference = order reference
|
||||
url_retour = callback url
|
||||
url_retour_ok = callback url if success
|
||||
url_retour_ko = callback url if error
|
||||
Langue = language
|
||||
CodeSociete = company code
|
||||
TexteLibre = free text
|
||||
Email = customer email
|
||||
NbrEch = number of payment deadlines (from 2 to 4)
|
||||
DateEcheance1 = date of 1st payment
|
||||
MontantEcheance1 = amount of 1st payment
|
||||
DateEcheance2 = date of 2nd payment
|
||||
MontantEcheance2 = amount of 2nd payment
|
||||
DateEcheance3 = date of 3rd payment
|
||||
MontantEcheance3 = amount of 3rd payment
|
||||
DateEcheance4 = date of 4th payment
|
||||
MontantEcheance4 = amount of 4th payment
|
||||
|
||||
#The sum of all payment deadlines amount must be equal to the order amount
|
||||
|
BIN
logomoneticopaiement.png
Normal file
BIN
logomoneticopaiement.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.2 KiB |
117
moneticopaiement.css
Normal file
117
moneticopaiement.css
Normal file
@ -0,0 +1,117 @@
|
||||
/*****************************************************************************
|
||||
*
|
||||
* "open source" kit for Monetico Paiement(TM)
|
||||
*
|
||||
* File "moneticopayment.css":
|
||||
*
|
||||
* Author : Euro-Information/e-Commerce
|
||||
* Version : 4.0
|
||||
* Date : 05/06/2014
|
||||
*
|
||||
* Copyright: (c) 2014 Euro-Information. All rights reserved.
|
||||
* License : see attached document "License.txt".
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
a:link, a:visited, a:active {
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.anglais {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
body {
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
font-size: 12px;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
.champs {
|
||||
font-size: 12px;
|
||||
border: 1px solid #E75A2A;
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.clear_both {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.droite {
|
||||
float: right;
|
||||
}
|
||||
|
||||
div {
|
||||
width: 780px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#footer {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
#frm {
|
||||
padding: 5px;
|
||||
border: 1px solid #E75A2A;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
#frm p {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.gauche {
|
||||
float: left;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 22px;
|
||||
color: #FF9600;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 20px;
|
||||
color: #FF9600;
|
||||
}
|
||||
|
||||
#header {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
.infos {
|
||||
display: none;
|
||||
padding: 2px;
|
||||
width: 460px;
|
||||
background-color: #FFF;
|
||||
border: 1px dotted #F00;
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 170px;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 2px;
|
||||
background-color: #FFF;
|
||||
border: 1px dotted #F00;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0px solid #FFF;
|
||||
}
|
||||
|
||||
.value {
|
||||
color: #339966;
|
||||
}
|
||||
|
||||
.name {
|
||||
color: #FF6600;
|
||||
}
|
23
readme.txt
Normal file
23
readme.txt
Normal file
@ -0,0 +1,23 @@
|
||||
#==============================================================================
|
||||
#
|
||||
# "Open source" kit for Monetico Paiement(TM).
|
||||
# Integration sample in a merchant site for PHP
|
||||
#
|
||||
# Author : Euro-Information/e-Commerce
|
||||
# Version : 4.0
|
||||
# Date : 05/06/2014
|
||||
#
|
||||
# Copyright: (c) 2014 Euro-Information. All rights reserved.
|
||||
#
|
||||
#==============================================================================
|
||||
|
||||
Files included in this example package :
|
||||
moneticopaiement.css : Cascaded Style Sheet file
|
||||
background.gif : background image of the php pages
|
||||
logomoneticopaiement.png : Monetico Paiement logo
|
||||
Phase1Go.php : Form example to connect to the payment page
|
||||
Phase2Back.php : Callback example to return an acknowledgment to the bank server
|
||||
MoneticoPaiement_Ept.inc.php : Classes and functions
|
||||
MoneticoPaiement_Config.php : Key file. WARNING ! You have to protect this file with all the mechanism available in your development environment.
|
||||
License.txt : Usage conditions of the previous files
|
||||
readme.txt : this current file
|
Loading…
Reference in New Issue
Block a user