paygent-core

Unify Paygent payment gateway API handling, authentication, and webhook processing for WooCommerce.

3|2|Updated Jun 9, 2021
One-click install
npx skills add https://github.com/artisanworkshop/Japanized-for-WooCommerce --skill paygent-core-artisanworkshop
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: paygent-core
Source: https://github.com/artisanworkshop/Japanized-for-WooCommerce/tree/main/.claude/skills/paygent-core
Command: npx skills add https://github.com/artisanworkshop/Japanized-for-WooCommerce --skill paygent-core-artisanworkshop

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Paygent決済で手段ごとに散らばりがちなAPI通信、認証情報管理、ハッシュチェック、Webhook処理、エラー対応を共通化し、実装の抜け漏れや不整合を防ぎます。

Core Features & Use Cases

  • Paygent API 共通コア処理: send_paygent_request によるAPI送信ラッパー、結果判定、共通レスポンス取り扱いを提供します(telegram_kind ごとの全決済手段に対応)。
  • 認証情報と環境切替: merchant_id / connect_id / connect_password をテスト/本番で切り替え、マルチサイト向けの site_id(wc-paygent-sid)なども考慮します。
  • ハッシュチェックと不正防止: wc-paygent-hash_check 有効時に hc と request_date を付与し、指定順序でSHA-256を生成して整合性を担保します。
  • 注文IDマッピング: trading_id の決定(_paygent_order_id や prefix に基づく生成)と、payment_id/trading_id をキーにした処理の基盤を扱います。
  • Webhook受信とエラー/デバッグ基盤: REST API(/wp-json/paygent/v1/check)での受信処理、SJIS→UTF-8変換を含むエラー詳細管理、デバッグログ出力を共通化します。

Quick Start

「WooCommerceのPaygentゲートウェイで WC_Gateway_Paygent_Request::send_paygent_request を使って、telegram_kind と送信データを指定し、必要に応じてハッシュチェックとWebhook受信の前提(SJIS対応、trading_id、option設定)まで含めた実装ガイドを作ってください。」

Frequently Asked Questions about paygent-core

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement Paygent API requests and webhook processing in WooCommerce?▼

To implement Paygent API requests and webhook processing in WooCommerce, you can unify API transmission, authentication, and webhook reception using a standardized wrapper for deterministic operation across all payment methods. It handles telegram_kind-based flows and error management.

Does WooCommerce support SJIS encoding conversion for Paygent webhooks?▼

WooCommerce can support SJIS encoding conversion for Paygent webhooks by applying automatic SJIS to UTF-8 transformation during REST API reception. This ensures standardized error detail management and correct character handling for incoming payment data.

How does Paygent hash checking work for preventing payment data tampering?▼

Paygent hash checking works for preventing payment data tampering by appending hc and request_date parameters, then generating a SHA-256 hash in a specified order. This guarantees data integrity when enabled for the payment request.

Can I manage multiple Paygent environments and merchant IDs for WooCommerce multi-site?▼

You can manage multiple Paygent environments and merchant IDs for WooCommerce multi-site by switching merchant_id, connect_id, and connect_password between test and production. It also accounts for site_id configurations for multi-site setups.

What is the best way to map Paygent trading_id to WooCommerce order IDs?▼

The best way to map Paygent trading_id to WooCommerce order IDs is by determining the trading_id based on stored _paygent_order_id values or prefix-based generation, using payment_id and trading_id as processing keys.

What PHP and WordPress versions are required for the Paygent payment gateway core?▼

The Paygent payment gateway core requires WooCommerce 9.0+, WordPress 6.7+, and PHP 8.2+ for compatibility. It utilizes the PaygentB2BModule from vendor-wc to implement required options and endpoint behaviors.