Helix Installation   Getting Started   Reference Documentation   Global Functions   Quick Start
ModulesClassesFunctions
 

Class Reference

class authnet_response extends obj

Hide Inherited MembersE-Commerce
Description
No description.
 
Constants
No constants.
 
Properties
protected_auth_code[ authnet_response ]
protected_avs_code[ authnet_response ]
protected_card_code_response_code[ authnet_response ]
protected_cavv_response_code[ authnet_response ]
publicdata[ authnet_response ]
protected_dirty[ obj ]
publicfields[ authnet_response ]
protected_md5_hash[ authnet_response ]
protected_note[ authnet_response ]
publicnotes[ authnet_response ]
publicproperty_objects_array[ obj ]
protected_response_code[ authnet_response ]
protected_response_reason_code[ authnet_response ]
protected_response_reason_text[ authnet_response ]
protected_response_subcode[ authnet_response ]
protected_status[ authnet_response ]
protected_trans_id[ authnet_response ]
 
Methods
public__construct ( response )[ authnet_response ]
Parameters
requiredresponse
Code
021  public function __construct($response)
022  {
023      $this->fields = array();
024      $this->data = array();
025      $this->notes = array();
026     
027      $this->_status = null;
028     
029      $this->notes[0] = null;
030      $this->notes[1] = null;
031      $this->notes[2] = null;
032      $this->notes[3] = null;
033      $this->notes[4] = "The code returned from the processor indicating that the card used needs to be picked up.";
034      $this->notes[5] = "The value submitted in the amount field did not pass validation for a number.";
035      $this->notes[6] = null;
036      $this->notes[7] = "The format of the date submitted was incorrect.";
037      $this->notes[8] = null;
038      $this->notes[9] = "The value submitted in the x_bank_aba_code field did not pass validation or was not for a valid financial institution.";
039      $this->notes[10] = "The value submitted in the x_bank_acct_num field did not pass validation.";
040      $this->notes[11] = "A transaction with identical amount and credit card information was submitted two minutes prior.";
041      $this->notes[12] = "A transaction that required x_auth_code to be present was submitted without a value.";
042      $this->notes[13] = null;
043      $this->notes[14] = "The Relay Response or Referrer URL does not match the merchant’s configured value(s) or is absent. Applicable only to SIM and WebLink APIs.";
044      $this->notes[15] = "The transaction ID value is non-numeric or was not present for a transaction that requires it (i.e., VOID, PRIOR_AUTH_CAPTURE, and CREDIT).";
045      $this->notes[16] = "The transaction ID sent in was properly formatted but the gateway had no record of the transaction.";
046      $this->notes[17] = "The merchant was not configured to accept the credit card submitted in the transaction.";
047      $this->notes[18] = "The merchant does not accept electronic checks.";
048      $this->notes[19] = null;
049      $this->notes[20] = null;
050      $this->notes[21] = null;
051      $this->notes[22] = null;
052      $this->notes[23] = null;
053      $this->notes[24] = null;
054      $this->notes[25] = null;
055      $this->notes[26] = null;
056      $this->notes[27] = null;
057      $this->notes[28] = "The Merchant ID at the processor was not configured to accept this card type.";
058      $this->notes[29] = null;
059      $this->notes[30] = null;
060      $this->notes[31] = "The merchant was incorrectly set up at the processor.";
061      $this->notes[32] = null;
062      $this->notes[33] = "The word FIELD will be replaced by an actual field name. This error indicates that a field the merchant specified as required was not filled in.";
063      $this->notes[34] = "The merchant was incorrectly set up at the processor.";
064      $this->notes[35] = "The merchant was incorrectly set up at the processor.";
065      $this->notes[36] = null;
066      $this->notes[37] = null;
067      $this->notes[38] = "The merchant was incorrectly set up at the processor.";
068      $this->notes[39] = null;
069      $this->notes[40] = null;
070      $this->notes[41] = "Only merchants set up for the FraudScreen.Net service would receive this decline. This code will be returned if a given transaction's fraud score is higher than the threshold set by the merchant.";
071      $this->notes[42] = "This is applicable only to merchants processing through the Wells Fargo SecureSource product who have requirements for transaction submission that are different from merchants not processing through Wells Fargo.";
072      $this->notes[43] = "The merchant was incorrectly set up at the processor.";
073      $this->notes[44] = "The merchant would receive this error if the Card Code filter has been set in the Merchant Interface and the transaction received an error code from the processor that matched the rejection criteria set by the merchant.";
074      $this->notes[45] = "This error would be returned if the transaction received a code from the processor that matched the rejection criteria set by the merchant for both the AVS and Card Code filters.";
075      $this->notes[46] = null;
076      $this->notes[47] = "This occurs if the merchant tries to capture funds greater than the amount of the original authorization-only transaction.";
077      $this->notes[48] = "The merchant attempted to settle for less than the originally authorized amount.";
078      $this->notes[49] = "The transaction amount submitted was greater than the maximum amount allowed.";
079      $this->notes[50] = "Credits or refunds may only be performed against settled transactions. The transaction against which the credit/refund was submitted has not been settled, so a credit cannot be issued.";
080      $this->notes[51] = null;
081      $this->notes[52] = null;
082      $this->notes[53] = "If x_method = ECHECK, x_type cannot be set to CAPTURE_ONLY.";
083      $this->notes[54] = null;
084      $this->notes[55] = "The transaction is rejected if the sum of this credit and prior credits exceeds the original debit amount.";
085      $this->notes[56] = "The merchant processes eCheck transactions only and does not accept credit cards.";
086      $this->notes[57] = null;
087      $this->notes[58] = null;
088      $this->notes[59] = null;
089      $this->notes[60] = null;
090      $this->notes[61] = null;
091      $this->notes[62] = null;
092      $this->notes[63] = null;
093      $this->notes[64] = "This error is applicable to Wells Fargo SecureSource merchants only. Credits or refunds cannot be issued against transactions that were not authorized.";
094      $this->notes[65] = "The transaction was declined because the merchant configured their account through the Merchant Interface to reject transactions with certain values for a Card Code mismatch.";
095      $this->notes[66] = "The transaction did not meet gateway security guidelines.";
096      $this->notes[67] = "This error code is applicable to merchants using the Wells Fargo SecureSource product only. This product does not allow transactions of type CAPTURE_ONLY.";
097      $this->notes[68] = "The value submitted in x_version was invalid.";
098      $this->notes[69] = "The value submitted in x_type was invalid.";
099      $this->notes[70] = "The value submitted in x_method was invalid.";
100      $this->notes[71] = "The value submitted in x_bank_acct_type was invalid.";
101      $this->notes[72] = "The value submitted in x_auth_code was more than six characters in length.";
102      $this->notes[73] = "The format of the value submitted in x_drivers_license_num was invalid.";
103      $this->notes[74] = "The value submitted in x_duty failed format validation.";
104      $this->notes[75] = "The value submitted in x_freight failed format validation.";
105      $this->notes[76] = "The value submitted in x_tax failed format validation.";
106      $this->notes[77] = "The value submitted in x_customer_tax_id failed validation.";
107      $this->notes[78] = "The value submitted in x_card_code failed format validation.";
108      $this->notes[79] = "The value submitted in x_drivers_license_num failed format validation.";
109      $this->notes[80] = "The value submitted in x_drivers_license_state failed format validation.";
110      $this->notes[81] = "The merchant requested an integration method not compatible with the AIM API.";
111      $this->notes[82] = "The system no longer supports version 2.5; requests cannot be posted to scripts.";
112      $this->notes[83] = "The system no longer supports version 2.5; requests cannot be posted to scripts.";
113      $this->notes[84] = null;
114      $this->notes[85] = null;
115      $this->notes[86] = null;
116      $this->notes[87] = null;
117      $this->notes[88] = null;
118      $this->notes[89] = null;
119      $this->notes[90] = null;
120      $this->notes[91] = null;
121      $this->notes[92] = null;
122      $this->notes[93] = "This code is applicable to Wells Fargo SecureSource merchants only. Country is a required field and must contain the value of a supported country.";
123      $this->notes[94] = "This code is applicable to Wells Fargo SecureSource merchants only.";
124      $this->notes[95] = "This code is applicable to Wells Fargo SecureSource merchants only.";
125      $this->notes[96] = "This code is applicable to Wells Fargo SecureSource merchants only. Country is a required field and must contain the value of a supported country.";
126      $this->notes[97] = "Applicable only to SIM API. Fingerprints are only valid for a short period of time. This code indicates that the transaction fingerprint has expired.";
127      $this->notes[98] = "Applicable only to SIM API. The transaction fingerprint has already been used.";
128      $this->notes[99] = "Applicable only to SIM API. The server-generated fingerprint does not match the merchant-specified fingerprint in the x_fp_hash field.";
129      $this->notes[100] = "Applicable only to eCheck. The value specified in the x_echeck_type field is invalid.";
130      $this->notes[101] = "Applicable only to eCheck. The specified name on the account and/or the account type do not match the NOC record for this account.";
131      $this->notes[102] = "A password or transaction key was submitted with this WebLink request. This is a high security risk.";
132      $this->notes[103] = "A valid fingerprint, transaction key, or password is required for this transaction.";
133      $this->notes[104] = "Applicable only to eCheck. The value submitted for country failed validation.";
134      $this->notes[105] = "Applicable only to eCheck. The values submitted for city and country failed validation.";
135      $this->notes[106] = "Applicable only to eCheck. The value submitted for company failed validation.";
136      $this->notes[107] = "Applicable only to eCheck. The value submitted for bank account name failed validation.";
137      $this->notes[108] = "Applicable only to eCheck. The values submitted for first name and last name failed validation.";
138      $this->notes[109] = "Applicable only to eCheck. The values submitted for first name and last name failed validation.";
139      $this->notes[110] = "Applicable only to eCheck. The value submitted for bank account name does not contain valid characters.";
140      $this->notes[111] = "This code is applicable to Wells Fargo SecureSource merchants only.";
141      $this->notes[112] = "This code is applicable to Wells Fargo SecureSource merchants only.";
142      $this->notes[113] = null;
143      $this->notes[114] = null;
144      $this->notes[115] = null;
145      $this->notes[116] = "This code is applicable only to merchants that include the x_authentication_indicator in the transaction request. The ECI value for a Visa transaction; or the UCAF indicator for a MasterCard transaction submitted in the x_authentication_indicator field is invalid.";
146      $this->notes[117] = "This code is applicable only to merchants that include the x_cardholder_authentication_value in the transaction request. The CAVV for a Visa transaction; or the AVV/UCAF for a MasterCard transaction is invalid.";
147      $this->notes[118] = "This code is applicable only to merchants that include the x_authentication_indicator and x_authentication_value in the transaction request. The combination of authentication indicator and cardholder authentication value for a Visa or MasterCard transaction is invalid.";
148      $this->notes[119] = "This code is applicable only to merchants that include the x_authentication_indicator and x_recurring_billing in the transaction request. Transactions submitted with a value in x_authentication_indicator AND x_recurring_billing =YES will be rejected.";
149      $this->notes[120] = "The system-generated void for the original timed-out transaction failed. (The original transaction timed out while waiting for a response from the authorizer.)";
150      $this->notes[121] = "The system-generated void for the original errored transaction failed. (The original transaction experienced a database error.)";
151      $this->notes[122] = "The system-generated void for the original errored transaction failed. (The original transaction experienced a processing error.)";
152      $this->notes[123] = "The transaction request must include the API login ID associated with the payment gateway account.";
153      $this->notes[124] = null;
154      $this->notes[125] = null;
155      $this->notes[126] = null;
156      $this->notes[127] = "The system-generated void for the original AVS-rejected transaction failed.";
157      $this->notes[128] = "The customer's financial institution does not currently allow transactions for this account.";
158      $this->notes[129] = null;
159      $this->notes[130] = "IFT: The payment gateway account status is Blacklisted.";
160      $this->notes[131] = "IFT: The payment gateway account status is Suspended-STA.";
161      $this->notes[132] = null;
162      $this->notes[133] = null;
163      $this->notes[134] = null;
164      $this->notes[135] = null;
165      $this->notes[136] = null;
166      $this->notes[137] = null;
167      $this->notes[138] = null;
168      $this->notes[139] = null;
169      $this->notes[140] = null;
170      $this->notes[141] = "IFT: The payment gateway account status is Suspended-Blacklist.";
171      $this->notes[142] = null;
172      $this->notes[143] = null;
173      $this->notes[144] = null;
174      $this->notes[145] = "The system-generated void for the original card code-rejected and AVS-rejected transaction failed.";
175      $this->notes[146] = null;
176      $this->notes[147] = null;
177      $this->notes[148] = null;
178      $this->notes[149] = null;
179      $this->notes[150] = null;
180      $this->notes[151] = null;
181      $this->notes[152] = "The system-generated void for the original transaction failed. The response for the original transaction could not be communicated to the client.";
182      $this->notes[153] = null;
183      $this->notes[154] = null;
184      $this->notes[155] = null;
185      $this->notes[156] = null;
186      $this->notes[157] = null;
187      $this->notes[158] = null;
188      $this->notes[159] = null;
189      $this->notes[160] = null;
190      $this->notes[161] = null;
191      $this->notes[162] = null;
192      $this->notes[163] = null;
193      $this->notes[164] = null;
194      $this->notes[165] = "The system-generated void for the original card code-rejected transaction failed.";
195      $this->notes[166] = null;
196      $this->notes[167] = null;
197      $this->notes[168] = null;
198      $this->notes[169] = null;
199      $this->notes[170] = "Concord EFS – Provisioning at the processor has not been completed.";
200      $this->notes[171] = "Concord EFS – This request is invalid.";
201      $this->notes[172] = "Concord EFS – The store ID is invalid.";
202      $this->notes[173] = "Concord EFS – The store key is invalid.";
203      $this->notes[174] = "Concord EFS – This transaction type is not accepted by the processor.";
204      $this->notes[175] = "Concord EFS – This transaction is not allowed. The Concord EFS processing platform does not support voiding credit transactions. Please debit the credit card instead of voiding the credit.";
205      $this->notes[176] = null;
206      $this->notes[177] = null;
207      $this->notes[178] = null;
208      $this->notes[179] = null;
209      $this->notes[180] = "The processor response format is invalid.";
210      $this->notes[181] = "The system-generated void for the original invalid transaction failed. (The original transaction included an invalid processor response format.)";
211      $this->notes[182] = null;
212      $this->notes[183] = null;
213      $this->notes[184] = null;
214      $this->notes[185] = null;
215      $this->notes[186] = null;
216      $this->notes[187] = null;
217      $this->notes[188] = null;
218      $this->notes[189] = null;
219      $this->notes[190] = null;
220      $this->notes[191] = null;
221      $this->notes[192] = null;
222      $this->notes[193] = "The transaction was placed under review by the risk management system.";
223      $this->notes[194] = null;
224      $this->notes[195] = null;
225      $this->notes[196] = null;
226      $this->notes[197] = null;
227      $this->notes[198] = null;
228      $this->notes[199] = null;
229      $this->notes[200] = "This error code applies only to merchants on FDC Omaha. The credit card number is invalid.";
230      $this->notes[201] = "This error code applies only to merchants on FDC Omaha. The expiration date is invalid.";
231      $this->notes[202] = "This error code applies only to merchants on FDC Omaha. The transaction type is invalid.";
232      $this->notes[203] = "This error code applies only to merchants on FDC Omaha. The value submitted in the amount field is invalid.";
233      $this->notes[204] = "This error code applies only to merchants on FDC Omaha. The department code is invalid.";
234      $this->notes[205] = "This error code applies only to merchants on FDC Omaha. The value submitted in the merchant number field is invalid.";
235      $this->notes[206] = "This error code applies only to merchants on FDC Omaha. The merchant is not on file.";
236      $this->notes[207] = "This error code applies only to merchants on FDC Omaha. The merchant account is closed.";
237      $this->notes[208] = "This error code applies only to merchants on FDC Omaha. The merchant is not on file.";
238      $this->notes[209] = "This error code applies only to merchants on FDC Omaha. Communication with the processor could not be established.";
239      $this->notes[210] = "This error code applies only to merchants on FDC Omaha. The merchant type is incorrect.";
240      $this->notes[211] = "This error code applies only to merchants on FDC Omaha. The cardholder is not on file.";
241      $this->notes[212] = "This error code applies only to merchants on FDC Omaha. The bank configuration is not on file";
242      $this->notes[213] = "This error code applies only to merchants on FDC Omaha. The merchant assessment code is incorrect.";
243      $this->notes[214] = "This error code applies only to merchants on FDC Omaha. This function is currently unavailable.";
244      $this->notes[215] = "This error code applies only to merchants on FDC Omaha. The encrypted PIN field format is invalid.";
245      $this->notes[216] = "This error code applies only to merchants on FDC Omaha. The ATM term ID is invalid.";
246      $this->notes[217] = "This error code applies only to merchants on FDC Omaha. This transaction experienced a general message format problem.";
247      $this->notes[218] = "This error code applies only to merchants on FDC Omaha. The PIN block format or PIN availability value is invalid.";
248      $this->notes[219] = "This error code applies only to merchants on FDC Omaha. The ETC void is unmatched.";
249      $this->notes[220] = "This error code applies only to merchants on FDC Omaha. The primary CPU is not available.";
250      $this->notes[221] = "This error code applies only to merchants on FDC Omaha. The SE number is invalid.";
251      $this->notes[222] = "This error code applies only to merchants on FDC Omaha. Duplicate auth request (from INAS).";
252      $this->notes[223] = "This error code applies only to merchants on FDC Omaha. This transaction experienced an unspecified error.";
253      $this->notes[224] = "This error code applies only to merchants on FDC Omaha. Please re-enter the transaction.";
254      $this->notes[225] = null;
255      $this->notes[226] = null;
256      $this->notes[227] = null;
257      $this->notes[228] = null;
258      $this->notes[229] = null;
259      $this->notes[230] = null;
260      $this->notes[231] = null;
261      $this->notes[232] = null;
262      $this->notes[233] = null;
263      $this->notes[234] = null;
264      $this->notes[235] = null;
265      $this->notes[236] = null;
266      $this->notes[237] = null;
267      $this->notes[238] = null;
268      $this->notes[239] = null;
269      $this->notes[240] = null;
270      $this->notes[241] = null;
271      $this->notes[242] = null;
272      $this->notes[243] = "The combination of values submitted for x_recurring_billing and x_echeck_type is not allowed.";
273      $this->notes[244] = "The combination of values submitted for x_bank_acct_type and x_echeck_type is not allowed.";
274      $this->notes[245] = "The value submitted for x_echeck_type is not allowed when using the payment gateway hosted payment form.";
275      $this->notes[246] = "The merchant’s payment gateway account is not enabled to submit the eCheck.Net type.";
276      $this->notes[247] = "The combination of values submitted for x_type and x_echeck_type is not allowed.";
277      $this->notes[248] = null;
278      $this->notes[249] = null;
279      $this->notes[250] = "This transaction was submitted from a blocked IP address.";
280      $this->notes[251] = "The transaction was declined as a result of triggering a Fraud Detection Suite filter.";
281      $this->notes[252] = "The transaction was accepted, but is being held for merchant review. The merchant may customize the customer response in the Merchant Interface.";
282      $this->notes[253] = "The transaction was accepted and was authorized, but is being held for merchant review. The merchant may customize the customer response in the Merchant Interface.";
283      $this->notes[254] = "The transaction was declined after manual review.";
284      $this->notes[255] = null;
285      $this->notes[256] = null;
286      $this->notes[257] = null;
287      $this->notes[258] = null;
288      $this->notes[259] = null;
289      $this->notes[260] = null;
290      $this->notes[261] = "The transaction experienced an error during sensitive data encryption and was not processed. Please try again.";
291      $this->notes[262] = null;
292      $this->notes[263] = null;
293      $this->notes[264] = null;
294      $this->notes[265] = null;
295      $this->notes[266] = null;
296      $this->notes[267] = null;
297      $this->notes[268] = null;
298      $this->notes[269] = null;
299      $this->notes[270] = "A value submitted in x_line_item for the item referenced is invalid.";
300      $this->notes[271] = "The number of line items submitted in x_line_item exceeds the allowed maximum of 30.";
301     
302      $this->fields[0] = "x_response_code";
303      $this->fields[1] = "x_response_subcode";
304      $this->fields[2] = "x_response_reason_code";
305      $this->fields[3] = "x_response_reason_text";
306      $this->fields[4] = "x_auth_code";
307      $this->fields[5] = "x_avs_code";
308      $this->fields[6] = "x_trans_id";
309      $this->fields[7] = "x_invoice_num";
310      $this->fields[8] = "x_description";
311      $this->fields[9] = "x_amount";
312      $this->fields[10] = "x_method";
313      $this->fields[11] = "x_type";
314      $this->fields[12] = "x_cust_id";
315      $this->fields[13] = "x_first_name";
316      $this->fields[14] = "x_last_name";
317      $this->fields[15] = "x_company";
318      $this->fields[16] = "x_address";
319      $this->fields[17] = "x_city";
320      $this->fields[18] = "x_state";
321      $this->fields[19] = "x_zip";
322      $this->fields[20] = "x_country";
323      $this->fields[21] = "x_phone";
324      $this->fields[22] = "x_fax";
325      $this->fields[23] = "x_email";
326      $this->fields[24] = "x_ship_to_first_name";
327      $this->fields[25] = "x_ship_to_last_name";
328      $this->fields[26] = "x_ship_to_company";
329      $this->fields[27] = "x_ship_to_address";
330      $this->fields[28] = "x_ship_to_city";
331      $this->fields[29] = "x_ship_to_state";
332      $this->fields[30] = "x_ship_to_zip";
333      $this->fields[31] = "x_ship_to_country";
334      $this->fields[32] = "x_tax";
335      $this->fields[33] = "x_duty";
336      $this->fields[34] = "x_freight";
337      $this->fields[35] = "x_tax_exempt";
338      $this->fields[36] = "x_po_num";
339      $this->fields[37] = "x_md5_hash";
340      $this->fields[38] = "x_card_code_response_code";
341      $this->fields[39] = "x_cavv_response_code";
342      for ($i=40; $i<68; $i++)
343      {
344          $this->fields[$i] = null;
345      }
346      $this->process($response);
347  }
public__get ( p )[ obj ]
Parameters
requiredp
Code
007  public function __get($p)
008  {
009      $methods = get_class_methods($this);
010      $properties = get_object_vars($this);
011      if (in_array("get_$p",$methods))
012      {
013          return $this->{"get_$p"}();
014      }
015      else if (array_key_exists("_$p",$properties))
016      {
017          return $this->{"_$p"};
018      }
019      else if (in_array("get_" . substr($p,strpos($p,"_")+1), $methods))
020      {
021          return $this->{"get_" . substr($p,strpos($p,"_")+1)}(substr($p,0,strpos($p,"_")));
022      }
023      else
024      {
025          trigger_error("This object [" . get_class($this) . ":$this->id] has no private property '_$p' for the requested public property '$p'",E_USER_WARNING);
026          return null;
027      }
028  }
publicget_array ( )[ obj ]
Parameters
No parameters for this method
Code
096  public function get_array()
097  {
098      return get_object_vars($this);
099  }
publicget_classname ( )[ obj ]
Parameters
No parameters for this method
Code
086  public function get_classname()
087  {
088      return get_class($this);
089  }
publicget_dirty ( )[ obj ]
Parameters
No parameters for this method
Code
063  public function get_dirty()
064  {
065      if ($this->id === 0)
066      {
067          $this->_dirty = true;
068      }
069      else
070      {
071          foreach (get_object_vars($this) as $k=>$v)
072          {
073              if ($this->_dirty)
074              {
075                  break;
076              }
077              if (preg_match('/_dirty$/',$k))
078              {
079                  $this->_dirty = $this->_dirty || $v;
080              }
081          }
082      }
083      return $this->_dirty;
084  }
publicget_json ( )[ obj ]
Parameters
No parameters for this method
Code
101  public function get_json()
102  {
103      $class = new ReflectionClass($this->classname);
104      $methods = $class->getMethods();
105      usort($methods,"sort_reflection_objects");
106      $accessors = array();
107      foreach ($methods as $index=>$method)
108      {
109          $declarer = $method->getDeclaringClass()->name;
110          if (preg_match('/^(get|set|)_(.+)$/',$method->name,$matches))
111          {
112              $accessor = $matches[2];
113              $getset = $matches[1];
114              eval("\$accessors[\$accessor] = \$this->".$accessor.";");
115          }
116      }
117      //return json_encode($this->get_array());
118      return json_encode($accessors);
119  }
publicget_properties ( )[ obj ]
Parameters
No parameters for this method
Code
121  public function get_properties()
122  {
123      return array_keys($this->array);
124  }
protectedget_string ( )[ obj ]
Parameters
No parameters for this method
Code
091  protected function get_string()
092  {
093      return method_exists($this,"__toString") ? $this->__toString() : null;
094  }
publicprocess ( response )[ authnet_response ]
Parameters
requiredresponse
Code
349  public function process($response)
350  {
351      $data = explode(",",$response);
352     
353      if (count($data) > 1)
354      {
355          for ($i=0; $i<count($data); $i++)
356          {
357              if (!is_null($this->fields[$i]))
358              {
359                  $this->data[$this->fields[$i]] = $data[$i];
360              }
361          }
362         
363          $this->_response_code = $this->data["x_response_code"];
364          $this->_response_subcode = $this->data["x_response_subcode"];
365          $this->_response_reason_code = $this->data["x_response_reason_code"];
366          $this->_response_reason_text = $this->data["x_response_reason_text"];
367          $this->_note = (is_numeric($this->_response_reason_code)) ? $this->notes[$this->_response_reason_code] : null;
368          $this->_auth_code = $this->data["x_auth_code"];
369          $this->_avs_code = $this->data["x_avs_code"];
370          $this->_trans_id = $this->data["x_trans_id"];
371          $this->_md5_hash = $this->data["x_md5_hash"];
372          $this->_card_code_response_code = $this->data["x_card_code_response_code"];
373          $this->_cavv_response_code = $this->data["x_cavv_response_code"];
374          $this->_status = "[ " . $this->_response_reason_code . " ] : " . $this->_response_reason_text . " : " . $this->_note;
375      }
376      return $this->_status;
377  }
public__set ( p , v )[ obj ]
Parameters
requiredp
requiredv
Code
030  public function __set($p,$v)
031  {
032      $methods = get_class_methods($this);
033      $properties = get_object_vars($this);
034      if (in_array("set_$p",$methods))
035      {
036          $this->{"set_$p"}($v);
037      }
038      else if (array_key_exists("_$p",$properties))
039      {
040          if (!preg_match('/_dirty$/',$p) && property_exists($this,"_{$p}_dirty"))
041          {
042              if (is_object($this->{"_$p"}))
043              {
044                  $this->{"_$p"}->dirty = true;
045              }
046              else
047              {
048                  $this->{"_{$p}_dirty"} = $this->{$p}==$v ? false : true;
049              }
050          }
051          $this->{"_$p"} = $v;
052      }
053      else if (in_array("set_" . substr($p,strpos($p,"_")+1), $methods))
054      {
055          $this->{"set_" . substr($p,strpos($p,"_")+1)}($v,substr($p,0,strpos($p,"_")));
056      }
057      else
058      {
059          trigger_error("This object [" . get_class($this) . ":$this->id] has no private property '_$p' for the requested public property '$p'",E_USER_WARNING);
060      }
061  }
 
Accessors
publicarray[ obj ]
Code
096  public function get_array()
097  {
098      return get_object_vars($this);
099  }
publicclassname[ obj ]
Code
086  public function get_classname()
087  {
088      return get_class($this);
089  }
publicdirty[ obj ]
Code
063  public function get_dirty()
064  {
065      if ($this->id === 0)
066      {
067          $this->_dirty = true;
068      }
069      else
070      {
071          foreach (get_object_vars($this) as $k=>$v)
072          {
073              if ($this->_dirty)
074              {
075                  break;
076              }
077              if (preg_match('/_dirty$/',$k))
078              {
079                  $this->_dirty = $this->_dirty || $v;
080              }
081          }
082      }
083      return $this->_dirty;
084  }
publicjson[ obj ]
Code
101  public function get_json()
102  {
103      $class = new ReflectionClass($this->classname);
104      $methods = $class->getMethods();
105      usort($methods,"sort_reflection_objects");
106      $accessors = array();
107      foreach ($methods as $index=>$method)
108      {
109          $declarer = $method->getDeclaringClass()->name;
110          if (preg_match('/^(get|set|)_(.+)$/',$method->name,$matches))
111          {
112              $accessor = $matches[2];
113              $getset = $matches[1];
114              eval("\$accessors[\$accessor] = \$this->".$accessor.";");
115          }
116      }
117      //return json_encode($this->get_array());
118      return json_encode($accessors);
119  }
publicproperties[ obj ]
Code
121  public function get_properties()
122  {
123      return array_keys($this->array);
124  }
publicstring[ obj ]
Code
091  protected function get_string()
092  {
093      return method_exists($this,"__toString") ? $this->__toString() : null;
094  }
Get Helix PHP Framework at SourceForge.net. Fast, secure and Free Open Source software downloads