The logic is explicitly checking that the GroupSize is 2, however after you deploy the smart contract you seem to be submitting a single transaction rather than a group of 2, so it’s failing.
You’d need to send a group transaction where the first transaction is the application call and the second transaction is a payment.
If you’re using goal you can do something like this:
goal app call --app-id $APPID -f $ADDR -o 0_appl.txn
goal clerk send -a 1000000 -f $ADDR -t $ADDR -o 1_pay.txn
cat 0_appl.txn 1_pay.txn > group.ctxn
goal clerk group -i group.ctxn -o group.gtxn
goal clerk sign -i group.gtxn -o group.stxn
goal clerk rawsend -f group.stxn
Edit:
You probably want to put an assert or a return after the last && also.