SimulatedPayment
object SimulatedPayment
Stands in for a real SDK round-trip when a gateway has no live sandbox credentials (GatewayStatus.MOCK_MODE). A short suspend delay mimics the SDK hop; the outcome is scripted (not random) so the Lab timeline is deterministic and every mock-mode gateway can be demoed end-to-end with zero credentials.
Lives in core:payments-api rather than core:common (its natural home per the plan) because it builds PaymentResult/RedactedPayload values, and core:common cannot depend back on core:payments-api without a module cycle — payments-api already depends on common.
Functions
Link copied to clipboard
suspend fun run(gatewayId: GatewayId, prepared: PreparedPayment, outcome: SimulatedOutcome = SimulatedOutcome.SUCCESS, delayMs: Long = 900): PaymentResult