Eselectplus PHP Ig-Mpi
Eselectplus PHP Ig-Mpi
Table of Contents
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
Page 2 of 15
Page 3 of 15
2. Verified by Visa
Verified by Visa (VbV) is a program initiated by Visa. Before approving a transaction eSELECTplus and the Bank that
issues the Visa credit cards will attempt to authenticate the cardholder through the use of a password, similar to a debit
PIN. When an authentication is attempted the merchant is protected from chargebacks.
3. MasterCard SecureCode
MasterCard SecureCode (MCSC) is a new feature offered by MasterCard. Merchants who have enrolled in this program
with Moneris and eSELECTplus will be able to offer their customers added protection against unauthorized credit card
use, as well as protect themselves from fraud-related chargebacks. Cardholders that have applied for SecureCode with
their issuing bank will be able to use this password similar to a debit PIN number for online transactions with participating
online merchants.
Page 4 of 15
5. Transaction Flow
Below is a diagram with explanations about the flow of a VBV/MCSC transaction.
1. Cardholder enters their credit card number and submits their transaction information to the
merchant.
2. Upon receiving the transaction request the merchant calls the Moneris MPI API and passes a
TXN type request.
3. The Moneris MPI receives the request and authenticates the merchant and sends the
transaction information to Visa/MasterCard.
4. Visa/MasterCard verifies if the card is enrolled and returns a URL for the issuer.
5. Moneris MPI receives the response from Visa or /MasterCard and forwards the information to
the merchant.
6. The Moneris MPI API installed at the merchant receives the response from the Moneris MPI. If
the card is enrolled the response (getMpiMessage()) would be Y and the merchant makes a
call to the API, which opens a popup/inline window in the Cardholder browser. If the response
was an N for not enrolled a transaction could be sent to the processor identifying it as
VBV/MCSC attempted with ECI value of 6. If the response was U (Unable to Authenticate) or
the response times out, the transaction can be sent to the processor with ECI value of 7;
however, the merchant in this case would be liable to a chargeback. Otherwise merchant can
chose not to continue with the transaction.
Page 5 of 15
7. The cardholder browser uses the URL returned from Visa/MasterCard via the merchant to
communicate directly to the bank. The contents of the popup are loaded and the cardholder
enters their pin.
8. The information is submitted to the bank and authenticated. A response is then returned to the
client browser.
9. The client browser receives the response from the bank and forwards it to the merchant.
10. The merchant receives the response information from the cardholder browser and makes a
call to the Moneris MPI API and passes an ACS request type.
11. Moneris MPI receives the ACS request and authenticates the information. The Moneris MPI
then provides a CAVV value (getMpiCavv()) to the merchant. If the getMpiSuccess() of the
response is true, the merchant may proceed with the cavv purchase or cavv preauth. If the
response is false and the getMpiMessage() is N, the transaction must be cancelled as
cardholder failed to authenticate. If the response is false and the getMpiMessage is U or
the response times out, the transaction can be processed as a normal purchase or PreAuth;
however in this case the merchant assumes liability to a chargeback.
12. The merchant retrieves the CAVV value and formats a cavv purchase or a cavv preauth
request using the method that is normally used. As part of this transaction method the
merchant must pass the CAVV value.
Page 6 of 15
= new MpiHttpsPost($storeid,$apitoken,$mpiRequest);
B. The TXN Response & Creating the Popup (Step 6 of Transaction Flow)
The txn request will return a response with several values. The getMpiMessage will contain
Y, U, N. If the message is N the purchase or preauth can be sent as a crypt type 6
attempted authentication. If the message is Y then a call to the API to create the VBV form is
made. Finally, if the message is U the merchant can send the transaction with crypt_type 7;
however, the merchant would be liable for chargebacks. U is returned for non-participating
cards, such as corporate cards.
$mpiResponse = $mpiHttpPost->getMpiResponse();
if($mpiResponse->getMpiMessage() == 'Y')
{
$vbvInLineForm = $mpiResponse->getMpiInLineForm();
print "$vbvInLineForm\n";
}
elseif ($mpiResponse->getMpiMessage() == 'N')
{
//Send transaction using the mpg API in this case merchant
//Use $crypt_type='6';
}
else //corporate cards, unable to authenticate or times out (e.g. MPI is down)
{
//optional to send transaction using the mpg API in this case merchant assumes
//liability, use $crypt_type='7';
}
Page 7 of 15
= new MpiHttpsPost($storeid,$apitoken,$mpiRequest);
= new mpgHttpsPost($storeid,$apiToken,$mpgRequest);
$mpgResponse =$mpgHttpPost->getMpgResponse();
}
Page 8 of 15
Page 9 of 15
Visa Definition
- Fully authenticated
- There is a liability shift and the
merchant is protected from chargebacks
MasterCard Definition
- Fully authenticated
- There is a liability shift and the merchant is
protected from chargebacks.
- Non-VbV transaction
- Merchant is no longer protected from
chargebacks
- Non-MCSC transaction
- No liability shift
- Merchant is not protected from chargebacks
VERes Response
N
Response Definition
The card/issuer is not enrolled. This should be sent as a normal Purchase/PreAuth
transaction with a crypt type of 6.
The card type is not participating in VbV or MCSC: this could be corporate or other card
plans that Visa or MasterCard excludes. Can proceed with a regular transaction with a
crypt type of 7 or cancel the transaction.
The card is enrolled. Proceed to create the VbV/MCSC inline window for cardholder
authentication. Proceed to PARes for crypt type.
PARes Response
A
Response Definition
Attempted to verify PIN and will receive a CAVV. This should now be sent as a
cavv_purchase/cavv_preAuth which will return a crypt type of 6.
Fully authenticated and will receive a CAVV. This should now be sent as a
cavv_purchase/cavv_preAuth which will return a crypt type of 5.
Step 1: VERes
Is the cardholder/issuer
enrolled?
Step 2: PARes
VbV/MCSC InLine window
response
Step 3: Transaction
Are you protected?
n/a
n/a
VERes
PARes
Action
4012001037141112
true
4012001038488884
N/A
4012001038443335
N/A
4242424242424242
true
4012001037461114
false
NOTE
For a sample of a purchase, preauth, cavv_purchase and cavv_preauth transaction, please refer to
the complete PHP API Integration Guide found at: https://www.eselectplus.ca/en/downloadable-content
Page 11 of 15
To access the Merchant Resource Centre in the test environment go to https://esqa.moneris.com/mpg. And use the
logins provided in the previous table.
The test environment has been designed to replicate our production environment as closely as possible. One major
difference is that we are unable to send test transactions onto the production authorization network and thus Issuer
responses are simulated. Additionally, the requirement to emulate approval, decline and error situations dictates that we
use certain transaction variables to initiate various response and error situations.
The test environment will approve and decline transactions based on the penny value of the amount field.
For example, a transaction made for the amount of $9.00 or $1.00 will approve since the .00 penny value is set to approve
in the test environment. Transactions in the test environment should not exceed $1000.00. This limit does not exist in the
production environment. For a list of all current test environment responses for various penny values, please see the Test
Environment Penny Response table as well as the Test Environment eFraud Response table, available at
https://www.eselectplus.ca/en/downloadable-content
NOTE
These responses may change without notice. Moneris Solutions recommends you regularly refer to our
website to check for possible changes.
Page 12 of 15
DEVELOPMENT
var $Globals=array(
MONERIS_PROTOCOL => 'https',
MONERIS_HOST => www3.moneris.com,
MONERIS_PORT =>'443',
MONERIS_FILE => /gateway2/servlet/MpgRequest',
API_VERSION =>'MPG Version 2.01',
CLIENT_TIMEOUT => '60'
);
var $Globals=array(
MONERIS_PROTOCOL => 'https',
MONERIS_HOST => esqa.moneris.com,
MONERIS_PORT =>'443',
MONERIS_FILE => /gateway2/servlet/MpgRequest',
API_VERSION =>'MPG Version 2.01',
CLIENT_TIMEOUT => '60'
);
Once you are in production, you will access the Merchant Resource Centre at https://www3.moneris.com/mpg. You can
use the store administrator ID you created during the activation process and then create additional users as needed.
For further information on how to use the Merchant Resource Centre please see the eSELECTplus Merchant Resource
Centre Users Guide which is available for download at http://www.eselectplus.ca/en/downloadable-content.
10.
If you require technical assistance while integrating your store, please contact the eSELECTplus Support Team:
For technical support:
Phone: 1-866-319-7450 (Technical Difficulties)
For integration support:
Phone: 1-866-562-4354
Email: [email protected]
When sending an email support request please be sure to include your name and phone number, a clear description of
the problem as well as the type of API that you are using. For security reasons, please do not send us your API
Token combined with your store ID, or your merchant number and device number in the same email.
Page 13 of 15
11.
Variable
Name
Size/Type Description
store_id
12 / an
api_token
20 / an
A unique key that when matched with your store_id creates a secure method of authenticating your
store_id
xid
20 / an
Must be 20 alpha numeric characters. This must be unique for every transaction attempt this can
also be used as your order_id when using eSELECTplus
amount
9/
decimal
Amount of the transaction. This must contain at least 3 digits including two penny values. The minimum
value passed can be 0.01 and the maximum 9999999.99
pan
20 / num
Credit Card Number - no spaces or dashes. Most credit card numbers today are 16 digits in length but
some 13 digits are still accepted by some issuers. This field has been intentionally expanded to 20
digits in consideration for future expansion and/or potential support of private label card ranges.
expdate
4 / num
MD
1024 / an
This is information that you would like echoed back in the response
merchantUrl
This is the URL to which you would like the MPI response sent to.
accept
userAgent
PaRes
This is a value that is passed back to the API during the TXN and returned to the MPI when an ACS
request is made.
Page 14 of 15
12.
Variable Name
Size/Type
Description
Type
99 / an
VERes or PARes or error defines what type of response you are receiving
success
true/false
message
alpha
Will contain:
Txn
Action
Y
ACS
Action
Y or A
(getMpiSuccess()=true)
N
U or time out
PARes
n/a
Variable Length data that Visa/MasterCard passes and needs for authentication
TermUrl
255 / an
MD
1024 / an
ACSUrl
255 / an
cavv
28 /an
Page 15 of 15