<scenario begin="select_value"> 
	
    <screen type="Sum" sum="sum-trade"/>

    <screen type="selector/image" title="SELECTATI VALOAREA DORITA" id="select_value">
        <fields>
            <selector-field id="id2" title="Paysafecard value">
                <items type="static">
                    <item value="25" title="Suma de plata (in RON): 25" image="psc-25.png" sum="25"/>
                    <item value="50" title="Suma de plata (in RON): 50" image="psc-50.png" sum="50"/>
                    <item value="100" title="Suma de plata (in RON): 100" image="psc-100.png" sum="100"/>
                    <item value="300" title="Suma de plata (in RON): 300" image="psc-300.png" sum="300"/>
                </items>
            </selector-field>
        </fields>
        <actions>
            <action type="Next" title="INAINTE">
				<set key="id1" value="Paysafecard classic" key-title="PRODUS"/>
				<load from="point.id" key="id3"/>
                <goto target="confirm"/>
            </action>
            <action type="Prev" title="INAPOI">
                <goto target="previos"/>
            </action>
            <action type="Exit" title="MENIU">
                <goto target="exit"/>
            </action>
        </actions>
    </screen>
    
	
    <screen type="confirm/comunal" title="PIN-UL VA FI TIPARIT PE CHITANTA" id="confirm" sound="validate_phone.mp3" message="&lt;html&gt;&lt;b&gt;&lt;center&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Apasati INAINTE pentru a avansa.&lt;br&gt;Apasati INAPOI pentru a alege o alta valoare.">
	<fields list="id1,id2"/>
        <actions>
            <action type="Next" title="CONFIRMARE">
				<set key="sum" value="25"/>
                <online-request type="default" function="checkPaymentRequisites" params="id1,id2">
                    <actions>
                        <action type="success">
							<clear keys="sum"/>
                            <goto target="pay"/>
                        </action>
                        <action type="error">
                            <dialog type="Info" title="Error" message="PIN-uri indisponibile momentan" timeout="10" default="okay">
                                <actions>
                                    <action type="okay" title="OK">
										<clear keys="sum"/>
                                        <goto target="select_value"/>
                                    </action>                                            
                                </actions>
                            </dialog>                            
                        </action>
                        <action type="exception">
                            <dialog type="Info" title="Error" message="Nu exista conexiune cu serverul" timeout="10" default="okay">
                                <actions>
                                    <action type="okay" title="OK">
										<clear keys="sum"/>
                                        <cancel/>
                                    </action>                                            
                                </actions>
                            </dialog>
                        </action>
                    </actions>
                </online-request>          
            </action>
            <action type="Prev" title="INAPOI">
                <goto target="select_value"/>	                
            </action>
            <action type="Exit" title="MENIU">
                <goto target="exit"/>
            </action>
        </actions>
    </screen>
    
</scenario>