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

Public Member Functions

 __construct ($protocol, $vendor, $timeout=60, $run_mode= 'Simulator')
 
 setCardName ($card_name)
 
 setCardNumber ($card_no)
 
 setCardExpiryDate ($month, $year)
 
 setCardStartDate ($month, $year)
 
 setCardIssueNumber ($issue_no)
 
 setCardCV2 ($cv2)
 
 setTransactionTypePayment ()
 
 setMerchantReference ($merchant_ref)
 
 setAmount ($amount, $currency)
 
 setDescription ($desc)
 
 setCardType ($card_type)
 
 setBillingFirstnames ($first_names)
 
 setBillingSurname ($surname)
 
 setBillingAddress1 ($address)
 
 setBillingAddress2 ($address)
 
 setBillingCity ($city)
 
 setBillingPostcode ($postcode)
 
 setBillingCountry ($country)
 
 setBillingState ($state)
 
 setBillingPhone ($phone_no)
 
 setDeliveryFirstnames ($first_names)
 
 setDeliverySurname ($surname)
 
 setDeliveryAddress1 ($address)
 
 setDeliveryAddress2 ($address)
 
 setDeliveryCity ($city)
 
 setDeliveryPostcode ($postcode)
 
 setDeliveryCountry ($country)
 
 setDeliveryState ($state)
 
 setDeliveryPhone ($phone_no)
 
 setThreeDSecure ()
 
 setAVSCV2 ()
 
 setGiftAidPayment ()
 
 process ()
 
 authorize ($merchant_ref, $md, $pares)
 
 getResponse ()
 
 getMerchantReference ()
 

Static Public Member Functions

static getTestCardNumbers ()
 
static getCardTypes ()
 

Detailed Description

Definition at line 31 of file sagepay_processor.inc.

Constructor & Destructor Documentation

__construct (   $protocol,
  $vendor,
  $timeout = 60,
  $run_mode = 'Simulator' 
)

Constructor

Parameters
string$protocolthe protocol version of SagePay Direct Protocol
string$vendorthe vendor name of a SagePay account
int$timeoutthe time to wait for a response from SagePay Payment Gateway
string$run_modespecify if this processor is in live,test or simulator mode; default is simulator mode

Definition at line 179 of file sagepay_processor.inc.

Member Function Documentation

authorize (   $merchant_ref,
  $md,
  $pares 
)

Authorize a 3-D Secure transaction

Parameters
string$merchant_refthe merchant reference number for logging
string$mdthe MD that is sent back from the ACS
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 711 of file sagepay_processor.inc.

static getCardTypes ( )
static

Get the list of the card types supported by SagePay

Returns
array public

Definition at line 845 of file sagepay_processor.inc.

getMerchantReference ( )

Get merchant reference

Returns
string public

Definition at line 819 of file sagepay_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 790 of file sagepay_processor.inc.

static getTestCardNumbers ( )
static

Get the list of the magic test card numbers

Returns
array public

Definition at line 832 of file sagepay_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 678 of file sagepay_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 322 of file sagepay_processor.inc.

setAVSCV2 ( )

Set AVS/CV2 for the transaction

Returns
void public

Definition at line 651 of file sagepay_processor.inc.

setBillingAddress1 (   $address)

Set billing address 1

Parameters
string$addressthe first line of the billing address
Returns
void public

Definition at line 400 of file sagepay_processor.inc.

setBillingAddress2 (   $address)

Set billing address 2

Parameters
string$addressthe second line of the billing address
Returns
void public

Definition at line 415 of file sagepay_processor.inc.

setBillingCity (   $city)

Set billing city

Parameters
string$citythe city component of the billing address
Returns
void public

Definition at line 430 of file sagepay_processor.inc.

setBillingCountry (   $country)

Set billing country

Parameters
string$addressthe country component of the billing address
Returns
void public

Definition at line 460 of file sagepay_processor.inc.

setBillingFirstnames (   $first_names)

Set billing first names

Parameters
string$first_namesthe customer's first names
Returns
void public

Definition at line 370 of file sagepay_processor.inc.

setBillingPhone (   $phone_no)

Set billing phone

Parameters
string$phone_nothe phone number at the billing address
Returns
void public

Definition at line 490 of file sagepay_processor.inc.

setBillingPostcode (   $postcode)

Set billing postcode

Parameters
string$postcodethe postcode component of the billing address
Returns
void public

Definition at line 445 of file sagepay_processor.inc.

setBillingState (   $state)

Set billing state

Parameters
string$statethe state component of the billing address if the country is the United States
Returns
void public

Definition at line 475 of file sagepay_processor.inc.

setBillingSurname (   $surname)

Set billing surname

Parameters
string$first_namesthe customer's surname
Returns
void public

Definition at line 385 of file sagepay_processor.inc.

setCardCV2 (   $cv2)

Set card CV2

Parameters
string$cv2the card CV2
Returns
void public

Definition at line 276 of file sagepay_processor.inc.

setCardExpiryDate (   $month,
  $year 
)

Set expiry date

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

Definition at line 230 of file sagepay_processor.inc.

setCardIssueNumber (   $issue_no)

Set card issue number

Parameters
string$issue_nothe card issue number
Returns
void public

Definition at line 261 of file sagepay_processor.inc.

setCardName (   $card_name)

Set card name

Parameters
string$card_namethe card name
Returns
void public

Definition at line 197 of file sagepay_processor.inc.

setCardNumber (   $card_no)

Set card number

Parameters
string$card_nothe card number
Returns
void public

Definition at line 212 of file sagepay_processor.inc.

setCardStartDate (   $month,
  $year 
)

Set start date

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

Definition at line 246 of file sagepay_processor.inc.

setCardType (   $card_type)

Set card type

Parameters
string$card_typethe card type
Returns
void public

Definition at line 354 of file sagepay_processor.inc.

setDeliveryAddress1 (   $address)

Set delivery address 1

Parameters
string$addressthe first line of the delivery address
Returns
void public

Definition at line 535 of file sagepay_processor.inc.

setDeliveryAddress2 (   $address)

Set delivery address 2

Parameters
string$addressthe second line of the delivery address
Returns
void public

Definition at line 550 of file sagepay_processor.inc.

setDeliveryCity (   $city)

Set delivery city

Parameters
string$citythe city component of the delivery address
Returns
void public

Definition at line 565 of file sagepay_processor.inc.

setDeliveryCountry (   $country)

Set delivery country

Parameters
string$addressthe country component of the delivery address
Returns
void public

Definition at line 595 of file sagepay_processor.inc.

setDeliveryFirstnames (   $first_names)

Set delivery first names

Parameters
string$first_namesthe customer's first names
Returns
void public

Definition at line 505 of file sagepay_processor.inc.

setDeliveryPhone (   $phone_no)

Set delivery phone

Parameters
string$phone_nothe phone number at the delivery address
Returns
void public

Definition at line 625 of file sagepay_processor.inc.

setDeliveryPostcode (   $postcode)

Set delivery postcode

Parameters
string$postcodethe postcode component of the delivery address
Returns
void public

Definition at line 580 of file sagepay_processor.inc.

setDeliveryState (   $state)

Set delivery state

Parameters
string$statethe state component of the delivery address if the country is the United States
Returns
void public

Definition at line 610 of file sagepay_processor.inc.

setDeliverySurname (   $surname)

Set delivery surname

Parameters
string$first_namesthe customer's surname
Returns
void public

Definition at line 520 of file sagepay_processor.inc.

setDescription (   $desc)

Set description of transaction

Parameters
string$descthe description of transaction
Returns
void public

Definition at line 339 of file sagepay_processor.inc.

setGiftAidPayment ( )

Set Gift Aid Payment for the transaction

Returns
void public

Definition at line 664 of file sagepay_processor.inc.

setMerchantReference (   $merchant_ref)

Set merchant reference

Parameters
string$merchant_refthe merchant reference number
Returns
void public

Definition at line 305 of file sagepay_processor.inc.

setThreeDSecure ( )

Set 3-D Secure for the transaction

Returns
void public

Definition at line 638 of file sagepay_processor.inc.

setTransactionTypePayment ( )

Set transaction type to PAYMENT

Returns
void public

Definition at line 289 of file sagepay_processor.inc.


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