Form for entering the password
- Input mask for the test mode password
- Activating debug mode
- Deactivating test mode
{{ if not $wsTestMode.active }}
{{ var $cActionTestModeOn = $wsActions.create("TestModeOn") }}
{{ if $cActionTestModeOn.error }}
Errors occurred:
{{ foreach $error in $cActionTestModeOn.errors }}
{{ if $error.text }}
{{= $error.text }}
{{ else }}
{{= $error.code }}
{{ /if }}
{{ /foreach }}
{{ /if }}
<form action="{{= $wsViews.current.url() }}" method="post">
<input type="hidden" name="wscsrf" value="{{= $cActionTestModeOn.csrf }}">
<input type="hidden" name="wsact" value="{{= $cActionTestModeOn.id }}">
<input type="hidden" name="wstarget" value="/">
<input type="password" name="password" placeholder="Password">
<label for="password">Password</label>
<input type="checkbox" name="debug" value="on" {{ if $wsTestMode.debug }} checked{{ /if }}>
<label class="form-check-label wsCursorPointer">Debug</label>
<button name="wsact" value="{{= $cActionTestModeOn.id }}">Activate test mode</button>
</form>
{{ else}}
{{ var $cActionTestModeOff = $wsActions.create("TestModeOff") }}
{{ if $cActionTestModeOff.error }}
Errors occurred:
{{ foreach $error in $cActionTestModeOff.errors }}
{{ if $error.text }}
{{= $error.text }}
{{ else }}
{{= $error.code }}
{{ /if }}
{{ /foreach }}
{{ /if }}
<form action="{{= $wsViews.current.url() }}" method="post">
<input type="hidden" name="wscsrf" value="{{= $cActionTestModeOff.csrf }}">
<input type="hidden" name="wsact" value="{{= $cActionTestModeOff.id }}">
<input type="hidden" name="wstarget" value="/">
<button name="wsact" value="{{= $cActionTestModeOff.id }}">Deactivate test mode</button>
</form>
{{ /if }}
Change test mode
While test mode is active, debugging and the simulation of failed payments can be switched on or off without having to end test mode.The
TestModeChange action resets all switches. A switch that is missing from the form or not checked is deactivated. Therefore, make sure that all switches are included in the form.{{ if not $wsTestMode.active }}
...
{{ else}}
...
{{ var $cActionTestModeChange = $wsActions.create("TestModeChange") }}
{{ if $cActionTestModeChange.error }}
Errors occurred:
{{ foreach $error in $cActionTestModeChange.errors }}
{{ if $error.text }}
{{= $error.text }}
{{ else }}
{{= $error.code }}
{{ /if }}
{{ /foreach }}
{{ /if }}
<form action="{{= $wsViews.current.url() }}" method="post">
<input type="hidden" name="wscsrf" value="{{= $cActionTestModeChange.csrf }}">
<input type="hidden" name="wsact" value="{{= $cActionTestModeChange.id }}">
<input type="hidden" name="wstarget" value="/">
<input type="checkbox" name="debug" value="on" {{ if $wsTestMode.debug }} checked{{ /if }}>
<label>Debug</label>
<input type="checkbox" name="makePaymentFail" value="on" {{ if $wsTestMode.makePaymentFail }} checked{{ /if }}>
<label>Simulate payment failure</label>
<button name="wsact" value="{{= $cActionTestModeChange.id }}">Apply settings</button>
</form>
{{ /if }}
