[WordPress] 外掛分享: GunTab Payment Gateway

首頁外掛目錄 › GunTab Payment Gateway
WordPress 外掛 GunTab Payment Gateway 的封面圖片
30+
安裝啟用
尚無評分
352 天前
最後更新
問題解決
WordPress 4.7+ PHP 7.2+ v0.3.3 上架:2021-04-20

內容簡介

GunTab 是專為槍械和彈藥電子商務而建立的唯一交易平台。它能夠讓您在線安全地支付和收款。了解更多資訊,請至 GunTab.com。

在 WordPress 中啟用外掛

前往「外掛」>「新增外掛」。
搜尋「GunTab」。
選擇「立即安裝」。
安裝完成後,選擇「啟用」。

在 WooCommerce 中啟用外掛

前往「WooCommerce」>「設定」>「付款」。
選擇啟用「GunTab Payments」。
選擇「儲存變更」。
重新載入頁面後,選擇管理「GunTab Payments」。現在您可以設定偏好。

篩選器

在發送到 GunTab 之前修改發票資料:

use GunTab\Api\GunTab\Abstracts\Invoice;

function guntabAlterInvoice(Invoice $invoice, \WC_Order $order) {
// 您的程式碼
return $invoice;
}

add_filter('guntab_alter_invoice', 'guntabAlterInvoice');

當訂單狀態因 GunTab 的 Webhook 請求而改變時,修改訂單狀態:

function getNewOrderStatus(string $suggestedStatus, \stdClass $jsonDataFromGunTab) {
// 您的程式碼
return 'wc-complete'; // 根據 $jsonDataFromGunTab->status 選擇不同的 WooCommerce 訂單狀態
}

add_filter('guntab_get_new_order_status', 'getNewOrderStatus', 10, 2);<h3>Actions</h3>

當 GunTab 向您的 Webhook 端點發送請求時,執行外掛已處理請求後:

function your_function_name(\WC_Order $order, \stdClass $postedJsonData) {
// 您的程式碼
}

add_action('guntab_on_webhook', 'your_function_name', 10, 2);

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.3.3) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「GunTab Payment Gateway」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

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);

延伸相關外掛

文章
Filter
Apply Filters
Mastodon