@@ -133,6 +133,13 @@ class SecurePay {
133133 */
134134 public $ PreAuth ;
135135
136+ /**
137+ * Credit card holder name in credit card
138+ * @access public
139+ * @var string
140+ */
141+ public $ NameOnCard ;
142+
136143 /**
137144 * The credit card number to work with
138145 * @access public
@@ -376,10 +383,11 @@ function TestMode($TestMode = TRUE) {
376383 * @param bool $PreAuth Indicate that this transaction is a preauth
377384 * @return int Returns the corresponding SECUREPAY_STATUS_* code
378385 */
379- function Process ($ ChargeAmount = null , $ ChargeCurrency = null , $ Cc = null , $ ExpiryDate = null , $ Cvv = null , $ OrderId = null , $ PreAuth = FALSE ) {
386+ function Process ($ ChargeAmount = null , $ ChargeCurrency = null , $ NameOnCard = null , $ Cc = null , $ ExpiryDate = null , $ Cvv = null , $ OrderId = null , $ PreAuth = FALSE ) {
380387 // Set class variables from function call for later use {{{
381388 if ($ ChargeAmount ) $ this ->ChargeAmount = $ ChargeAmount ;
382389 if ($ ChargeCurrency ) $ this ->ChargeCurrency = $ ChargeCurrency ;
390+ if ($ NameOnCard ) $ this ->NameOnCard = $ NameOnCard ;
383391 if ($ Cc ) $ this ->Cc = $ Cc ;
384392 if ($ ExpiryDate ) $ this ->ExpiryDate = $ ExpiryDate ;
385393 if ($ Cvv ) $ this ->Cvv = $ Cvv ;
@@ -444,7 +452,7 @@ function Refund($TransactionId = null,$OrderId = null,$ChargeAmount=null){
444452
445453 $ this ->RequestXml = $ this ->_ComposeRefund ();
446454 $ this ->ResponseXml = $ this ->_Dispatch ($ this ->RequestXml );
447-
455+
448456 // If no XML response, assume processing timed out.
449457 if ((false === $ this ->ResponseXml ) || (false == is_string ($ this ->ResponseXml ))) {
450458 return $ this ->_TranslateServerCode (512 );
@@ -507,7 +515,7 @@ function TestConnection() {
507515 // If no XML response, assume processing timed out.
508516 if ((false === $ this ->ResponseXml ) || (false == is_string ($ this ->ResponseXml ))) {
509517 $ this ->_TranslateServerCode (512 );
510-
518+
511519 return false ;
512520 }
513521
@@ -982,6 +990,8 @@ function _ComposePayment() {
982990 $ message .= "\t\t\t\t\t<expiryDate> {$ this ->ExpiryDate }</expiryDate> \n" ;
983991 if ($ this ->Cvv ) // Provided with CVV/CV2 number
984992 $ message .= "\t\t\t\t\t<cvv> {$ this ->Cvv }</cvv> \n" ;
993+ if ($ this ->NameOnCard ) // Provided with credit card holder name
994+ $ message .= "\t\t\t\t\t<cardHolderName> {$ this ->NameOnCard }</cardHolderName> \n" ;
985995 $ message .= "\t\t\t\t</CreditCardInfo> \n" ;
986996 $ message .= "\t\t\t\t<amount> $ cents</amount> \n" ;
987997 $ message .= "\t\t\t\t<currency> {$ this ->ChargeCurrency }</currency> \n" ;
@@ -1028,6 +1038,8 @@ function _ComposePayment() {
10281038 $ message .= "\t\t\t\t\t<expiryDate> {$ this ->ExpiryDate }</expiryDate> \n" ;
10291039 if ($ this ->Cvv ) // Provided with CVV/CV2 number
10301040 $ message .= "\t\t\t\t\t<cvv> {$ this ->Cvv }</cvv> \n" ;
1041+ if ($ this ->NameOnCard ) // Provided with credit card holder name
1042+ $ message .= "\t\t\t\t\t<cardHolderName> {$ this ->NameOnCard }</cardHolderName> \n" ;
10311043 }
10321044 $ message .= "\t\t\t\t</CreditCardInfo> \n" ;
10331045 $ message .= "\t\t\t</Txn> \n" ;
0 commit comments