Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/gvntrck/infinitepay-woo/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
InfinitePay Gateway for WooCommerce — MVP scaffold
Fluxo redirect (Form-based) conforme https://www.infinitepay.io/checkout-documentacao.
Estrutura
infinitepay-woo.php
uninstall.php
includes/
class-plugin.php
class-wc-gateway-infinitepay.php
class-api-client.php
class-order-mapper.php
class-webhook-handler.php
class-return-handler.php
class-reconciler.php
class-blocks-support.php
assets/js/blocks/infinitepay-blocks.js (sem build — globals wc.wcBlocksRegistry)
assets/images/infinitepay-icon.svg
languages/
Configurar
WooCommerce > Configurações > Pagamentos > InfinitePayhandle= InfiniteTag sem$- Ativar + testar com pedido R$1
Endpoints gerados
- Webhook:
/?wc-api=wc_gateway_infinitepay_webhook - Retorno:
/?wc-api=wc_gateway_infinitepay_return&order_id=X&key=Y
Validar
php -l infinitepay-woo.php
phpcs --standard=WordPress includes/ infinitepay-woo.php
Notas de segurança
- Webhook sem HMAC na API atual → sempre revalidado via
POST /payment_check. - Valor do webhook comparado com total do pedido; divergência →
on-hold+ revisão manual. - Retorno valida
order_keycomhash_equals+payment_checkantes depayment_complete. - Sem tabela custom; metas HPOS-safe (
$order->update_meta_data+wc_get_ordersmeta lookup).