# GiveWP 寄付連携

# 要件

このプラグインをインストールする前に、次の要件を満たしていることを確認してください。

# 1. BTCPay for GiveWP プラグインをインストールする

BTCPay for GiveWP プラグインのインストール方法は3つあります。

# 1.1 WordPress 管理ダッシュボードからプラグインをインストール(推奨)

  1. 左サイドバーで Plugins -> Add New をクリックします。
  2. 検索欄で "BTCPay for GiveWP" と入力します。
  3. Install now をクリックし、その後 Activate をクリックします。
BTCPay for GiveWP: Plugin installation

# 1.2 GitHub からプラグインをダウンロードしてインストール

別の方法として、GitHub からプラグインをダウンロードして手動でインストールできます。

  1. 最新の BTCPay プラグインをダウンロード (opens new window) します。
  2. WordPress 管理ダッシュボードで Plugins -> Add Plugin をクリックします。
  3. Upload Plugin ボタンをクリックし、先ほどダウンロードした .zip ファイルを選択します。
  4. Install Now をクリックし、その後 Activate をクリックします。

# 2. GiveWP と BTCPay Server を接続する

BTCPay for GiveWP プラグインは、BTCPay Server(決済プロセッサ)と寄付フォームをつなぐブリッジです。 セルフホストでもサードパーティホストでも、接続手順は同じです。

# 2.1 API キーを作成する

BTCPay Server インスタンス側で(できれば別タブで)以下を実施します。

  1. 左下の [Account] -> Manage Account をクリック
  2. "API Keys" をクリック
  3. [Generate Key] をクリックして権限を選択
  4. "Select specific stores" リンクをクリックし、GiveWP ストアを選択して次の権限を設定: View invoices, Create invoice, Modify invoices, Modify stores webhooks, View your stores, Create non-approved pull payments(返金用途。未実装) BTCPay for GiveWP: API Keys Permissions BTCPay for GiveWP: API Keys Permissions
  5. 右上の [Generate API Key] をクリック
  6. 生成された API Key と Store ID を安全な場所に保存します。次の手順で使用します。 BTCPay for GiveWP: API Keys Save

# 2.2 Store ID をコピーする

引き続き BTCPay Server 側で:

  1. 左サイドバーのストアドロップダウンで、GiveWP に接続したいストアを選択
  2. 同じく左サイドバーの [Settings] をクリック
  3. ページ上部に Store ID が表示されます。 BTCPay for GiveWP: Copy Store ID
  4. Store ID を安全な場所に保存します。次の手順で使用します。

# 2.3 GiveWP 設定に API キーと Store ID を入力する

WordPress サイト側に戻って:

  1. WordPress ダッシュボードを開きます。

  2. サイドバーの GiveWP -> Settings -> Payment Gateways へ移動します。

  3. BTCPay Gateway タブをクリックします。

  4. BTCPay Server URL に BTCPay Server の URL(例: https://btcpay.example.com)を入力します。

  5. GiveWP の BTCPay Settings に Store ID を入力します。

  6. GiveWP の BTCPay Settings に生成した API Key を入力します。 BTCPay for GiveWP: Copy API Key

  7. ページ下部の [Save changes] をクリックします。

  8. ページ上部に "BTCPay for GiveWP: BTCPay Server API credentials verified successfully." と "BTCPay for GiveWP: Webhook created successfully." の通知が表示されることを確認します。 BTCPay for GiveWP: Save BTCPay Settings form saved

  9. ページ上部の [Gateways] リンク/タブをクリックしてゲートウェイ一覧に戻ります。

  10. ゲートウェイ一覧に BTCPay Server Gateway が利用可能な支払い方法として表示されているはずです。

  11. "Enabled" 列にチェックを入れて BTCPay Server Gateway を有効化します。"Default" 列にチェックを入れると既定ゲートウェイにもできます。 BTCPay for GiveWP: Gateways Overview

これで GiveWP 寄付フォームで BTCPay Server による寄付受付の準備が完了です。

# 3. 寄付決済をテストする

ストアで少額のテスト寄付を行うと安心です。 本番公開前には、設定が正しいことを必ず確認してください。

BTCPay for GiveWP: Test Donation BTCPay for GiveWP: Test Donation payment page BTCPay for GiveWP: Test Donation

# サポート

リポジトリ (opens new window) で issue を作成するか、Telegram (opens new window) または Mattermost chat (opens new window) でご連絡ください。