what is the liquid code to detect manual payment method?

Tourist
12 0 1

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
Highlighted
Shopify Expert
9965 84 1469

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
Tourist
12 0 1

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