Once you have set up your account with the payment website provider and built your integration, you should test your integration using your test merchant profile (your merchant ID starting with 'TEST'). The MasterCard Payment Gateway provides a simulator to simulate the payment provider's website.
You can use the order.reference
field when making an Initiate Browser Payment request to trigger different values for response.gatewayCode
.
transaction.reference
field.Sending '.FAIL<code>' in order.reference
returns:
response.gatewayCode
=<code> if <code> is a valid value for response.gatewayCode
.response.gatewayCode=UNKNOWN
if <code> is not a valid value for response.gatewayCode
.You can use the following values (WITHOUT the '.FAIL' prefix) in the order.reference
field when making an Initiate Browser Payment request to trigger different values for response.gatewayCode
.
order.reference | response.gatewayCode | Behavior |
---|---|---|
TEST-SUCCEED | APPROVED | The transaction will succeed immediately. |
TEST-FAIL-NOTFOUND | DECLINED | The transaction will be declined immediately. |
TEST-FAIL-DECLINE | DECLINED | The transaction will be declined immediately. |
TEST-PENDING | SUBMITTED | The transaction will remain pending indefinitely. |
TEST-FAIL-THEN-SUCCESS | SUBMITTED then DECLINED then APPROVED |
After 30s the simulator will send a notification and fail the transaction. 60s later the simulator will send another notification and the transaction will succeed. |
TEST-FAIL-INIT | SUBMITTED then DECLINED |
After 30s the simulator will send a notification and fail the transaction. |
TEST-SUCCESS-INIT | SUBMITTED then APPROVED |
After 30s the simulator will send a notification and the transaction will succeed. |
TEST-TIMEOUT-THEN-SUCCESS | SUBMITTED then ACQUIRER_SYSTEM_ERROR then APPROVED |
After 30s the simulator will send a notification and mark the transaction as timeout. 60s later the simulator will send a notification and the transaction will succeed. |
TEST-QUICK-TIMEOUT-THEN-SUCCESS | SUBMITTED then ACQUIRER_SYSTEM_ERROR then APPROVED |
After 5s the simulator will send a notification and mark the transaction as timeout. 5s later the simulator will send a notification and the transaction will succeed. |
TEST-FAIL-TIMEOUT | SUBMITTED then ACQUIRER_SYSTEM_ERROR |
After 30s the simulator will send a notification and mark the transaction as timeout. |
TEST-TIMEOUT | TIMED_OUT | The simulator mimics a timeout scenario. The transaction fails after a delay of 31 seconds. |
TEST-NO-RESPONSE | UNSPECIFIED_FAILURE | The simulator mimics a scenario where the transaction could not be processed. |
The browser payment simulator:
SUCCESS
PENDING
CANCEL
UNKNOWN
ERROR
TIMED_OUT
order.reference
or transaction.reference
field when making an Initiate Browser Payment request to trigger
different values for response.gatewayCode
.
Order.Reference or transaction.reference | response.gatewayCode | Order Status | Behavior |
---|---|---|---|
PP.400.BADREQUEST | DECLINED | FAILED | The transaction will be declined immediately. |
PP.PENDING.AUTHORIZATION | APPROVED | CAPTURED | The transaction will succeed immediately. |
PP.PENDING.NONE | PENDING | CAPTURED | The transaction will remain pending indefinitely. |
PPP.400.CAPTURE_AMOUNT_LIMIT_EXCEEDED | DECLINED | FAILED | The transaction will be declined immediately. |
PP.400.TIMEOUT | DECLINED | FAILED | The simulator mimics a timeout scenario. The transaction fails immediately. |
PP.400.INVALID_REQUEST | DECLINED | FAILED | The transaction will be declined immediately. |
PP.400.INSUFFICIENT_FUNDS | INSUFFICIENT_FUNDS | FAILED | The simulator mimics an insufficient fund scenario. The transaction fails immediately. |
PP.400.ORDER_VOIDED | DECLINED | FAILED | The transaction will be declined immediately. |
Test Card Number | Transaction Response Gateway Code |
---|---|
2223000000000007 |
APPROVED |
4005550000000019 |
ACQUIRER_SYSTEM_ERROR |
4508750015741019 |
UNKNOWN |
6011000991300009 |
NOT_SUPPORTED |
5149612222222229 |
DECLINED |
4012000033330026 |
TIMED_OUT |
SUCCESS
DECLINE
BAD_REDIRECT_CHECKSUM
(not recommended for testing)If you have configured Transaction Filtering rules for IP Address Range, you can simulate a reject of a prohibited IP address by setting up the following:
order.reference
field when submitting an Initiate Browser Payment
request.
TEST_IP_ADDRESS<nnn.nnn.nnn.nnn>
'.
.TEST_IP_ADDRESS<nnn.nnn.nnn.nnn>
'.If the IP address causes the transaction to be rejected, the risk.response.gatewayCode
will be returned as 'REJECTED' in the Retrieve Transaction operation.
There are no specific tests provided for simulating a reject of black-listed countries in the IP Country Transaction Filtering rules; however, you may simulate this scenario by adding all countries to the reject list.
Copyright © 2023 MasterCard