內容簡介
```html
<ul>
<li>Devdraft Payment 是一個強大的 WordPress 外掛,幫助企業通過傳統銀行方法和穩定幣解決方案接受付款。</li>
<li>這個外掛提供統一介面,用於處理銀行轉帳和穩定幣付款,為客戶提供多種支付選項。</li>
</ul>
```
### 問題與答案:
1. 這個外掛的主要功能是什麼?
- 答:Devdraft Payment 是一個強大的 WordPress 外掛,幫助企業通過傳統銀行方法和穩定幣解決方案接受付款。
2. 它支援哪些付款方式?
- 答:支援傳統的銀行轉帳方式(如 ACH Push、Same-day ACH、Wire Transfer、SEPA)以及穩定幣支付(如 USDC、EURC)。
3. 使用者可以如何設定這個外掛?
- 答:使用者需要配置 Devdraft API 憑證(API Key、API Secret、API Host),然後設定交易監控的狀態檢查間隔。
4. 如何在 WordPress 網站上嵌入付款表單?
- 答:可以使用簡單的短碼(Shortcode)來嵌入付款表單,在任何頁面或文章上。
5. 這個外掛提供了哪些交易追蹤功能?
- 答:可以追蹤交易的相關資訊,包括交易編號、訂單編號、付款狀態、金額、客戶信息等。
```
外掛標籤
開發者團隊
原文外掛簡介
Devdraft Payment is a powerful WordPress plugin that enables businesses to accept payments through both traditional banking methods and stablecoin solutions. The plugin provides a unified interface for processing bank transfers and stablecoin payments, making it easy to offer multiple payment options to your customers.
Key Features
Dual Payment Support: Accept both bank transfers and stablecoin payments
Multiple Payment Rails: Support for ACH, Wire, SEPA, SWIFT, and SPEI transfers
Stablecoin Integration: USDC and EURC support across major blockchain networks
Dynamic Form Interface: Intelligent form that adapts based on payment method selection
Real-time Payment Processing: Instant payment intent creation and processingb
Comprehensive Admin Panel: Easy configuration through WordPress admin interface
Shortcode Integration: Simple shortcode implementation for any page or post
Responsive Design: Mobile-friendly payment forms
Security Features: Nonce verification and data sanitization
Supported Payment Methods
Traditional Bank Transfers:
* ACH Push (United States)
* Same-day ACH (United States)
* Wire Transfer (International)
* SEPA (Single Euro Payments Area)
Stablecoin Payments:
* USDC (USD Coin) – USD-pegged stablecoin
* EURC (Euro Coin) – EUR-pegged stablecoin
Supported Blockchain Networks:
* Ethereum (ETH)
* Polygon (MATIC)
* Solana (SOL)
* Base (Coinbase’s Layer 2)
* Arbitrum (Layer 2 scaling solution)
* Optimism (Layer 2 scaling solution)
* Avalanche C-Chain (AVAX)
Configuration
Step 1: API Configuration
Before the plugin can process payments, you must configure your Devdraft API credentials:
API Key: Enter your Devdraft API client key
API Secret: Enter your Devdraft API client secret
API Host: Enter your Devdraft API host URL (typically https://api.devdraft.ai)
Step 2: Transaction Settings
Configure transaction monitoring:
Status Check Interval: Choose how often to check transaction statuses
Every 1 Minute (for real-time monitoring – high resource usage)
Every 2 Minutes (for near real-time monitoring)
Every 5 Minutes (for frequent updates)
Every 10 Minutes (for regular updates)
Every 30 Minutes (for moderate monitoring)
Every Hour (default, balanced approach)
Usage
Shortcode Implementation
The plugin provides a simple shortcode for embedding payment forms anywhere on your WordPress site:
Basic Usage:
[devdraft_payment customer_first_name="John" customer_last_name="Doe" customer_email="[email protected]" amount="1000.00" orderid="ORDER-12345"]
With Custom Title:
[devdraft_payment customer_first_name="John" customer_last_name="Doe" customer_email="[email protected]" amount="1000.00" orderid="ORDER-12345" title="Complete Your Payment"]
Shortcode Parameters
Parameter
Required
Description
Example
customer_first_name
Yes
Customer’s first name
"John"
customer_last_name
Yes
Customer’s last name
"Doe"
customer_email
Yes
Customer’s email address
"[email protected]"
amount
Yes
Payment amount (decimal)
"1000.00"
orderid
Yes
Order ID for transaction mapping
"ORDER-12345"
title
No
Custom form title
"Payment Form"
Transaction Tracking
The plugin provides comprehensive transaction tracking capabilities:
Payment Form Shortcode:
[devdraft_payment customer_first_name="John" customer_last_name="Doe" customer_email="[email protected]" amount="1000.00" orderid="ORDER-12345"]
Transaction Display Shortcode:
[devdraft_transaction transaction_id="txn_01HZXK8M9N2P3Q4R5S6T7U8V9W"]
Transaction Information Displayed:
* Transaction ID and Order ID for easy mapping
* Bridge Transfer ID
* Payment status with human-readable descriptions
* Amount and currency information
* Creation and update timestamps
* Last status check timestamp
* Customer information
* Source and destination details
* Bank transfer details (for bank payments)
* Wallet addresses (for stablecoin payments)
Transaction Statuses:
* AWAITING_FUNDS: Payment intent created, waiting for funds
* IN_REVIEW: Transaction is being reviewed
* FUNDS_RECEIVED: Funds have been received
* PAYMENT_SUBMITTED: Payment has been submitted for processing
* PAYMENT_PROCESSED: Payment has been successfully processed
* UNDELIVERABLE: Payment could not be delivered
* RETURNED: Payment was returned
* REFUNDED: Payment has been refunded
* CANCELED: Transaction was canceled
* ERROR: An error occurred during processing
* DISPUTED: Transaction is under dispute
Automatic Status Updates:
* Transactions are automatically stored in the database
* WordPress cron job checks transaction statuses hourly
* Status updates are fetched from the Devdraft API
* Real-time status tracking for active transactions (until PAYMENT_PROCESSED)
* Color-coded status indicators for easy identification
* Cron job stops checking once transactions reach PAYMENT_PROCESSED state
Payment Flow
Customer Selection: Customers choose between bank transfer or stablecoin payment
Method Configuration: Based on selection, customers configure payment details
Payment Processing: Plugin creates payment intent via Devdraft API
Instructions Display: Customers receive specific instructions for completing payment
Confirmation: Payment details are displayed for customer reference
Success Messages
Bank Transfers
When a bank transfer payment is created successfully, the form displays:
Bank name and account holder
Account number and routing number (for US transfers)
IBAN and BIC (for international transfers)
Bank address
Important reference number to include in the transfer
Stablecoin Transfers
When a stablecoin payment is created successfully, the form displays:
Wallet address (formatted as code)
Network information
Currency information
Important instructions about sending the exact amount
API Integration
The plugin integrates with the Devdraft API endpoints to create payment intents for both bank transfers and stablecoin transactions.
Bank Transfer API Endpoint
Endpoint: POST /api/v0/payment-intents/bank
Purpose: Creates payment intents for traditional bank transfers (ACH, Wire, SEPA, SWIFT, SPEI)
Request Format:
json
{
"sourcePaymentRail": "ach|wire|sepa|swift|spei",
"sourceCurrency": "usd|eur",
"destinationCurrency": "usdc|eurc",
"destinationNetwork": "ethereum|polygon|solana|base|arbitrum|optimism|avalanche_c_chain",
"destinationAddress": "0x742d35Cc6634C0532925a3b8D4C9db96c4b4d8e1",
"amount": "1000.00",
"customer_first_name": "John",
"customer_last_name": "Doe",
"customer_email": "[email protected]",
"ach_reference": "ACH123456",
"wire_message": "Payment for invoice #12345",
"sepa_reference": "REF-123456789"
}
Response: Returns virtual account details for bank transfers including account numbers, routing numbers, IBAN, BIC, and reference numbers.
Stablecoin Transfer API Endpoint
Endpoint: POST /api/v0/payment-intents/stablecoin
Purpose: Creates payment intents for stablecoin-to-stablecoin transfers and cross-chain conversions
Request Format:
json
{
"sourceCurrency": "usdc|eurc",
"sourceNetwork": "ethereum|polygon|solana|base|arbitrum|optimism|avalanche_c_chain",
"destinationCurrency": "usdc|eurc",
"amount": "100.50",
"customer_first_name": "John",
"customer_last_name": "Doe",
"customer_email": "[email protected]"
}
Response: Returns destination wallet address, network information, and transaction details for stablecoin transfers.
Authentication
Both endpoints require the following headers:
* Content-Type: application/json
* x-client-key: [Your API Key]
* x-client-secret: [Your API Secret]
* idempotency-key: [Unique UUID v4]
API Documentation References
Stablecoin Payment Intents: Create a stable payment intent
Bank Payment Intents: Create a bank payment intent
Common Issues
“API credentials not configured”: Configure API settings in WordPress admin
“Destination address not configured”: Set up destination addresses in plugin settings
“Destination network is required”: Ensure the destination network field is properly set
AJAX errors: Check browser console for detailed error information
Support
For support and issues:
Check the test page for configuration status
Review browser console for JavaScript errors
Check WordPress error logs for PHP errors
Verify API credentials and destination addresses are configured
External Services
This plugin connects to external services provided by Devdraft to process payments and facilitate bank transfers and stablecoin transactions.
Devdraft API Service
* What it is: Devdraft provides payment processing infrastructure for bank transfers and stablecoin transactions
* What it’s used for: Creating payment intents, processing bank transfer instructions, facilitating stablecoin wallet transactions, and checking transaction statuses
* When data is sent:
* When customers submit payment forms through the plugin’s shortcode (creates payment intents)
* Periodically via WordPress cron jobs to check transaction statuses (configurable interval: 1 minute to 1 hour)
* API Endpoints Used:
* POST /api/v0/payment-intents/bank – Creates bank transfer payment intents
* POST /api/v0/payment-intents/stablecoin – Creates stablecoin payment intents
* GET /api/v0/payment-intents/{transaction_id}/status – Checks transaction status
* What data is sent:
* Customer information (first name, last name, email address)
* Payment amount and currency details
* Payment method selection (bank transfer or stablecoin)
* Bank transfer details (payment rail, reference numbers, wire messages)
* Stablecoin details (source/destination networks, wallet addresses)
* Transaction IDs for status checking
* Terms of Service: https://console.devdraft.ai/legal/terms-of-service
* Privacy Policy: https://console.devdraft.ai/legal/privacy-policy
Important Privacy Notice: This plugin integrates with Devdraft’s payment processing infrastructure. Customer data is transmitted to Devdraft’s secure API endpoints to facilitate payment processing. Users should review Devdraft’s terms of service and privacy policy to understand how customer data is handled. Site administrators are responsible for ensuring compliance with applicable privacy laws (GDPR, CCPA, etc.) and informing customers about data sharing practices.
Source Code
This plugin includes the following third-party libraries with their source code:
QRCode.js Library
* Minified file: assets/js/qrcode.min.js
* Source code: assets/js/qrcode.js (included in plugin package)
* Original repository: https://github.com/davidshimjs/qrcodejs
* License: MIT License
* Purpose: Generates QR codes for cryptocurrency wallet addresses
* Version: 1.5.3
The unminified source code for qrcode.min.js is included in the plugin package as qrcode.js to comply with WordPress plugin guidelines for human-readable code. The original source is available at: https://github.com/davidshimjs/qrcodejs/blob/master/qrcode.js
