Getnet DocsGetnet Docs

Use the Test Environment

The Get Mini framework provides specific environments for development, testing, and certification to ensure transactions are handled correctly before going live.

Requirements

Before you begin, ensure you have:

  • Credentials: Obtain test credentials (FUC and Terminal) specifically for the integration environment.
  • Hardware: Unlike simulators, the Get Mini SDK is designed for use with physical PIN pad hardware. Testing on a physical device is required for Bluetooth connectivity.
  • Other Linker Flags: Ensure your project includes -ObjC, -lstdc++, and -lsqlite3 in Build Settings.

Step 1: Configure Execution Environment

In the Get Mini framework, the environment is set globally using the CommonUtils class. You should call this method before any other SDK interaction (Login or PIN pad initialization).

EnvironmentIdentifierDescription
Development"des"Initial development testing.
Integration"int"Standard testing environment for most integrators.
Certification"ccal"Pre-production testing for final certification.
Production"real"Live environment (Default if not specified).

Implementation Example

import CommonUtils

// Set to the Integration (Test) environment
CommonUtils.setEntorno("int")

// Set your application license provided by Get Mini
CommonUtils.setAppLicense("YOUR_APP_LICENSE")

Step 2: Testing Logic (No Simulator Mode)

The Get Mini SDK does not provide a built-in “Simulator Reader”. If you are developing on the iOS Simulator, you will be unable to initialize Bluetooth hardware.

To test your application logic without a physical device:

  1. Mock the PIN pad Response: Create a wrapper around RedsysPinpadManager that returns dummy RespuestaTransaccionDTO objects when the app is running in the simulator.
  2. Web Service Testing: Operations like peticionConsultaFechaPagina or peticionDevolucion (which do not require a PIN pad) can be tested directly from the simulator if connected to the "int" or "des" environments.

Step 3: Test Transaction Scenarios

The test environments (“des”, “int”, “ccal”) route transactions to Get Mini test gateways. You can simulate various outcomes based on the test card used or specific amounts, depending on the test cases provided by Get Mini support.

Common result fields to verify:

FieldValueDescription
Estado“F”Finalized
Estado“G”Denied
Estado“T”Technical failure
Resultado“Autorizada”Authorized
Resultado“Denegada”Denied
CodigoRespuestae.g., 117Authorization or rejection codes (e.g., incorrect PIN)

Best Practices

  • Environment Guard: Use compiler flags (e.g., #if DEBUG) to ensure the "real" environment is never used during development.
  • Bundle Notification: Ensure you have communicated your app’s Bundle ID to Get Mini, or the SDK will fail to authorize even in test environments.
  • External Accessory Protocols: Ensure your Info.plist includes the protocols for your test hardware (e.g., com.datecs.pinpad or com.verifone.pmr.xpi).

Switching to Production

When moving to production:

  1. Change the environment string to "real".
  2. Update the setAppLicense with your production license.
  3. Replace test FUC and Terminal IDs with production credentials.
// Production configuration
CommonUtils.setEntorno("real")
CommonUtils.setAppLicense("PRODUCTION_LICENSE")

Next Steps