Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
Datacash_Processor Class Reference

Public Member Functions

 __construct ($client, $password, $datacash_api_path, $cardinfo_dir_path, $timeout=60, $test_mode=TRUE)
 
 setCardNumber ($card_no)
 
 setCardExpiryDate ($month, $year)
 
 setCardStartDate ($month, $year)
 
 setCardIssueNumber ($issue_no)
 
 setCardCV2 ($cv2)
 
 setStreetAddress ($number, $address)
 
 setPostcode ($postcode)
 
 setTransactionTypeAuth ()
 
 setMerchantReference ($merchant_ref)
 
 setAmount ($amount, $currency)
 
 setThreeDSecureParams ($merchant_url, $purchase_desc, $purchase_time, $extra_nonthreed_card_types)
 
 setThreeDSecure ()
 
 setStandardPolicy ($policy)
 
 setAuthorization ($reference, $pares=NULL, $method= 'threedsecure_authorization_request')
 
 process ()
 
 authorize ($datacash_ref, $pares=NULL)
 
 getResponse ()
 
 getMerchantReference ()
 

Static Public Member Functions

static getTestCardNumbers ()
 

Detailed Description

Definition at line 31 of file datacash_processor.inc.

Constructor & Destructor Documentation

__construct (   $client,
  $password,
  $datacash_api_path,
  $cardinfo_dir_path,
  $timeout = 60,
  $test_mode = TRUE 
)

Constructor

Parameters
string$clientID of the Datacash account
string$passwordpassword of the Datacash account
string$datacash_api_paththe path to the Datacash PHP API's DataCash.php file
string$cardinfo_dir_paththe path to the directory that holds the Datacash CardInfo files
int$timeoutthe time to wait for a response from Datacash Payment Gateway
boolean$test_modespecify if this processor is in live or test mode; default is test mode

Definition at line 184 of file datacash_processor.inc.

Member Function Documentation

authorize (   $datacash_ref,
  $pares = NULL 
)

Authorize a 3-D Secure transaction

Parameters
string$datacash_refthe Datacash reference number
string$paresthe Payment Authentication Response (PARes) returned by the Access Control Server (ACS)
Returns
mixed return 1 if SUCCESS; otherwise, return FALSE public

Definition at line 565 of file datacash_processor.inc.

getMerchantReference ( )

Get merchant reference

Returns
string public

Definition at line 651 of file datacash_processor.inc.

getResponse ( )

Returns the gateway response array in standard format

This should be the format other gateways use to return their response

public

Returns
array

Definition at line 622 of file datacash_processor.inc.

static getTestCardNumbers ( )
static

Get the list of the magic test card numbers

Returns
array public

Definition at line 664 of file datacash_processor.inc.

process ( )

Process the transaction

Returns
mixed return FALSE if the card is not valid or transaction fails, return 1 if SUCCESS, return 2 if need to REDIRECT in 3-D Secure check public

Definition at line 496 of file datacash_processor.inc.

setAmount (   $amount,
  $currency 
)

Set amount of transaction

Parameters
string$amountthe amount of the transaction
string$currencythe currency of the amount
Returns
void public

Definition at line 401 of file datacash_processor.inc.

setAuthorization (   $reference,
  $pares = NULL,
  $method = 'threedsecure_authorization_request' 
)

Set Parameters for Authorization transaction

Parameters
string$referencethe Datacash reference number
string$paresthe Payment Authentication Response (PARes) returned by the Access Control Server (ACS)
int$methodthe transaction type that can be threedsecure_authorization_request, threedsecure_authorize_referral_request or fulfill
Returns
void public

Definition at line 479 of file datacash_processor.inc.

setCardCV2 (   $cv2)

Set card CV2

Parameters
string$cv2the card CV2
Returns
void public

Definition at line 326 of file datacash_processor.inc.

setCardExpiryDate (   $month,
  $year 
)

Set expiry date

Parameters
string$monththe expiry month
string$yearthe expiry year
Returns
void public

Definition at line 280 of file datacash_processor.inc.

setCardIssueNumber (   $issue_no)

Set card issue number

Parameters
string$issue_nothe card issue number
Returns
void public

Definition at line 311 of file datacash_processor.inc.

setCardNumber (   $card_no)

Set card number

Parameters
string$card_nothe card number
Returns
void public

Definition at line 264 of file datacash_processor.inc.

setCardStartDate (   $month,
  $year 
)

Set start date

Parameters
string$monththe start month
string$yearthe start year
Returns
void public

Definition at line 296 of file datacash_processor.inc.

setMerchantReference (   $merchant_ref)

Set merchant reference

Parameters
string$merchant_refthe merchant reference number
Returns
void public

Definition at line 385 of file datacash_processor.inc.

setPostcode (   $postcode)

Set Postcode

Parameters
string$postcodethe postcode of the address
Returns
void public

Definition at line 357 of file datacash_processor.inc.

setStandardPolicy (   $policy)

Set Standard Policy

Parameters
string$policythe policy value (1, 2, 3, 5, 6, 7) for standard policy
Returns
void public

Definition at line 462 of file datacash_processor.inc.

setStreetAddress (   $number,
  $address 
)

Set Street Address

Parameters
int$numberthe order of line of the address
string$addressthe $number-th line of the address
Returns
void public

Definition at line 342 of file datacash_processor.inc.

setThreeDSecure ( )

Set 3-D Secure for the transaction

Returns
void public

Definition at line 439 of file datacash_processor.inc.

setThreeDSecureParams (   $merchant_url,
  $purchase_desc,
  $purchase_time,
  $extra_nonthreed_card_types 
)

Set 3-D Secure Parameters

Parameters
string$merchant_urlthe URL of the website on which the payment is made
string$purchase_descthe short description of what has been purchased
int$purchase_timethe Unix timestamp of the transaction
array$extra_nonthreed_card_typesthe list of card types that do not need to go through 3-D Secure check in addition to the list $this->_nonthreed_card_types
Returns
void public

Definition at line 419 of file datacash_processor.inc.

setTransactionTypeAuth ( )

Set transaction type to "auth"

Returns
void public

Definition at line 370 of file datacash_processor.inc.


The documentation for this class was generated from the following file: