Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

· 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
7 enrol/authorize/authorizenetlib.php
@@ -100,6 +100,7 @@ function authorizenet_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE
100 100
101 101 switch ($action) {
102 102 case AN_ACTION_AUTH_ONLY:
  103 + case AN_ACTION_CAPTURE_ONLY:
103 104 case AN_ACTION_AUTH_CAPTURE:
104 105 {
105 106 if ($order->status != AN_STATUS_NONE) {
@@ -111,8 +112,9 @@ function authorizenet_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE
111 112 return false;
112 113 }
113 114 $ext = (array)$extra;
114   - $poststring .= '&x_type=' . ($action==AN_ACTION_AUTH_ONLY ?
115   - 'AUTH_ONLY' : 'AUTH_CAPTURE');
  115 + $poststring .= '&x_type=' . (($action==AN_ACTION_AUTH_ONLY)
  116 + ? 'AUTH_ONLY' :( ($action==AN_ACTION_CAPTURE_ONLY)
  117 + ? 'CAPTURE_ONLY' : 'AUTH_CAPTURE'));
116 118 foreach($ext as $k => $v) {
117 119 $poststring .= '&' . $k . '=' . urlencode($v);
118 120 }
@@ -253,6 +255,7 @@ function authorizenet_action(&$order, &$message, &$extra, $action=AN_ACTION_NONE
253 255 }
254 256 switch ($action) {
255 257 case AN_ACTION_AUTH_ONLY:
  258 + case AN_ACTION_CAPTURE_ONLY:
256 259 case AN_ACTION_AUTH_CAPTURE:
257 260 case AN_ACTION_PRIOR_AUTH_CAPTURE:
258 261 {
14 enrol/authorize/const.php
@@ -27,6 +27,7 @@
27 27 *
28 28 * NONE: No action. Function always returns false.
29 29 * AUTH_ONLY: Used to authorize only, don't capture.
  30 + * CAPTURE_ONLY: Authorization code received from a bank over the phone and capture now.
30 31 * PRIOR_AUTH_CAPTURE: Used to capture, it was authorized before.
31 32 * AUTH_CAPTURE: Used to authorize and capture.
32 33 * CREDIT: Used to return funds to a customer's credit card.
@@ -46,12 +47,13 @@
46 47 * 3. These transactions can be voided:
47 48 * authorized/pending capture, captured/pending settlement, credited/pending settlement
48 49 */
49   -define('AN_ACTION_NONE', 0x00);
50   -define('AN_ACTION_AUTH_ONLY', 0x01);
51   -define('AN_ACTION_PRIOR_AUTH_CAPTURE', 0x02);
52   -define('AN_ACTION_AUTH_CAPTURE', 0x03);
53   -define('AN_ACTION_CREDIT', 0x04);
54   -define('AN_ACTION_VOID', 0x08);
  50 +define('AN_ACTION_NONE', 0);
  51 +define('AN_ACTION_AUTH_ONLY', 1);
  52 +define('AN_ACTION_CAPTURE_ONLY', 2);
  53 +define('AN_ACTION_AUTH_CAPTURE', 3);
  54 +define('AN_ACTION_PRIOR_AUTH_CAPTURE', 4);
  55 +define('AN_ACTION_CREDIT', 5);
  56 +define('AN_ACTION_VOID', 6);
55 57 /**#@-*/
56 58
57 59 ?>

0 comments on commit e758a8f

Please sign in to comment.
Something went wrong with that request. Please try again.