tcdevguide.txt
来自「视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.」· 文本 代码 · 共 1,209 行 · 第 1/5 页
TXT
1,209 行
|--------------+---------------------------------------------------------| | baddata | Invalid parameters passed, see error for further | | | details. | |--------------+---------------------------------------------------------| | error | System error when processing the transaction, see | | | errortype for details. | +------------------------------------------------------------------------+ The difference between approved and accepted is subtle, but important. Approved means that the transaction was an authorization of some sort, and has been successfully cleared with the bank. Accepted only means that the transaction was queued into the system without errors, but may be rejected at some later time. An example of the difference is a sale versus a credit. A sale is a realtime authorization, so it returns approved on success. A credit is not realtime; there is no such thing as a "credit authorization." Instead it is queued up for processing by the bank and there is the small but non-zero posibility that it will be rejected at a later time. In practice, however, this rarely happens, so the developer need not worry unduly. When status is set to decline, the parameter declinetype will contain one of the following: Decline Type +------------------------------------------------------------------------+ | Declinetype Value | Description | |-------------------+----------------------------------------------------| | decline | This is a "true" decline, it almost always is a | | | result of insufficient funds on the card. | |-------------------+----------------------------------------------------| | avs | AVS failed; the address entered does not match the | | | billing address on file at the bank. | |-------------------+----------------------------------------------------| | | CVV failed; the number provided is not the correct | | cvv | verification number for the card. (See section X | | | for details on CVV.) | |-------------------+----------------------------------------------------| | | The card must be authorized manually over the | | | phone. You may choose to call the customer service | | call | number listed on the card and ask for an offline | | | authcode, which can be passed in the | | | offlineauthcode field. | |-------------------+----------------------------------------------------| | carderror | Card number is invalid, usually the result of a | | | typo in the card number. | |-------------------+----------------------------------------------------| | authexpired | Attempt to postauth an expired (more than 7 days | | | old) preauth. | |-------------------+----------------------------------------------------| | dailylimit | Daily limit in transaction count or amount as been | | | reached. | |-------------------+----------------------------------------------------| | weeklylimit | Weekly limit in transaction count or amount as | | | been reached. | |-------------------+----------------------------------------------------| | monthlylimit | Monthly limit in transaction count or amount as | | | been reached. | +------------------------------------------------------------------------+ A status of baddata indicates that no transaction was attempted because one or more parameters was invalid. In this case, the parameter error will indicate the problem, and the offenders parameter will list the offending input fields. The error parameter may be set to one of the following: Bad Data +------------------------------------------------------------------------+ | Error Value | Description | |--------------------+---------------------------------------------------| | missingfields | Some parameters required for this transaction | | | type were not sent. | |--------------------+---------------------------------------------------| | extrafields | Parameters not allowed for this transaction type | | | were sent. | |--------------------+---------------------------------------------------| | badformat | A field was improperly formatted, such as | | | non-digit characters in a number field. | |--------------------+---------------------------------------------------| | badlength | A field was longer or shorter than the server | | | allows. | |--------------------+---------------------------------------------------| | | The merchant can't accept data passed in this | | | field. If the offender is "cc", for example, it | | | usually means that you tried to run a card type | | merchantcantaccept | (such as American Express or Discover) that is | | | not supported by your account. If it was | | | "currency", you tried to run a currency type not | | | supported by your account. | |--------------------+---------------------------------------------------| | mismatch | Data in one of the offending fields did not | | | cross-check with the other offending field. | +------------------------------------------------------------------------+ A status of error indicates the an error occurred while processing the transaction. These are almost always networking errors; see the Troubleshooting section for more. If the status is error, then the errortype parameter will be set to one of the following: Error +------------------------------------------------------------------------+ | Errortype Value | Description | |-----------------+------------------------------------------------------| | cantconnect | Couldn't connect to the TrustCommerce gateway. Check | | | your Internet connection to make sure it is up. | |-----------------+------------------------------------------------------| | | The TCLink software was unable to resolve DNS | | dnsfailure | hostnames. Make sure you have name resolving ability | | | on the machine. | |-----------------+------------------------------------------------------| | linkfailure | The connection was established, but was severed | | | before the transaction could complete. | |-----------------+------------------------------------------------------| | | The bank servers are offline and unable to authorize | | failtoprocess | transactions. Try again in a few minutes, or try a | | | card from a different issuing bank. | +------------------------------------------------------------------------+ Other parameters (such as avs or billingid) may be returned by the transaction depending on the action; see sections covering the transaction type you're running for detailed information on the specialized return values.VI. Credit Card Preauths and Sales The 'preauth' and 'sale' actions are identical in terms of parameters and function. The only difference is that a sale submits the item for capture as well, while preauths run the authorization only and can be postauthed at another time. The parameters that can be passed with these action types are described in the following two tables. The first table list required fields that you must pass in order to send the transaction. The second table lists optional fields that you can pass if you wish, but are not required. Required Parameters +------------------------------------------------------------------------+ | Parameter Name | Description | |----------------+-------------------------------------------------------| | amount | Amount of the transaction, in cents. (example: "500" | | | is $5.00) | |----------------+-------------------------------------------------------| | cc | Credit card number, digits only (no spaces or dashes) | |----------------+-------------------------------------------------------| | exp | Credit card expiration date, in MMYY format | +------------------------------------------------------------------------+ Optional Parameters +------------------------------------------------------------------------+ | Parameter Name | Default Value | Description | |-----------------+---------------+--------------------------------------| | media | cc | "cc" for credit card or "ach" for | | | | ACH. | |-----------------+---------------+--------------------------------------| | currency | usd | Currency code (see section X for the | | | | table of codes) | |-----------------+---------------+--------------------------------------| | avs | n | AVS requested, "y" or "n" (see notes | | | | below). | |-----------------+---------------+--------------------------------------| | name | | Cardholder's name. | |-----------------+---------------+--------------------------------------| | address1 | | First line of cardholder's street | | | | address. | |-----------------+---------------+--------------------------------------| | address2 | | Second line of cardholder's street | | | | address. | |-----------------+---------------+--------------------------------------| | city | | Cardholder's city. | |-----------------+---------------+--------------------------------------| | | | Two-character code for the | | state | | cardholder's state, or the full | | | | region/province for international | | | | addresses. | |-----------------+---------------+--------------------------------------| | | | Cardholder's zipcode, five or nine | | zip | | digits with no spaces or dashes, or | | | | the full postal code for | | | | international addresses. | |-----------------+---------------+--------------------------------------| | country | | Cardholder's country, leave blank | | | | for US. | |-----------------+---------------+--------------------------------------| | phone | | Cardholder's phone number. | |-----------------+---------------+--------------------------------------| | email | | Cardholder's email address. | |-----------------+---------------+--------------------------------------| | | | Six-digit numeric code used to | | offlineauthcode | | "force" the transaction (see notes | | | | below). | +------------------------------------------------------------------------+ A note about AVS: The AVS system is a useful way to help screen for fraud, as it requires that whomever is sending the transaction know the billing address for the card in question. As a merchant, you should know that AVS is not uniformly supported by card issuers; approximately 30% of US-based credit cards will not have AVS capability, and AVS is not available with any non-US cards at all. If avs=y is used, it will attempt to verify the address data with AVS, but if it is unavailable, it will not cause the transaction to fail. Only if AVS is available and the address data does not match will the transaction be declined due to AVS. You may wish to screen AVS results more closely. For this reason, sales and preauths will return the AVS code in a parameter named avs. (This parameter is returned even when avs=n, which is the default.) It returns a single character code, which are enumerated in the table below. AVS Returns Codes +------------------------------------------------------------+ | Code | Description | |------+-----------------------------------------------------| | X | Exact match, 9 digit zipcode. | |------+-----------------------------------------------------| | Y | Exact match, 5 digit zipcode. | |------+-----------------------------------------------------| | A | Street address match only. | |------+-----------------------------------------------------| | W | 9 digit zipcode match only. | |------+-----------------------------------------------------| | Z | 5 digit zipcode match only. | |------+-----------------------------------------------------| | N | No match on street address or zipcode. | |------+-----------------------------------------------------| | U | AVS unavailable on this card. | |------+-----------------------------------------------------| | G | Non-US card issuer, AVS unavailable. | |------+-----------------------------------------------------| | R | Card issuer system currently down, try again later. | |------+-----------------------------------------------------| | E | Error, ineligible - not a mail/phone order. | |------+-----------------------------------------------------| | S | Service not supported. | |------+-----------------------------------------------------| | 0 | General decline or other error. | +------------------------------------------------------------+ Only the numeric parts of the address (street address and zipcode) are verified. It should also be noted that oftentimes AVS data is incorrect or not entirely up-to-date, dependent upon the card issuing bank. For these
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?