Deprecated feature

ACCEPTPAYMENT

Use the ACCEPTPAYMENT command to create Order objects when an electronic wallet is not used. In general, if the command is successful, the order will be placed in Ordered state. If the command fails, the order will not be created. Pass protocol specific data on this command; however, specifics depend on the cassette.

During the processing of an AcceptPayment command, you can ensure that the cassette handles the Approval step separately from the Order creation step. Select the Asynchronous Auto Approve payment processing option to indicate that the approval is asynchronously scheduled to occur. Thus, the buyer does not have to wait for the approval to occur before receiving a response for the original purchase request.

When creating an order, you may want to approve or deposit funds automatically. The APPROVEFLAG and DEPOSITFLAG keywords indicate whether a Payment object should be approved and deposited. Refer to the appropriate table for additional keywords used if APPROVEFLAG or DEPOSITFLAG are specified.

Keywords Required Value
AMOUNT Yes A positive 32-bit integer in ASCII characters.
AMOUNTEXP10 No Integer in ASCII characters. Indicates the number of decimal places to shift. Valid values are -10 to 10. for more information about this keyword, refer to Using the AmountExp10 keyword.
APPROVEFLAG No Integer in ASCII characters. Indicates whether the approvals should be attempted automatically. Default is 0. Supported values are:
0
Indicates transaction should not be approved.
1
Indicates transaction should be approved automatically. See note 1.
2
Indicates transaction should be approved asynchronously. See note 1.
CURRENCY Yes Integer in ASCII characters. See ISO currency codes for a list of ISO currency codes.
DTDPATH No Path to the locally stored DTD. The value of this parameter is used in the XML document to specify the location of the external DTD. If this parameter is not specified, the complete DTD is returned as an internal DTD. The length of the DTDPath must be from 1 to 254 bytes.
ETAPIVERSION Yes 3 (Indicates WebSphere Commerce Payments-or predecessor product-API version: Version 2.1.x, 2.2.x, 3.1.x, 5.5.x, and 5.6.x)
MERCHANTNUMBER Yes Integer in ASCII characters. Must be from 1 to 999999999.
OPERATION Yes ASCII character string AcceptPayment.
ORDERDATA1 No Auxiliary data supplied by the user, specified as an ASCII character string between 1 and 254 bytes in length.
ORDERDATA2 No Auxiliary data supplied by the user, specified as a UTF-8 string between 1 and 254 bytes in length.
ORDERDATA3 No Auxiliary data supplied by the user, specified as a UTF-8 string between 1 and 254 bytes in length.
ORDERDATA4 No Auxiliary data supplied by the user, specified as a binary string between 1 and 254 bytes in length.
ORDERDATA5 No Auxiliary data supplied by the user, specified as a binary string with an arbitrary length.
ORDERNUMBER Yes Integer in ASCII characters. Must be from 1 to 999999999.
ORDERURL No URL containing order details.
PAYMENTTYPE Yes ASCII character string. Specifies the payment cassette or protocol being used. For example, OfflineCard.
TRANSACTIONID No Transaction identifier supplied by the user, specified as an ASCII character string between 1 and 128 bytes in length.

Note 1:

The following table list the required and optional keywords for APPROVEFLAG=1 or 2.

Keywords Required Value
PAYMENTAMOUNT Yes A 32-bit positive integer in ASCII characters.
PAYMENTNUMBER Yes Integer in ASCII characters. Must be from 1 to 999999999.
DEPOSITFLAG No Boolean value in ASCII characters. Indicates whether the deposit should be attempted automatically. This flag is only valid if APPROVE=1 (order is automatically approved). Supported values are:
0
Funds should not be automatically deposited.
1
Funds should be automatically deposited.

Note 2:

If DEPOSITFLAG=1, then the following keyword is optional:

Optional keywords Value
BATCHNUMBER Identifies the batch under which this payment will be processed. Must be from 1 to 999999999.

Using the AmountExp10 keyword

All amount values are expressed as an amount with currency and exponent. For example, $5.00 USD (U.S. Dollars) is expressed with Amount=500, Currency=840 (the ISO currency code for USD), and AmountExp10 =-2.

All current ISO currencies have exactly one valid exponent value, so the exponent can be inferred from the currency. WebSphere Commerce Payments maintains a mapping table from currencies to exponents . During order creation, (that is, on RECEIVEPAYMENT or ACCEPTPAYMENT commands), merchant software must always specify both AMOUNT and CURRENCY keywords. If the currency specified is a known currency in the ISO table, the corresponding exponent will be used. If the currency specified is not known (that is, it is not present in the ISO table), then an additional parameter (AMOUNTEXP10) will be needed to specify the exponent. The existence of the AMOUNTEXP10 parameter allows for flexibility in supporting future currencies.

AMOUNTEXP10 specified on API CURRENCY present in mapping table
True True

If the exponent passed in on the AMOUNTEXP10 parameter is the same as the one in the mapping table, then the exponent is used.


If the exponent passed in differs from the one in the table, then a parameter error occurs.
True False

The exponent passed in on the AMOUNTEXP10 parameter is used.

False True

The exponent derived from the mapping table is used.

False False

A "parameter not found" error occurs.