Processing Mode 2
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="https://test.assist.ru/shops/cardpayment.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, including information that is specified by
the customer. The result of this HTML code snippet is a
page that displays a form allowing the customer to specify
their name and any specific shipping instructions. The FirstName
and LastName fields are normal fields recognized
by the system. The shipping_instructions field is not a
field recognized by the system, and so it is treated as
a user field. System-recognized fields can also be used
for normal shipping information. The code also shows that
the fingerprint, time stamp, and the sequence number are
inserted into the HTML form POST along with Shop_IDP and
other required fields.
<FORM NAME="form1" ACTION="https://test.assist.ru/shops/cardpayment.cfm"
METHOD="POST">
<INPUT TYPE="HIDDEN" NAME="Shop_IDP"
VALUE="Shop_IDP">
<INPUT TYPE="HIDDEN" NAME="Order_IDP"
VALUE="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="TEXT" NAME="LastName"
VALUE="Ivanov">
<INPUT TYPE="TEXT" NAME="FirstName"
VALUE="Ivan">
<INPUT TYPE="TEXT" NAME="MiddleName"
VALUE="A">
<INPUT TYPE="TEXT" NAME="Email"
VALUE="mail@mail.com">
<INPUT TYPE="TEXT" NAME="Address"
VALUE="address">
<INPUT TYPE="TEXT" NAME="Phone"
VALUE="911">
<INPUT TYPE="TEXT" NAME="Country"
VALUE="RUS">
<INPUT TYPE="TEXT" NAME="State"
VALUE="77">
<INPUT TYPE="TEXT" NAME="City"
VALUE="Moscow">
<INPUT TYPE="TEXT" NAME="Zip"
VALUE="911911">
<INPUT TYPE="HIDDEN" NAME="IsFrame"
VALUE="1">
<INPUT TYPE="HIDDEN" NAME="f_Email"
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="AssistIDCCPayment"
VALUE="1">
<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