Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

� Capture_Only transaction added.

Capture_Only transactions are used when you already have an authorization from a bank.
To use this type of transaction, you will need an authorization code from the card-issuer (usually a 5 or 6 digit number).
For example, if you called Visa directly and obtained an authorization over the phone,
you would need to submit a Capture_Only transaction to start the funds transfer process.
You can manually submit a Capture_Only transaction from your Virtual Terminal by selecting Capture Only,
or from a website or billing application by including the following variables with your transaction request:

� x_Type (Capture_Only)
� x_Auth_Code (the 5 or 6 digit code provided by the card-issuer)
  • Loading branch information...
commit e758a8f627b1918405409aa638222bb7c4cb3e0c 1 parent 9dc3d32
ethem authored
Showing with 13 additions and 8 deletions.
  1. +5 −2 enrol/authorize/authorizenetlib.php
  2. +8 −6 enrol/authorize/const.php
View
7 enrol/authorize/authorizenetlib.php
@@ -100,6 +100,7 @@ function authorizenet_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE
switch ($action) {
case AN_ACTION_AUTH_ONLY:
+ case AN_ACTION_CAPTURE_ONLY:
case AN_ACTION_AUTH_CAPTURE:
{
if ($order->status != AN_STATUS_NONE) {
@@ -111,8 +112,9 @@ function authorizenet_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE
return false;
}
$ext = (array)$extra;
- $poststring .= '&x_type=' . ($action==AN_ACTION_AUTH_ONLY ?
- 'AUTH_ONLY' : 'AUTH_CAPTURE');
+ $poststring .= '&x_type=' . (($action==AN_ACTION_AUTH_ONLY)
+ ? 'AUTH_ONLY' :( ($action==AN_ACTION_CAPTURE_ONLY)
+ ? 'CAPTURE_ONLY' : 'AUTH_CAPTURE'));
foreach($ext as $k => $v) {
$poststring .= '&' . $k . '=' . urlencode($v);
}
@@ -253,6 +255,7 @@ function authorizenet_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE
}
switch ($action) {
case AN_ACTION_AUTH_ONLY:
+ case AN_ACTION_CAPTURE_ONLY:
case AN_ACTION_AUTH_CAPTURE:
case AN_ACTION_PRIOR_AUTH_CAPTURE:
{
View
14 enrol/authorize/const.php
@@ -27,6 +27,7 @@
*
* NONE: No action. Function always returns false.
* AUTH_ONLY: Used to authorize only, don't capture.
+ * CAPTURE_ONLY: Authorization code received from a bank over the phone and capture now.
* 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.
@@ -46,12 +47,13 @@
* 3. These transactions can be voided:
* authorized/pending capture, captured/pending settlement, credited/pending settlement
*/
-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);
+define('AN_ACTION_NONE', 0);
+define('AN_ACTION_AUTH_ONLY', 1);
+define('AN_ACTION_CAPTURE_ONLY', 2);
+define('AN_ACTION_AUTH_CAPTURE', 3);
+define('AN_ACTION_PRIOR_AUTH_CAPTURE', 4);
+define('AN_ACTION_CREDIT', 5);
+define('AN_ACTION_VOID', 6);
/**#@-*/
?>
Please sign in to comment.
Something went wrong with that request. Please try again.