My Profile_


Card Verification with CVD & AVS

NEW!   We now have our Interactive tool for this section.

Verifies the validity of the credit card, expiry date and any additional details (such as the Card Verification Digits or Address Verification details). It does not verify the available amount or lock any funds on the credit card.

The Card Validation Digits (CVD) value refers to the numbers appearing on the back of the credit card rather than the numbers imprinted on the front. It is an optional fraud prevention tool that enables merchants to verify data provided by the cardholder at transaction time. This data is submitted along with the transaction to the issuing bank, which provides a response indicating whether the data is a match.

The response that is received from CVD verification is intended to provide added security and fraud prevention, but the response itself does not affect the completion of a transaction. Upon receiving a response, the choice whether to proceed with a transaction is left entirely to the merchant. The response is not a strict guideline of which transaction will approve or decline.

Address Verification Service (AVS) is an optional fraud-prevention tool offered by issuing banks whereby a cardholder's address is submitted as part of the transaction authorization. The AVS address is then compared to the address kept on file at the issuing bank. AVS checks whether the street number, street name and zip/postal code match. The issuing bank returns an AVS result code indicating whether the data was matched successfully. Regardless of the AVS result code returned, the credit card is authorized or declined by the issuing bank.

The response that is received from AVS verification is intended to provide added security and fraud prevention, but the response itself does not affect the completion of a transaction. Upon receiving a response, the choice to proceed with a transaction is left entirely to the merchant. The responses is not a strict guideline of whether a transaction will be approved or declined.

Things to consider:

Security:The CVD value must only be passed to the payment gateway. Under no circumstances may it be stored for subsequent uses or displayed as part of the receipt information.

Canada Code Sample

<?php
require "../../mpgClasses.php";
$store_id='store5';
$api_token="yesguy";
$txnArray=array('type'=>'card_verification',
         'order_id'=>'ord-'.date("dmy-G:i:s"),
         'cust_id'=>'my cust id',
         'pan'=>'4242424242424242',
         'expdate'=>'1512',
         'crypt_type'=>'7'
           );
$mpgTxn = new mpgTransaction($txnArray);
/************************** AVS Variables *****************************/
$avs_street_number = '201';
$avs_street_name = 'Michigan Ave';
$avs_zipcode = 'M1M1M1';
/************************** CVD Variables *****************************/
$cvd_indicator = '1';
$cvd_value = '198';
/********************** AVS Associative Array *************************/
$avsTemplate = array(
    'avs_street_number'=>$avs_street_number,
    'avs_street_name' =>$avs_street_name,
    'avs_zipcode' => $avs_zipcode
);
/********************** CVD Associative Array *************************/
$cvdTemplate = array(
    'cvd_indicator' => $cvd_indicator,
    'cvd_value' => $cvd_value
);
/************************** AVS Object ********************************/
$mpgAvsInfo = new mpgAvsInfo ($avsTemplate);
/************************** CVD Object ********************************/
$mpgCvdInfo = new mpgCvdInfo ($cvdTemplate);
/*********************** Credential on File ************************/
$cof = new CofInfo();
$cof->setPaymentIndicator("U");
$cof->setPaymentInformation("2");
$cof->setIssuerId("168451306048014");
$mpgTxn->setAvsInfo($mpgAvsInfo);
$mpgTxn->setCvdInfo($mpgCvdInfo);
$mpgTxn->setCofInfo($cof);
$mpgRequest = new mpgRequest($mpgTxn);
$mpgRequest->setProcCountryCode("CA"); //"US" for sending transaction to US environment
$mpgRequest->setTestMode(true); //false or comment out this line for production transactions
$mpgHttpPost  =new mpgHttpsPost($store_id,$api_token,$mpgRequest);
$mpgResponse=$mpgHttpPost->getMpgResponse();
print("\nCardType = " . $mpgResponse->getCardType());
print("\nTransAmount = " . $mpgResponse->getTransAmount());
print("\nTxnNumber = " . $mpgResponse->getTxnNumber());
print("\nReceiptId = " . $mpgResponse->getReceiptId());
print("\nTransType = " . $mpgResponse->getTransType());
print("\nReferenceNum = " . $mpgResponse->getReferenceNum());
print("\nResponseCode = " . $mpgResponse->getResponseCode());
print("\nISO = " . $mpgResponse->getISO());
print("\nMessage = " . $mpgResponse->getMessage());
print("\nIsVisaDebit = " . $mpgResponse->getIsVisaDebit());
print("\nAuthCode = " . $mpgResponse->getAuthCode());
print("\nComplete = " . $mpgResponse->getComplete());
print("\nTransDate = " . $mpgResponse->getTransDate());
print("\nTransTime = " . $mpgResponse->getTransTime());
print("\nTicket = " . $mpgResponse->getTicket());
print("\nTimedOut = " . $mpgResponse->getTimedOut());
print("\nIssuerId = " . $mpgResponse->getIssuerId());
?>

                

Transaction Values

$txnArray=array('type'=>'card_verification',... );

$mpgTxn = new mpgTransaction($txnArray);

$mpgRequest = new mpgRequest($mpgTxn);

Card Verification transaction object mandatory values

Value Type Limits Set method Description
Order ID String 50-character alphanumeric 'order_id' Merchant-defined transaction identifier that must be unique for every Purchase, Pre-Authorization and Independent Refund transaction. No two transactions of these types may have the same order ID.

For Refund, Completion and Purchase Correction transactions, the order ID must be the same as that of the original transaction.

The last 10 characters of the order ID are displayed in the “Invoice Number” field on the Merchant Direct Reports. However only letters, numbers and spaces are sent to Merchant Direct.

A minimum of 3 and a maximum of 10 valid characters are sent to Merchant Direct. Only the last characters beginning after any invalid characters are sent. For example, if the order ID is 1234-567890, only 567890 is sent to Merchant Direct.

If the order ID has fewer than 3 characters, it may display a blank or 0000000000 in the Invoice Number field.
Credit card number String 20-character alphanumeric 'pan' Most credit card numbers today are 16 digits, but some 13-digit numbers are still accepted by some issuers. This field has been intentionally expanded to 20 digits in consideration for future expansion and potential support of private label card ranges.
Expiry date String 4-character alphanumeric
(YYMM format)
'expdate' Submit in YYMM format. 
Note: This is the reverse of the date displayed on the physical card, which is MMYY.
E-commerce indicator String 1-character alphanumeric 'crypt_type'

Describes the category of e-commerce transaction being processed. Allowable values are:


  • 1 - Mail Order / Telephone Order—Single
  • 2 - Mail Order / Telephone Order—Recurring
  • 3 - Mail Order / Telephone Order—Instalment
  • 4 - Mail Order / Telephone Order—Unknown classification
  • 5 - Authenticated e-commerce transaction (VBV)
  • 6 - Non-authenticated e-commerce transaction (VBV)
  • 7 - SSL-enabled merchant

In Credential on File transactions where the request field e-commerce indicator is also being sent: the allowable values for e-commerce indicator are dependent on the value sent for payment indicator, as follows:


if payment indicator = R, then allowable values for e-commerce indicator: 2, 5 or 6
if payment indicator = C, then allowable values for e-commerce indicator: 1, 5, 6 or 7
if payment indicator = U, then allowable values for e-commerce indicator: 1 or 7
if payment indicator = Z, then allowable values for e-commerce indicator: 1, 5, 6 or 7

CVD Object Not applicable. $mpgCvdInfo = new mpgCvdInfo ($cvdTemplate);
$mpgTxn->setCvdInfo($mpgCvdInfo);
Note:It is optional for Canada. Refer below for further breakdown and definition.

Card Verification transaction object conditional values

Value Type Limits Set method Description
AVS Object Not applicable. $mpgAvsInfo = new mpgAvsInfo ($avsTemplate);
$mpgTxn->setAvsInfo($mpgAvsInfo);
Note:It is optional for Canada. Refer below for further breakdown and definition.
COF Info Object $mpgTxn->setCofInfo($cof); Refer to Card Verification with Credential on File
CvdInfo object mandatory values
Value Type Limits Set method Description
CVD indicator String 1-character numeric 'cvd_indicator' CVD presence indicator:
0: CVD value is deliberately bypassed or is not provided by the merchant.
1: CVD value is present.
2: CVD value is on the card, but is illegible.
9: Cardholder states that the card has no CVD imprint.
CVD Value String 4-character numeric 'cvd_value' CVD value located on credit card. The CVD value (supplied by the cardholder) must only be passed to the payment gateway. Under no circumstances may it be stored for subsequent use or displayed as part of the receipt information.

AvsInfo object mandatory values
Value Type Limits Set method Description
AVS street number String 19-character alphanumeric1 'avs_street_number' Cardholder street number.
AVS street name String See AVS street number 'avs_street_name' Cardholder street name.
AVS zip/postal code String 9-character alphanumeric 'avs_zipcode' . Cardholder zip/postal code

CVD & AVS Response Fields

Value Limits Get Method Description
CVD result code 2-character alphanumeric $mpgResponse->getCvdResultCode(); Indicates the CVD validation result. The first byte is the numeric CVD indicator sent in the request; the second byte is the response code. Possible response codes are shown in the CVD Result Code table.
AVS result code 1-character alphanumeric $mpgResponse->getAvsResultCode(); Indicates the address verification result. For a full list of possible response codes refer to the AVS Result Code table.

Card verification with Credential on File

Merchants can use Card Verification with COF AVS and CVD as the first transaction prior to storing the credentials instead of Purchase or Preauthorization.

Verifies the validity of the credit card, expiry date and any additional details (such as the Card Verification Digits or Address Verification details). It does not verify the available amount or lock any funds on the credit card.

The Card Validation Digits (CVD) value refers to the numbers appearing on the back of the credit card rather than the numbers imprinted on the front. It is an optional fraud prevention tool that enables merchants to verify data provided by the cardholder at transaction time. This data is submitted along with the transaction to the issuing bank, which provides a response indicating whether the data is a match.

The response that is received from CVD verification is intended to provide added security and fraud prevention, but the response itself does not affect the completion of a transaction. Upon receiving a response, the choice whether to proceed with a transaction is left entirely to the merchant. The response is not a strict guideline of which transaction will approve or decline.

Address Verification Service (AVS) is an optional fraud-prevention tool offered by issuing banks whereby a cardholder's address is submitted as part of the transaction authorization. The AVS address is then compared to the address kept on file at the issuing bank. AVS checks whether the street number, street name and zip/postal code match. The issuing bank returns an AVS result code indicating whether the data was matched successfully. Regardless of the AVS result code returned, the credit card is authorized or declined by the issuing bank.

The response that is received from AVS verification is intended to provide added security and fraud prevention, but the response itself does not affect the completion of a transaction. Upon receiving a response, the choice to proceed with a transaction is left entirely to the merchant. The responses is not a strict guideline of whether a transaction will be approved or declined.

Things to consider:

Security:The CVD value must only be passed to the payment gateway. Under no circumstances may it be stored for subsequent uses or displayed as part of the receipt information.

Canada Code Sample

 
require "../../mpgClasses.php";
 
$store_id='store5';
$api_token="yesguy";
 
$txnArray=array('type'=>'card_verification',
         'order_id'=>'ord-'.date("dmy-G:i:s"),
         'cust_id'=>'my cust id',
         'pan'=>'4242424242424242',
         'expdate'=>'1512',
         'crypt_type'=>'7'
           );
 
$mpgTxn = new mpgTransaction($txnArray);
 
/************************** AVS Variables *****************************/
 
$avs_street_number = '201';
$avs_street_name = 'Michigan Ave';
$avs_zipcode = 'M1M1M1';
 
/************************** CVD Variables *****************************/
 
$cvd_indicator = '1';
$cvd_value = '198';
 
/********************** AVS Associative Array *************************/
 
$avsTemplate = array(
    'avs_street_number'=>$avs_street_number,
    'avs_street_name' =>$avs_street_name,
    'avs_zipcode' => $avs_zipcode
);
 
/********************** CVD Associative Array *************************/
 
$cvdTemplate = array(
    'cvd_indicator' => $cvd_indicator,
    'cvd_value' => $cvd_value
);
 
/************************** AVS Object ********************************/
 
$mpgAvsInfo = new mpgAvsInfo ($avsTemplate);
 
/************************** CVD Object ********************************/
 
$mpgCvdInfo = new mpgCvdInfo ($cvdTemplate);
 
/*********************** Credential on File ************************/
$cof = new CofInfo();
$cof->setPaymentIndicator("U");
$cof->setPaymentInformation("2");
$cof->setIssuerId("168451306048014");
 
$mpgTxn->setAvsInfo($mpgAvsInfo);
$mpgTxn->setCvdInfo($mpgCvdInfo);
$mpgTxn->setCofInfo($cof);
 
$mpgRequest = new mpgRequest($mpgTxn);
$mpgRequest->setProcCountryCode("CA"); //"US" for sending transaction to US environment
$mpgRequest->setTestMode(true); //false or comment out this line for production transactions
 
$mpgHttpPost  =new mpgHttpsPost($store_id,$api_token,$mpgRequest);
 
$mpgResponse=$mpgHttpPost->getMpgResponse();
 
print("\nCardType = " . $mpgResponse->getCardType());
print("\nTransAmount = " . $mpgResponse->getTransAmount());
print("\nTxnNumber = " . $mpgResponse->getTxnNumber());
print("\nReceiptId = " . $mpgResponse->getReceiptId());
print("\nTransType = " . $mpgResponse->getTransType());
print("\nReferenceNum = " . $mpgResponse->getReferenceNum());
print("\nResponseCode = " . $mpgResponse->getResponseCode());
print("\nISO = " . $mpgResponse->getISO());
print("\nMessage = " . $mpgResponse->getMessage());
print("\nIsVisaDebit = " . $mpgResponse->getIsVisaDebit());
print("\nAuthCode = " . $mpgResponse->getAuthCode());
print("\nComplete = " . $mpgResponse->getComplete());
print("\nTransDate = " . $mpgResponse->getTransDate());
print("\nTransTime = " . $mpgResponse->getTransTime());
print("\nTicket = " . $mpgResponse->getTicket());
print("\nTimedOut = " . $mpgResponse->getTimedOut());
print("\nIssuerId = " . $mpgResponse->getIssuerId());
 
?>
 

                

Transaction Values

$txnArray=array('type'=>'card_verification',... );

$mpgTxn = new mpgTransaction($txnArray);

$mpgRequest = new mpgRequest($mpgTxn);

Card Verification transaction object mandatory values

Value Type Limits Set method Description
Order ID String 50-character alphanumeric 'order_id' Merchant-defined transaction identifier that must be unique for every Purchase, Pre-Authorization and Independent Refund transaction. No two transactions of these types may have the same order ID.

For Refund, Completion and Purchase Correction transactions, the order ID must be the same as that of the original transaction.

The last 10 characters of the order ID are displayed in the “Invoice Number” field on the Merchant Direct Reports. However only letters, numbers and spaces are sent to Merchant Direct.

A minimum of 3 and a maximum of 10 valid characters are sent to Merchant Direct. Only the last characters beginning after any invalid characters are sent. For example, if the order ID is 1234-567890, only 567890 is sent to Merchant Direct.

If the order ID has fewer than 3 characters, it may display a blank or 0000000000 in the Invoice Number field.
Credit card number String 20-character alphanumeric 'pan' Most credit card numbers today are 16 digits, but some 13-digit numbers are still accepted by some issuers. This field has been intentionally expanded to 20 digits in consideration for future expansion and potential support of private label card ranges.
Expiry date String 4-character alphanumeric
(YYMM format)
'expdate' Submit in YYMM format. 
Note: This is the reverse of the date displayed on the physical card, which is MMYY.
E-commerce indicator String 1-character alphanumeric 'crypt_type'

Describes the category of e-commerce transaction being processed. Allowable values are:


  • 1 - Mail Order / Telephone Order—Single
  • 2 - Mail Order / Telephone Order—Recurring
  • 3 - Mail Order / Telephone Order—Instalment
  • 4 - Mail Order / Telephone Order—Unknown classification
  • 5 - Authenticated e-commerce transaction (VBV)
  • 6 - Non-authenticated e-commerce transaction (VBV)
  • 7 - SSL-enabled merchant

In Credential on File transactions where the request field e-commerce indicator is also being sent: the allowable values for e-commerce indicator are dependent on the value sent for payment indicator, as follows:


if payment indicator = R, then allowable values for e-commerce indicator: 2, 5 or 6
if payment indicator = C, then allowable values for e-commerce indicator: 1, 5, 6 or 7
if payment indicator = U, then allowable values for e-commerce indicator: 1 or 7
if payment indicator = Z, then allowable values for e-commerce indicator: 1, 5, 6 or 7

Card Verification transaction object conditional values

Value Type Limits Set method Description
AVS Object Not applicable. $mpgAvsInfo = new mpgAvsInfo ($avsTemplate);
$mpgTxn->setAvsInfo($mpgAvsInfo);
Note: It is optional for Canada. Refer below for further breakdown and definition.
CVD Object Not applicable. $mpgCvdInfo = new mpgCvdInfo ($cvdTemplate);
$mpgTxn->setCvdInfo($mpgCvdInfo);
Note:It is optional for Canada. Refer below for further breakdown and definition.
COF Info Object $mpgTxn->setCofInfo($cof); For more information, see Definitions of Request Fields – Credential on File below.
CvdInfo object mandatory values
Value Type Limits Set method Description
CVD indicator String 1-character numeric 'cvd_indicator' CVD presence indicator:
0: CVD value is deliberately bypassed or is not provided by the merchant.
1: CVD value is present.
2: CVD value is on the card, but is illegible.
9: Cardholder states that the card has no CVD imprint.
CVD Value String 4-character numeric 'cvd_value' CVD value located on credit card. The CVD value (supplied by the cardholder) must only be passed to the payment gateway. Under no circumstances may it be stored for subsequent use or displayed as part of the receipt information.

AvsInfo object mandatory values
Value Type Limits Set method Description
AVS street number String 19-character alphanumeric1 'avs_street_number' Cardholder street number.
AVS street name String See AVS street number 'avs_street_name' Cardholder street name.
AVS zip/postal code String 9-character alphanumeric 'avs_zipcode' . Cardholder zip/postal code

CVD & AVS Response Fields

Value Limits Get Method Description
CVD result code 2-character alphanumeric $mpgResponse->getCvdResultCode(); Indicates the CVD validation result. The first byte is the numeric CVD indicator sent in the request; the second byte is the response code. Possible response codes are shown in the CVD Result Code table.
AVS result code 1-character alphanumeric $mpgResponse->getAvsResultCode(); Indicates the address verification result. For a full list of possible response codes refer to the AVS Result Code table.

Credential on File Info Object and Variables

The Credential on File Info object is nested within the request for the applicable transaction types.

Object:

  • cof

Variables in the cof object:

  • PaymentIndicator
  • PaymentInformation
  • IssuerID

For more information, see Definitions of Request Fields – Credential on File below.


Definitions of Request Fields – Credential on File
Variable Name Type Limits Decription
IssuerID

NOTE: This variable is required for all merchant- intiated transactions following the first one; upon sending the first transaction, the IssuerID value is received in the transaction response and then used in subsequent transaction requests (IssuerID does not apply for Discover or Union Pay).

String 15-character alphanumeric

Variable length

Unique identifier for the cardholder's stored credentials

Sent back in the response from the card brand when processing a Credential on File transaction

If the cardholder's credentials are being stored for the first time, you must save the IssuerID on your system to use in subsequent Credential on File transactions

IssuerID must be saved to your system in the following cases:
PaymentIndicator String 1-character alphabetic Indicates the current or intended use of the credentials

Possible values for first transactions:
C - unscheduled Credential on File (first transactions only)
R – recurring

Possible values for subsequent transactions:
R - recurring
U - unscheduled merchant-initiated transaction
Z - unscheduled customer-initiated transaction

In Credential on File transactions where the request field e-commerce indicator is also being sent: the allowable values for e-commerce indicator are dependent on the value sent for payment indicator, as follows:

if payment indicator = R, then allowable values for e-commerce indicator: 2, 5 or 6
if payment indicator = C, then allowable values for e-commerce indicator: 1, 5, 6 or 7
if payment indicator = U, then allowable values for e-commerce indicator: 1 or 7
if payment indicator = Z, then allowable values for e-commerce indicator: 1, 5, 6 or 7
PaymentInformation String 1-character numeric Describes whether the transaction is the first or subsequent in the series
Possible values are:
0 - first transaction in a series (storing payment details provided by the cardholder)
2 - subsequent transactions (using previously stored payment details)
COF Info Object mandatory values
Value Type Limits Set Method
IssuerID
NOTE: This variable is required for all merchant- intiated transactions following the first one; upon sending the first transaction, the Issuer ID value is received in the transaction response and then used in subsequent transaction requests (IssuerID does not apply for Discover or Union Pay).
String 15-character alphanumeric

variable length
$cof->setIssuerId("VALUE_ FOR_ISSUER_ID");
NOTE: For a list and explanation of the possible values to send for this variable, see Definitions of Request Fields – Credential on File
PaymentIndicator String 1-character alphabetic $cof->setPaymentIndicator ("PAYMENT_INDICATOR_VALUE");
NOTE: For a list and explanation of the possible values to send for this variable, see Definitions of Request Fields – Credential on File
PaymentInformation String 1-character numeric $cof->setPaymentInformation ("PAYMENT_INFO_VALUE");
NOTE: For a list and explanation of the possible values to send for this variable, see Definitions of Request Fields – Credential on File

Card Verification with Vault and CVD & AVS

This transaction uses the data key to identify a previously registered credit card profile. The details saved within the profile are then submitted to perform a Card Verification transaction. 

The data key may be a temporary one generated using Hosted Tokenization or it may be a permanent one from the Vault. The Vault feature allows merchants to create long term customer profiles, edit those profiles, and use them to process transactions without having to enter financial information each time. 

The only difference between processing a Card Verification using a temporary token versus a standard Vault token is whether the expiry date is sent. With the Vault token, the expiry date is stored along with the card number as part of the Vault profile. Therefore, there is no need to send the expiry date again with each normal Vault transaction. However, a temporary token transaction may have only stored the card number. Therefore, in this scenario the expiry date must be sent when you submit the Card Verification.

Things to consider:

Security:The CVD value must only be passed to the payment gateway. Under no circumstances may it be stored for subsequent uses or displayed as part of the receipt information.

Canada Code Sample

 
require "../../mpgClasses.php";
 
/************************ Request Variables **********************************/
 
$store_id='store5';
$api_token='yesguy';
 
/************************ Transaction Variables ******************************/
 
$data_key='t8RCndWBNFNt4Dx32CCnl2tlz';
$orderid='res-purch-'.date("dmy-G:i:s");
$crypt_type='1';
 
$expdate='1911'; //for temp token
/************************ Transaction Array **********************************/
 
$txnArray=array('type'=>'res_card_verification_cc',
                                                                                'data_key'=>$data_key,
                                                'order_id'=>$orderid,
                                                                                'crypt_type'=>$crypt_type,
                                                'expdate'=>$expdate
                                                );
 
/************************** CVD Variables *****************************/
 
$cvd_indicator = '1';
$cvd_value = '198';
 
/********************** CVD Associative Array *************************/
 
$cvdTemplate = array(
                                        'cvd_indicator' => $cvd_indicator,
                                        'cvd_value' => $cvd_value
);
 
$mpgCvdInfo = new mpgCvdInfo ($cvdTemplate);
 
/************************** AVS Variables *****************************/
 
//The AVS portion is optional if AVS details are already stored in this profile
//If AVS details are resent in Purchase transaction, they will replace stored details
 
$avs_street_number = '';
$avs_street_name = 'bloor st';
$avs_zipcode = '111111';
 
/********************** AVS Associative Array *************************/
 
$avsTemplate = array(
                                        'avs_street_number' => $avs_street_number,
                                        'avs_street_name' => $avs_street_name,
                                        'avs_zipcode' => $avs_zipcode
);
 
$mpgAvsInfo = new mpgAvsInfo ($avsTemplate);
 
/************************ Transaction Object *******************************/
 
$mpgTxn = new mpgTransaction($txnArray);
$mpgTxn->setCvdInfo($mpgCvdInfo);
$mpgTxn->setAvsInfo($mpgAvsInfo);
 
/******************* Credential on File **********************************/
 
$cof = new CofInfo();
$cof->setPaymentIndicator("U");
$cof->setPaymentInformation("2");
$cof->setIssuerId("168451306048014");
 
$mpgTxn->setCofInfo($cof);
 
/************************ Request Object **********************************/
 
$mpgRequest = new mpgRequest($mpgTxn);
$mpgRequest->setProcCountryCode("CA"); //"US" for sending transaction to US environment
$mpgRequest->setTestMode(true); //false or comment out this line for production transactions
 
/************************ mpgHttpsPost Object ******************************/
 
$mpgHttpPost  =new mpgHttpsPost($store_id,$api_token,$mpgRequest);
 
/************************ Response Object **********************************/
 
$mpgResponse=$mpgHttpPost->getMpgResponse();
 
 
print("\nDataKey = " . $mpgResponse->getDataKey());
print("\nReceiptId = " . $mpgResponse->getReceiptId());
print("\nReferenceNum = " . $mpgResponse->getReferenceNum());
print("\nResponseCode = " . $mpgResponse->getResponseCode());
print("\nISO = " . $mpgResponse->getISO());
print("\nAuthCode = " . $mpgResponse->getAuthCode());
print("\nMessage = " . $mpgResponse->getMessage());
print("\nTransDate = " . $mpgResponse->getTransDate());
print("\nTransTime = " . $mpgResponse->getTransTime());
print("\nTransType = " . $mpgResponse->getTransType());
print("\nComplete = " . $mpgResponse->getComplete());
print("\nTransAmount = " . $mpgResponse->getTransAmount());
print("\nCardType = " . $mpgResponse->getCardType());
print("\nTxnNumber = " . $mpgResponse->getTxnNumber());
print("\nTimedOut = " . $mpgResponse->getTimedOut());
print("\nCVDResponse = " . $mpgResponse->getCvdResultCode());
print("\nAVSResponse = " . $mpgResponse->getAvsResultCode());
print("\nResSuccess = " . $mpgResponse->getResSuccess());
print("\nPaymentType = " . $mpgResponse->getPaymentType());
print("\nIssuerId = " . $mpgResponse->getIssuerId());
 
//----------------- ResolveData ------------------------------
 
print("\n\nCust ID = " . $mpgResponse->getResDataCustId());
print("\nPhone = " . $mpgResponse->getResDataPhone());
print("\nEmail = " . $mpgResponse->getResDataEmail());
print("\nNote = " . $mpgResponse->getResDataNote());
print("\nMasked Pan = " . $mpgResponse->getResDataMaskedPan());
print("\nExp Date = " . $mpgResponse->getResDataExpDate());
print("\nCrypt Type = " . $mpgResponse->getResDataCryptType());
print("\nAvs Street Number = " . $mpgResponse->getResDataAvsStreetNumber());
print("\nAvs Street Name = " . $mpgResponse->getResDataAvsStreetName());
print("\nAvs Zipcode = " . $mpgResponse->getResDataAvsZipcode());
 
?>

                

Transaction Values

$txnArray=array('type'=>'res_card_verification_cc',... );

$mpgTxn = new mpgTransaction($txnArray);

$mpgRequest = new mpgRequest($mpgTxn);

Card Verification with Vault transaction object mandatory values

Value Type Limits Set method Description
Order ID String 50-character alphanumeric 'order_id' Merchant-defined transaction identifier that must be unique for every transaction. No two transactions may have the same order ID
Data Key String 25-character alphanumeric 'data_key'

The data key is the token that points to a previously stored profile. Profile identifier that all future financial Vault transactions (that is, they occur after the profile was registered by a Vault Add Credit Card or Vault Tokenize Credit Card transaction, for example) will use to associate with the saved information.


The data key is generated by Moneris, and is returned to the merchant (via the Receipt object) when the profile is first registered.
E-commerce indicator
String 1-character alphanumeric
'crypt_type'

Describes the category of e-commerce transaction being processed. Allowable values are:


  • 1 - Mail Order / Telephone Order—Single
  • 2 - Mail Order / Telephone Order—Recurring
  • 3 - Mail Order / Telephone Order—Instalment
  • 4 - Mail Order / Telephone Order—Unknown classification
  • 5 - Authenticated e-commerce transaction (VBV)
  • 6 - Non-authenticated e-commerce transaction (VBV)
  • 7 - SSL-enabled merchant

In Credential on File transactions where the request field e-commerce indicator is also being sent: the allowable values for e-commerce indicator are dependent on the value sent for payment indicator, as follows:


if payment indicator = R, then allowable values for e-commerce indicator: 2, 5 or 6
if payment indicator = C, then allowable values for e-commerce indicator: 1, 5, 6 or 7
if payment indicator = U, then allowable values for e-commerce indicator: 1 or 7
if payment indicator = Z, then allowable values for e-commerce indicator: 1, 5, 6 or 7

Card Verification with Vault transaction object conditional values

Value Type Limits Set method Description
 Expiry Date String 4-character alphanumeric (YYMM format) 'expdate' The optional Expiry Date applies to Hosted Tokenization transactions. If the expiry date was not collected by the Hosted Tokenization solution, then it must be set in the Vault transaction request – it is then a mandatory field.
AVS Object Not applicable. $mpgAvsInfo = new mpgAvsInfo ($avsTemplate);
$mpgTxn->setAvsInfo($mpgAvsInfo);

Note: It is optional for Canada.

If the Vault profile already has AVS details stored on file, then AVS is optional and the AVS data stored in the profile will be used for the validation.
CVD Object Not applicable. $mpgCvdInfo = new mpgCvdInfo ($cvdTemplate);
$mpgTxn->setCvdInfo($mpgCvdInfo);

Note: It is optional for Canada.

If the temporary token generated using Hosted Tokenization already has the CVD details, then CVD is optional and the CVD value collected in by Hosted Tokenization will be used for the validation.

COF Info Object $mpgTxn->setCofInfo($cof); Refer to Card Verification with Credential on File
CvdInfo object mandatory values
Value Type Limits Set method Description
CVD indicator String 1-character numeric 'cvd_indicator' CVD presence indicator:
0: CVD value is deliberately bypassed or is not provided by the merchant.
1: CVD value is present.
2: CVD value is on the card, but is illegible.
9: Cardholder states that the card has no CVD imprint.
CVD Value String 4-character numeric 'cvd_value' CVD value located on credit card. The CVD value (supplied by the cardholder) must only be passed to the payment gateway. Under no circumstances may it be stored for subsequent use or displayed as part of the receipt information.

AvsInfo object mandatory values
Value Type Limits Set method Description
AVS street number String 19-character alphanumeric1 'avs_street_number' Cardholder street number.
AVS street name String See AVS street number 'avs_street_name' Cardholder street name.
AVS zip/postal code String 9-character alphanumeric 'avs_zipcode' . Cardholder zip/postal code

Vault Response Fields

Value Limits Get Method Description
Data Key 25-character alphanumeric $mpgResponse->getDataKey(); This field is created when a profile is created and a token is returned.
It is a unique profile identifier, and is a required value for all future Vault transactions.
Vault Success true/false $mpgResponse->getResSuccess(); Indicates whether Vault transaction was successful.
Payment Type cc $mpgResponse->getPaymentType(); Indicates the payment type associated with a Vault profile.
Customer ID 30-character alphanumeric $mpgResponse->getResDataCustId(); Returns the customer ID saved in the profile.
Phone Number 30-character alphanumeric $mpgResponse->getResDataPhone(); Returns the phone number saved in the profile.
Email Address 30-character alphanumeric $mpgResponse->getResDataEmail(); Returns the email address saved in the profile.
Note 30-character alphanumeric $mpgResponse->getResDataNote(); Returns the note saved in the profile.
Credit Card Fields
Masked PAN 20-character numeric $mpgResponse->getResDataMaskedPan(); Returns the first 4 last 4 of the card number saved in the profile.
Expiry Date 4-character numeric $mpgResponse->getResDataExpDate(); Returns the expiry date of the card number saved in the profile. YYMM format.
E-Commerce Indicator 1-character numeric $mpgResponse->getResDataCryptType(); Returns the e-commerce indicator saved in the profile.
AVS Street Number 19-character alphanumeric $mpgResponse->getResDataAvsStreetNumber(); Returns the AVS street number saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.
AVS Street Name 19-character alphanumeric $mpgResponse->getResDataAvsStreetName(); Returns the AVS street name saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.
AVS Zip/Postal Code 9-character alphanumeric $mpgResponse->getResDataAvsZipcode(); Returns the AVS zip/postal code saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.