what is the liquid code to detect manual payment method?

ave
Tourist
16 0 6

I am trying to redirect user after specific manual payment has been used.

 

for example, my manual payment method is titled "ATM"

 

<script>
{% if checkout.transactions.gateway == 'ATM' %}
window.location.replace("https://site.com");
{% endif %}
</script>

 

but the above is not working, so i was wondering if anyone know what is the liquid code to detect manual payment method?

0 Likes
Jason
Shopify Expert
10035 119 1871

checkout.transactions is an array so you'd need to look at each transaction to find a match.

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes
ave
Tourist
16 0 6

i have tried a couple ways, but it is still not working

 

say my manual/custom transaction is name "ATM"

 

my codes are as follows:

 

<script>
{% if checkout.transactions == 'ATM %}
window.location.replace("https://site.com");
{% endif %}
</script>

 

<script>
{% if checkout.transactions.gateway == 'ATM %}
window.location.replace("https://site.com");
{% endif %}
</script>

 

0 Likes
Nate_Rojwongsur
Tourist
3 0 1

Is this solved? I cannot find it either.

0 Likes
Chemuel
New Member
1 0 1

Try this.

<script>
{% if checkout.transactions[0].gateway == "ATM" %}
window.location.replace("https://site.com");
{% endif %}
</script>

Nate_Rojwongsur
Tourist
3 0 1

Thank you 

Do your still work?

Best Rgrds

0 Likes