Documentation for status codes and actions. Merged from MOODLE_16_STABLE
This commit is contained in:
+47
-78
@@ -1,88 +1,57 @@
|
||||
<?php // $Id$
|
||||
|
||||
/**
|
||||
* New order. No transaction was made.
|
||||
*/
|
||||
define('AN_STATUS_NONE', 0x00);
|
||||
|
||||
/**
|
||||
* Authorized.
|
||||
*/
|
||||
define('AN_STATUS_AUTH', 0x01);
|
||||
|
||||
/**
|
||||
* Captured.
|
||||
*/
|
||||
define('AN_STATUS_CAPTURE', 0x02);
|
||||
|
||||
/**
|
||||
* AN_STATUS_AUTH|AN_STATUS_CAPTURE.
|
||||
/**#@+
|
||||
* Order status used in enrol_authorize table.
|
||||
*
|
||||
* NONE: New order or order is in progress. TransactionID hasn't received yet.
|
||||
* AUTH: Authorized/Pending Capture.
|
||||
* CAPTURE: Captured.
|
||||
* AUTHCAPTURE: Authorized/Captured
|
||||
* CREDIT: Refunded.
|
||||
* VOID: Cancelled.
|
||||
* EXPIRE: Expired. Orders be expired unless be accepted within 30 days.
|
||||
* TEST: Tested. It means created in TEST mode and TransactionID is 0.
|
||||
*/
|
||||
define('AN_STATUS_NONE', 0x00);
|
||||
define('AN_STATUS_AUTH', 0x01);
|
||||
define('AN_STATUS_CAPTURE', 0x02);
|
||||
define('AN_STATUS_AUTHCAPTURE', 0x03);
|
||||
define('AN_STATUS_CREDIT', 0x04);
|
||||
define('AN_STATUS_VOID', 0x08);
|
||||
define('AN_STATUS_EXPIRE', 0x10);
|
||||
define('AN_STATUS_TEST', 0x80);
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* Refunded.
|
||||
*/
|
||||
define('AN_STATUS_CREDIT', 0x04);
|
||||
|
||||
/**
|
||||
* Voided.
|
||||
*/
|
||||
define('AN_STATUS_VOID', 0x08);
|
||||
|
||||
/**
|
||||
* Expired.
|
||||
*/
|
||||
define('AN_STATUS_EXPIRE', 0x10);
|
||||
|
||||
/**
|
||||
* Tested.
|
||||
*/
|
||||
define('AN_STATUS_TEST', 0x80);
|
||||
|
||||
/**
|
||||
* No action.
|
||||
*/
|
||||
define('AN_ACTION_NONE', 0x00);
|
||||
|
||||
/**
|
||||
* Used to authorize only, don't capture.
|
||||
*/
|
||||
define('AN_ACTION_AUTH_ONLY', 0x01);
|
||||
|
||||
/**
|
||||
* Used to capture, it was authorized before.
|
||||
*/
|
||||
define('AN_ACTION_PRIOR_AUTH_CAPTURE', 0x02);
|
||||
|
||||
/**
|
||||
* Used to authorize and capture.
|
||||
*/
|
||||
define('AN_ACTION_AUTH_CAPTURE', 0x03);
|
||||
|
||||
/**
|
||||
* Used to return funds to a customer's credit card.
|
||||
/**#@+
|
||||
* Actions used in authorizenet_action function.
|
||||
*
|
||||
* - Can be credited within 120 days after the original authorization was obtained.
|
||||
* - Amount can be any amount up to the original amount charged.
|
||||
* - Captured/pending settlement transactions cannot be credited,
|
||||
* instead a void must be issued to cancel the settlement.
|
||||
* NOTE: Assigns a new transactionID to the original transaction.
|
||||
* SAVE IT, so we can cancel new refund if it is a fault return.
|
||||
*/
|
||||
define('AN_ACTION_CREDIT', 0x04);
|
||||
|
||||
/**
|
||||
* Used to cancel an exiting transaction with a status of
|
||||
* authorized/pending capture, captured/pending settlement or
|
||||
* settled/refunded.
|
||||
* NONE: No action. Function always returns false.
|
||||
* AUTH_ONLY: Used to authorize only, don't capture.
|
||||
* PRIOR_AUTH_CAPTURE: Used to capture, it was authorized before.
|
||||
* AUTH_CAPTURE: Used to authorize and capture.
|
||||
* CREDIT: Used to return funds to a customer's credit card.
|
||||
* VOID: Used to cancel an exiting pending transaction.
|
||||
*
|
||||
* - Void requests effectively cancel the Capture request
|
||||
* that would start the funds transfer process.
|
||||
* - Also used to cancel existing transaction with a status of
|
||||
* settled/refunded. Credited mistakenly, so cancel it
|
||||
* and return funds to our account.
|
||||
* Credit rules:
|
||||
* 1. It can be credited within 120 days after the original authorization was obtained.
|
||||
* 2. Amount can be any amount up to the original amount charged.
|
||||
* 3. Captured/pending settlement transactions cannot be credited,
|
||||
* instead a void must be issued to cancel the settlement.
|
||||
* NOTE: It assigns a new transactionID to the original transaction.
|
||||
* We should save it, so admin can cancel new transaction if it is a mistake return.
|
||||
*
|
||||
* Void rules:
|
||||
* 1. These requests effectively cancel the Capture request that would start the funds transfer process.
|
||||
* 2. It mustn't be settled. Please set up settlement date correctly.
|
||||
* 3. These transactions can be voided:
|
||||
* authorized/pending capture, captured/pending settlement, credited/pending settlement
|
||||
*/
|
||||
define('AN_ACTION_VOID', 0x08);
|
||||
define('AN_ACTION_NONE', 0x00);
|
||||
define('AN_ACTION_AUTH_ONLY', 0x01);
|
||||
define('AN_ACTION_PRIOR_AUTH_CAPTURE', 0x02);
|
||||
define('AN_ACTION_AUTH_CAPTURE', 0x03);
|
||||
define('AN_ACTION_CREDIT', 0x04);
|
||||
define('AN_ACTION_VOID', 0x08);
|
||||
/**#@-*/
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user