Created
July 25, 2016 08:49
-
-
Save myalban/82c62810ac69b8d7b42ee0c4d8c77d17 to your computer and use it in GitHub Desktop.
Sips-ATOS v2 (BNP Paribas, mercanet)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$action = 'https://payment-webinit.simu.mercanet.bnpparibas.net/paymentInit'; | |
//$action = 'https://payment-webinit.mercanet.bnpparibas.net/paymentInit'; | |
$merchantId = '002001000000001'; | |
$keyVersion = '1'; | |
$secretKey = '002001000000001_KEY1'; | |
$Data = 'amount=1000'; | |
$Data .= '|currencyCode=978'; | |
$Data .= '|merchantId=' . $merchantId; | |
$Data .= '|normalReturnUrl=http://161.io'; | |
//$Data .= '|transactionReference=534654'; | |
$Data .= '|transactionReference=' . uniqid(); | |
$Data .= '|keyVersion=' . $keyVersion; | |
$Seal = hash('sha256', $Data . $secretKey); | |
// Visa : 4100000000000000 | |
// Mastercard: 5100000000000000 | |
// Maestro : 5000000000000000 | |
?> | |
<form method="post" action="<?= $action ?>"> | |
<input type="hidden" name="Data" value="<?= $Data ?>"/> | |
<input type="hidden" name="InterfaceVersion" value="HP_2.9"/> | |
<input type="hidden" name="Seal" value="<?= $Seal ?>"/> | |
<input type="submit" value="Proceed to payment"/> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment