The seller has to be registered in PayOut system and has the PayOut card. Attention!
The seller should fill the field "Keyword" and "URL of payment execution" in the registration form. They are needed for the payment system.
HTML forms
To transfer the information between the seller's website and PayOut system, the following HTML forms are used:
- Payment request form - it's generated by the seller's website to form the request for payment in PayOut system and transfer it through the buyer's web-browser.
- Pre-request form - it's generated by PayOut system to transfer the parameters of pre-request to make the payment to the seller's website. The request is sent without using the buyer's web-browser.
- Payment notification form - it's generated by PayOut system to transfer the notification about a payment to the seller's website. The notification is sent without using the buyer's web-browser.
Payment request form
This form transfers the request from the seller's website to PayOut system through the buyer's web-browser. The form should have the following attributes and fields:
Action - http://payout.ru/pay/
Method - POST
The fields sent in the payment request form:
l language, values: r - Russian, e - English;
act - the value always equals one;
PROJECT_NAME - the name of the seller's website, not more than 50 characters, letters, digits, underline, space, comma, point;
PROJECT_NUMBER - number of PayOut card of the seller's web-site, to which the amount will be transferred;
PAYMENT_AMOUNT - amount, format with a point;
PAYMENT_CURRENCY - currency of the price on the seller's website, values: USD, EUR, RUR, PO;
PAYMENT_ID - number of the goods or account (bill) on the seller's website;
INFO - information about the paid goods or service, not more than 150 characters, letters, digits, underline, space, comma, point;
URL_PAY - URL of payment execution for checking up the completion of the data and execution of the sale by the seller's website;
URL_SUCCESS - URL of successful transfer to the seller's site;
URL_ERROR - URL of unsuccessful transfer to the seller's website;
HPROJECT_(name of the seller's website field) - any fields of the seller's website which should be transferred back to the site after the payment. The name of the field should start from HPROJECT_.
Example of payment request form:
<form action='http://payout.ru/pay/' method='POST'>
<input type='hidden' name='l' value='у'>
<input type='hidden' name='act' value='one'>
<input type='hidden' name='PROJECT_NAME' value='3mp3.ru'>
<input type='hidden' name='PROJECT_NUMBER' value='1111111111'>
<input type='hidden' name='PAYMENT_AMOUNT' value='9.95'>
<input type='hidden' name='PAYMENT_CURRENCY' value='USD'>
<input type='hidden' name='PAYMENT_ID' value='123456789'>
<input type='hidden' name='INFO' value='Payment for mp3'>
<input type='hidden' name='URL_SUCCESS' value='http://3mp3.ru/cgi-bin/cash_ok.pl'>
<input type='hidden' name='URL_ERROR' value='http://3mp3.ru/cgi-bin/cash_er.pl'>
<input type='hidden' name='HPROJECT_param1' value='my param 1'>
<input type='hidden' name='HPROJECT_param2' value='my param 2'>
<input type='submit' value='Pay'>
</form>
Pre-request form
This form sends to the seller the parameters of the payment executed. The request is sent without using the buyer's web-browser. It has the following attributes and fields:
Action - URL of payment execution URL_PAY (enter it in the registration form)
Method - POST
Fields sent in the pre-request form:
PROJECT_NAME - name of the seller's website, not more than 50 characters, letters, digits, underline, comma, point, space;
PROJECT_NUMBER - number of PayOut card of the seller's website to which the amount will be transferred;
PAYMENT_AMOUNT - amount, format with point;
PAYMENT_ID - number of the goods or account (bill) at the seller's website;
CLIENT_NUMBER - number of PayOut card of payer;
INFO - information about the paid goods or service, not more than 150 characters, letters, digits, underline, space, comma, point;
CHECK - attribute of pre-request, value 1;
STATUS - status of payment, value 0 (the payment has not been done yet)
HASH - control signature for data completion check.
Example of pre-request form:
<form action='http://3mp3.ru/cgi-bin/cash_pay.pl' method='POST'>
<input type='hidden' name='PROJECT_NAME' value='3mp3.ru'>
<input type='hidden' name='PROJECT_NUMBER' value='1111111111'>
<input type='hidden' name='PAYMENT_AMOUNT' value='9.95'>
<input type='hidden' name='PAYMENT_ID' value='123456789'>
<input type='hidden' name='CLIENT_NUMBER' value='2222222222'>
<input type='hidden' name='INFO' value='Payment for mp3'>
<input type='hidden' name='STATUS' value='0'>
<input type='hidden' name='CHECK' value='1'>
<input type='hidden' name='HASH' value='CAF51A99C195E2E9652E16E9F1ED9D1C'>
</form>
The seller's website should check the completion of the data and control signature and if everything is ok, send back 'OK' value, if something is wrong, it's not obligatory to send anything back
Payment notification form
This form transfers the notification about a payment to the seller's website. The notification is sent without using the buyer's web-browser. It has the following attributes and values:
Action - URL of payment execution URL_PAY (enter it in the registration form)
Method - POST
Fields sent in payment notification form:
PROJECT_NAME - name of the seller's website, not more than 50 characters, letters, digits, underline, comma, point, space;
PROJECT_NUMBER - number of PayOut card of the seller's website to which the amount will be transferred;
PAYMENT_AMOUNT - amount, format with point;
PAYMENT_ID - number of the goods or account (bill) at the seller's website;
CLIENT_NUMBER - number of PayOut card of payer;
INFO - information about the paid goods or service, not more than 150 characters, letters, digits, underline, space, comma, point;
STATUS - status of payment, value 1 (the payment has been done)
HASH - control signature for data completion check;
ITER - unique number of iteration in PayOut system.
Example of payment notification form
<form action='http://3mp3.ru/cgi-bin/cash_pay.pl' method='POST'>
<input type='hidden' name='PROJECT_NAME' value='3mp3.ru'>
<input type='hidden' name='PROJECT_NUMBER' value='1111111111'>
<input type='hidden' name='PAYMENT_AMOUNT' value='9.95'>
<input type='hidden' name='PAYMENT_ID' value='123456789'>
<input type='hidden' name='CLIENT_NUMBER' value='2222222222'>
<input type='hidden' name='INFO' value='Payment for mp3'>
<input type='hidden' name='STATUS' value='1'>
<input type='hidden' name='HASH' value='FD451A99C195A2E4552E16F9F1ED2D1C'>
<input type='hidden' name='ITER' value='123456789'>
</form>
The seller's website should check the completion of the data and control signature and if everything is ok, send back 'OK' value, if something is wrong, it's not obligatory to send anything back
Data completion check
Sending the payment execution notification, PayOut system transfers the data on payment and control signature (HASH), which lets check the invariance of the transferred data.
The seller's site should provide the check up of the data completion at the stage of getting pre-request and notification of payment. If the data is wrong, the seller's site should NOT send back OK value in URL of the executed payment to these two requests. In this case it doesn't matter what the seller's site sends back, most important thing is that it doesn't equal 'OK'.
It's necessary to check the following data:
PROJECT_NUMBER - number of PayOut card of the seller's website to which the amount will be transferred;
PAYMENT_AMOUNT - amount, format with point;
PAYMENT_ID - number of the goods or account (bill) at the seller's website;
HASH - control signature for data completion check;
Control signature for data completion check
- Control signature for data completion check is sent in HASH parameter.
- The control signature of payment data lets the seller check the source of the data and invariance of the data sent to URL of payment execution.
- The control signature is formed from the values of the fields connected with concatenation, encoded by MD5 hex algorithm and transferred to the upper case.
The fields are connected in the following order:
1. For pre-request:
STRING=PROJECT_NAME:PROJECT_NUMBER:PAYMENT_AMOUNT:PAYMENT_ID:CLIENT_NUMBER:INFO:keyword;
keyword - key word, you entered id registration form
HASH=MD5::md5_hex(STRING)
Then you should transfer the line into the upper case!
Example of code in Perl:
my $str=$project_name.":".$project_number.":".$payment_amount.":".$payment_id.":".$client_nubmer.":".$info.":".$keyword;
keyword - key word, you entered id registration form
my =uc(Digest::MD5::md5_hex($str));
1.For payment notification:
STRING=PROJECT_NAME:PROJECT_NUMBER:PAYMENT_AMOUNT:PAYMENT_ID:CLIENT_NUMBER:INFO:ITER:keyword
HASH=MD5::md5_hex(STRING)
Then you should transfer the line into the upper case!
Example of code in Perl:
my $str=$project_name.":".$project_number.":".$payment_amount.":".$payment_id.":".$client_nubmer.":".$info.":".$iter.":".$keyword;
my =uc(Digest::MD5::md5_hex($str));
Return to the seller's website
There are two ways to return to the seller's website:
- Error. In case if the payment was canceled, or wrong data, or not enough means on the buyer's account, or failure in the system's work.
- Successful. In case the payment was successful.
At the unsuccessful return to the site, the return goes to URL of unsuccessful transfer (URL_ERROR)
Parameters sent at the unsuccessful transfer to the site:
PROJECT_NAME - name of the seller's website, not more than 50 characters, letters, digits, underline, comma, point, space;
PROJECT_NUMBER - number of PayOut card of the seller's website to which the amount will be transferred;
PAYMENT_AMOUNT - amount, format with point;
PAYMENT_ID - number of the goods or account (bill) at the seller's website;
INFO - information about the paid goods or service, not more than 150 characters, letters, digits, underline, space, comma, point;
STATUS - status of payment, value 0 (the payment has not been done);
ERROR - error message - text line;
HPROJECT_(name of the seller's website field) - any fields of the seller's website which should be transferred back to the site after the payment.
Example of unsuccessful transfer:
<form action='http://3mp3.ru/cgi-bin/cash_er.pl' method='POST' name='pay_er'>
<input type='hidden' name='PROJECT_NAME' value='3mp3.ru'>
<input type='hidden' name='PROJECT_NUMBER' value='1111111111'>
<input type='hidden' name='PAYMENT_AMOUNT' value='9.95'>
<input type='hidden' name='PAYMENT_ID' value='123456789'>
<input type='hidden' name='INFO' value='Payment for mp3'>
<input type='hidden' name='STATUS' value='0'>
<input type='hidden' name='ERROR' value='Wrong parameters'>
<input type='hidden' name='HPROJECT_param1' value='my param 1'>
<input type='hidden' name='HPROJECT_param2' value='my param 2'>
</form>
At the successful return to the site, it goes to URL of successful transfer (URL_SUCCESS)
Parameters sent at the successful transfer to the site:
PROJECT_NAME - name of the seller's website, not more than 50 characters, letters, digits, underline, comma, point, space;
PROJECT_NUMBER - number of PayOut card of the seller's website to which the amount will be transferred;
PAYMENT_AMOUNT - amount, format with point;
PAYMENT_ID - number of the goods or account (bill) at the seller's website;
INFO - information about the paid goods or service, not more than 150 characters, letters, digits, underline, space, comma, point;
STATUS - status of payment, value 1 (the payment has been done)
HPROJECT_(name of the seller's website field) - any fields of the seller's website which should be transferred back to the site after the payment.
Example of successful transfer form:
<form action='http://3mp3.ru/cgi-bin/cash_ok.pl' method='POST' name='pay_ok'>
<input type='hidden' name='PROJECT_NAME' value='3mp3.ru'>
<input type='hidden' name='PROJECT_NUMBER' value='1111111111'>
<input type='hidden' name='PAYMENT_AMOUNT' value='9.95'>
<input type='hidden' name='PAYMENT_ID' value='123456789'>
<input type='hidden' name='INFO' value='Payment for mp3'>
<input type='hidden' name='STATUS' value='1'>
<input type='hidden' name='HPROJECT_param1' value='my param 1'>
<input type='hidden' name='HPROJECT_param2' value='my param 2'>
</form>
|