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
10360 158 2003

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

I jump on these forums to help and share some insights. Not looking to be hired, and not looking for work.

Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.


★ 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 4

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 4

Thank you 

Do your still work?

Best Rgrds

0 Likes