Skip to content

Commit d895791

Browse files
committed
fix: hide google pay options when not active
1 parent eba62b3 commit d895791

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

etc/adminhtml/system/transaction/googlepay.xml

+15
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,40 @@
1010
<field id="title" type="text" sortOrder="20" showInWebsite="1" showInStore="1" showInDefault="1" translate="label">
1111
<label>Payment label</label>
1212
<config_path>payment/pagarme_googlepay/title</config_path>
13+
<depends>
14+
<field id="active">1</field>
15+
</depends>
1316
</field>
1417
<field id="pagarme_account_id" type="text" sortOrder="30" showInWebsite="1" showInStore="1" showInDefault="1" translate="label, comment">
1518
<label>Pagar.me account ID</label>
1619
<comment><![CDATA[Consult the <a target='_blank' href='https://id.pagar.me/signin'>Dashboard</a> at: <i>Settings > Keys > Account ID</i>]]></comment>
1720
<config_path>pagarme_pagarme/hub/account_id</config_path>
21+
<depends>
22+
<field id="active">1</field>
23+
</depends>
1824
</field>
1925
<field id="merchant_id" type="text" sortOrder="40" showInWebsite="1" showInStore="1" showInDefault="1" translate="label, comment">
2026
<label>MerchantId Google Pay</label>
2127
<comment><![CDATA[Google Pay identifier required to create successful orders. Find out how to request <a target='_blank' href='https://pay.google.com/business/console/?hl=pt-br'>here</a>.]]></comment>
2228
<config_path>payment/pagarme_googlepay/merchant_id</config_path>
29+
<depends>
30+
<field id="active">1</field>
31+
</depends>
2332
</field>
2433
<field id="merchant_name" type="text" sortOrder="50" showInWebsite="1" showInStore="1" showInDefault="1" translate="label, tooltip">
2534
<label>Store name on Google Pay</label>
2635
<config_path>payment/pagarme_googlepay/merchant_name</config_path>
2736
<tooltip>Name of your store that will be displayed to the customer while purchasing through Google Pay.</tooltip>
37+
<depends>
38+
<field id="active">1</field>
39+
</depends>
2840
</field>
2941
<field id="sort_order" type="text" sortOrder="60" showInWebsite="1" showInStore="1" showInDefault="1" translate="label">
3042
<label>Payment method order</label>
3143
<config_path>payment/pagarme_googlepay/sort_order</config_path>
44+
<depends>
45+
<field id="active">1</field>
46+
</depends>
3247
</field>
3348
</group>
3449
</include>

i18n/pt_BR.csv

+1-1
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@
610610
"Something went wrong, please try again later.","Algo deu errado, por favor tente novamente mais tarde."
611611
"Pagar.me account ID", "ID da conta Pagar.me"
612612
"Consult the <a target='_blank' href='https://id.pagar.me/signin'>Dashboard</a> at: <i>Settings > Keys > Account ID</i>", "Consulte na <a target='_blank' href='https://id.pagar.me/signin'>Dashboard</a> em: <i>Configurações > Chaves > ID da Conta</i>"
613-
"Google Pay identifier required to create successful orders, find out how to request <a target='_blank' href='https://pay.google.com/business/console/?hl=pt-br'>here</a>.", "Identificador do Google Pay necessário para criação de pedidos com sucesso, saiba como solicitar <a target='_blank' href='https://pay.google.com/business/console/?hl=pt-br'>aqui</a>."
613+
"Google Pay identifier required to create successful orders. Find out how to request <a target='_blank' href='https://pay.google.com/business/console/?hl=pt-br'>here</a>.", "Identificador do Google Pay necessário para criação de pedidos com sucesso. Saiba como solicitar <a target='_blank' href='https://pay.google.com/business/console/?hl=pt-br'>aqui</a>."
614614
"MerchantId Google Pay", "MerchantId Google Pay"
615615
"Store name on Google Pay", "Nome da loja no Google Pay"
616616
"Name of your store that will be displayed to the customer while purchasing through Google Pay.", "Nome da sua loja que será exibida ao cliente durante a compra pelo Google Pay."

0 commit comments

Comments
 (0)