Processing Mode 1
This section describes how to create an HTML form to post
transactions to the gateway. The basic HTML tags are used
to construct a form to post a transaction to the gateway
would be written as follows:
<FORM METHOD=POST
ACTION="http://test.assist.ru/shops/purchase.cfm">
</FORM>
Any field that needs to be sent to the system would be
enclosed as <INPUT> fields within the opening
<FORM> tag and the closing </FORM>
tag. For example, a form containing a merchant’s Shop ID
would look like this:
<INPUT TYPE=HIDDEN NAME="Shop_IDP" VALUE="12345">
Please note:
• <INPUT> is an HTML tag that does not
need a closing tag (unlike <FORM> which needs a closing
tag </FORM>).
• TYPE in the sample above is an attribute
of the INPUT tag and has a value HIDDEN. In this case it
means that data passed to the gateway server would be hidden
from the customer’s HTML page (since the data passed is
the merchant’s Shop_IDP).
• The NAME/VALUE pair is one of the things that the
gateway server looks for when a transaction is submitted.
If part of the NAME/VALUE pair is not present or improperly
formed, the transaction will be rejected.
The gateway will accept fields that are not specified in
the API of the same length as the name used to describe
the field is not identical to a field name in the API. These
fields are called “user” fields and can contain any information
that might be useful in the transaction. User fields will
be echoed back with the results of the transaction and will
be displayed on the merchant's receipts; they will not be
displayed on the customer’s receipts.
The following is some examples of HTML code, along with
the server-side script, that can be customized and inserted
into a merchant’s Website to provide easy ways to integrate
the Website with the system. Server-side scripting capability
on the merchant Website is required for this integration,
as the script needs access to a secret transaction key that
is stored securely in the merchant’s Web server.
The following HTML code along with the server-side script
demonstrates the ability to send additional information
to the system. The code also shows that the fingerprint,
sequence number are inserted into the HTML form POST along
with Shop_IDP and other required fields.
<FORM NAME="form1" ACTION="http://test.assist.ru/shops/purchase.cfm"
METHOD="POST"> <INPUT TYPE="HIDDEN"
NAME="Shop_IDP" VALUE="Shop_IDP">
<INPUT TYPE="HIDDEN" NAME="Order_IDP"
VALUE="Order 541"> <INPUT TYPE="HIDDEN"
NAME="Subtotal_P" VALUE="11">
<INPUT TYPE="HIDDEN" NAME="Delay"
VALUE="0"> <INPUT TYPE="HIDDEN"
NAME="Language" VALUE="0">
<INPUT TYPE="HIDDEN" NAME="URL_RETURN_OK"
VALUE=" http://www.o3.ru/yes"> <INPUT
TYPE="HIDDEN" NAME="URL_RETURN_NO"
VALUE=" http://www.o3.ru/no"> <INPUT
TYPE="HIDDEN" NAME="Currency"
VALUE="USD"> <INPUT TYPE="HIDDEN"
NAME="Comment" VALUE="Test Order">
<INPUT TYPE="HIDDEN" NAME="IsFrame"
VALUE="1"> <INPUT TYPE="HIDDEN"
NAME="CardPayment" VALUE="1">
<INPUT TYPE="HIDDEN" NAME="WalletPayment"
VALUE="0"> <INPUT TYPE="HIDDEN"
NAME="WebMoneyPayment" VALUE="0">
<INPUT TYPE="HIDDEN" NAME="RapidaPayment"
VALUE="0"> <INPUT TYPE="HIDDEN"
NAME="PayCashPayment" VALUE="0">
<INPUT TYPE="HIDDEN" NAME="EPortPayment"
VALUE="0"> <INPUT TYPE="HIDDEN"
NAME="KreditPilotPayment" VALUE="0">
<INPUT TYPE="HIDDEN" NAME="ListParameters"
VALUE="Field1,Field2"> <INPUT TYPE="SUBMIT"
NAME="Submit" VALUE="Send"
onclick="document.all.Submit.disabled=true; document.form1.submit();">
</FORM>
|
top