11
11
11

.

)

, - PCI DSS ( SAQ D), -. paygateway POST c : 

:
            
     PAN*)        4000000000000000
     expmonth*) (01, 02, 03, ..., 12) 07
expyear*) (4 2015 (4 ) 2015
cardholder*) / IVAN IVANOV
securecode CVV2/CVC2 112
amount (amountcurr) 100, 100.2, 100.25
amountcurr , (amount) RUB/USD/EUR/GBP
number ( 32 ); : 0- 9a-zA-Z--, ("-"), ("."), ("/") Invoice5412
description , URL-encoded %37%31+%56%77
trtype **) 1
recurringFrequency ( 1), , trtype = 3 4 28
recurringEndDate , () , , trtype = 3 4 20151231
account paygateway ( )  
paytoken , ( )  
lang paygateway (RU ; EN ); EN
backURL ***) URL ,  
signature ****)  

! UTF-8.


*) , ( paytoken).
**) trtype : 1 , 2 , 3 , 4

***) . , backURL , ,

****) : "" amount, amountcurr, number, description, trtype, account, paytoken, lang, backURL, __1 ( ), __2 ( ). , paytoken, lang, backURL , , . : 1) md5; 2) HMAC sha256 (, : __1, __2).

PHP

					 <?
$PAN = "4000000000000000"; $expmonth = "07"; $expyear = "2015";
$cardholder = "IVAN IVANOV"; $securecode = "112"; $amount = "10.23"; $amountcurr = "RUB"; $currency = "MBC";
$number = "5412";
$description = urlencode("   $amount $amountcurr"); $trtype = "1";
$account = "acc001002";
$signature = "$PAN:$expmonth:$expyear:$cardholder:$securecode:"; $signature .= "$amount:$amountcurr:$currency:$number:$description:"; $signature .= "$trtype:$account:__1:__2"; $signature = strtoupper(md5($signature));
?>

<form action="https://secure.paygateway.ru/api/payment/*****" method=POST> <input type="hidden" name="PAN" value="<?print $PAN?>">
<input type="hidden" name="expmonth" value="<?print $expmonth?>"> <input type="hidden" name="expyear" value="<?print $expyear?>"> <input type="hidden" name="cardholder" value="<?print $cardholder?>"> <input type="hidden" name="securecode" value="<?print $securecode?>"> <input type="hidden" name="amount" value="<?print $amount?>">
<input type="hidden" name="amountcurr" value="<?print $amountcurr?>"> <input type="hidden" name="number" value="<?print $number?>">
<input type="hidden" name="description" value="<?print $description?>"> <input type="hidden" name="trtype" value="<?print $trtype?>">
<input type="hidden" name="account" value="<?print $account?>"> <input type="hidden" name="signature" value="<?print $signature?>">
<input type="submit" value=""> </form>