
內容簡介
GunTab Payment Gateway 是專為槍械和彈藥電子商務打造的交易平台,提供安全便捷的線上支付服務,並保證不會發生退款問題。
【主要功能】
• 安全的槍械支付處理
• 退款保證
• WooCommerce 整合簡單
• 自訂發票數據
• 支援網路鉤子(Webhook)功能
外掛標籤
開發者團隊
原文外掛簡介
GunTab is the only transaction platform built for firearm and ammunition e-commerce. It enables you get paid safely and easily online. We even guarantee against chargebacks. Learn more at GunTab.com.
Activate the plugin in WordPress
Go to Plugins > Add New.
Search for “GunTab”.
Select “Install Now”.
After installation is complete, select “Activate”.
Enable the plugin in WooCommerce
Go to WooCommerce > Settings > Payments.
Select to enable “GunTab Payments”.
Select “Save changes”.
After the page reloads, select to “Manage” GunTab Payments. Now you may set your preferences.
Filters
Alter the invoice data before it gets sent to GunTab:
use GunTab\Api\GunTab\Abstracts\Invoice;
function guntabAlterInvoice(Invoice $invoice, \WC_Order $order) {
// Your code
return $invoice;
}
add_filter('guntab_alter_invoice', 'guntabAlterInvoice');
Alter the order status when the status must change due to a webhook request from GunTab:
function getNewOrderStatus(string $suggestedStatus, \stdClass $jsonDataFromGunTab) {
// Your code
return 'wc-complete'; // Choose a different WooCommerce order status based on $jsonDataFromGunTab->status
}
add_filter('guntab_get_new_order_status', 'getNewOrderStatus', 10, 2);
Actions
Called when GunTab sends a request to your webhook endpoint. It runs after the plugin processes the request:
function your_function_name(\WC_Order $order, \stdClass $postedJsonData) {
// Your code
}
add_action('guntab_on_webhook', 'your_function_name', 10, 2);
