Mock Processor
To simplify and accelerate your integration with our payment flows, you can utilize PPRO's mock processor. The mock processor enables you to simulate the different authentication types, test different authorization outcomes and behaviours.
The mock processor is accessible in the sandbox environment and can be activated by setting the paymentMethod
to MOCK
. To simulate various scenarios, we use a combination of the amount
and paymentDescriptor
fields. By providing different key combinations, you can simulate a wide range of possible scenarios.
Authorization Failures
It is possible to simulate specific authorization failures using the amount field. Failures always occur for amounts between 300000 (€3,000) and 400000 (€4,000), and specific errors can be triggered based on the subunit amount.
Authorization Error | Subunit Amount |
---|---|
failureCode: GENERIC_DECLINE failureMessage: Payment Authorization Failed | 01 Example: 300001 |
failureCode: INSUFFICIENT_FUNDS failureMessage: Payment Authorization Failed, insufficient funds | 02 Example: 300002 |
Payment Transitions
It is possible to simulate different payment transitions, which are used to apply various states to a payment during processing.
paymentDescriptor Key | Description | Values |
---|---|---|
requiresAuthentication | Payment requires authentication. Triggers the AUTHENTICATION_PENDING status. | true false |
authenticationType | Specify the available authentication methods. More info. Depends on requiresAuthentication | REDIRECT SCAN_CODE MULTI_FACTOR Default: REDIRECT . |
providerConfirmation | Payment requires provider confirmation. Triggers the AUTHORIZATION_ASYNC status. | true false |
providerConfirmationDelay | Specify the delay in seconds for provider confirmation. Depends on providerConfirmation | nns Default: 10s |
requiresCapture | Payment requires capture. Triggers the CAPTURE_PENDING status. | true false |
Example
{
"paymentDescriptor":"requiresAuthentication=true;requiresCapture=false;authenticationType=SCAN_CODE,MULTI_FACTOR",
Error Simulation
Error simulations are used to trigger errors on the different operations.
paymentDescriptor Key | Description | Values |
---|---|---|
errorOn | Specify the operation for the error to occur. | AUTHORIZE AUTHENTICATE PROVIDER_CONFIRM CAPTURE VOID REFUND |
errorMessage | Specify the free text error message. | Default: Failed to process payment |
Example
{
"paymentDescriptor":"requiresCapture=true;errorOn=AUTHORIZE;errorMessage=Hello World",
Updated about 5 hours ago