[WordPress] 外掛分享: Simple PayPal Payment

首頁外掛目錄 › Simple PayPal Payment
WordPress 外掛 Simple PayPal Payment 的封面圖片
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
40+
安裝啟用
尚無評分
1596 天前
最後更新
0%
問題解決
WordPress 4.7+ PHP 5.6+ v2.03 上架:2018-12-27

內容簡介

將 PayPal 結帳整合至 WordPress。

透過短代碼將 PayPal 結帳按鈕貼到單一文章或頁面。
透過區塊將 PayPal 結帳按鈕貼到單一文章或頁面。
透過小工具將 PayPal 結帳按鈕貼到存檔頁面和首頁。
可在不轉換畫面的情況下完成付款。
可自訂 PayPal 結帳按鈕。
可指定付款前後的文字或 HTML。
可刪除付款後的 HTML 元素。
預先準備一個過濾器勾子以立即處理收費後的任務。

教學影片

如何使用過濾器勾子的範例

顯示按鈕

echo do_shortcode('[simplepaypalpayment size="medium" amount=20 currency="USD" email="[email protected]" payname="testpay"]');

短代碼
屬性:說明
locale:支援的地區語言代碼
size:按鈕樣式
color:按鈕樣式
shape:按鈕樣式
label:按鈕樣式
amount:價格
currency:貨幣代碼
before:付款前顯示
after:付款後顯示
remove:付款後要刪除的 HTML 元素
remove2:付款後要刪除的 HTML 元素
email:電子郵件
payname:此付款的唯一名稱
過濾器勾子 & 函數

/** ==================================================
* Simple PayPal Payment 的過濾器
*
* @param string $data 資料。
* @param string $payment_data 付款資訊。
* @param string $email 電子郵件。
* @param int $amount 金額。
* @param string $currency 貨幣。
* @param string $payname 此付款的唯一名稱。
*/
function paypal_charge( $data, $payment_data, $email, $amount, $currency, $payname ) {

/* 請寫下當計費成功後要做的處理程序。*/
if ( 'testpay' === $payname ) {
update_option( 'testpay_paypal', 'paypal' . $payname . $amount . $currency );
}

}
add_filter( 'simple_paypal_payment_charge', 'paypal_charge', 10, 6 );

過濾器勾子
變數:說明:來自於
$data:使用 JSON 格式的付款資訊:PayPal 的值
$payment_data:使用 JSON 格式的付款資訊:PayPal 的值
$email:電子郵件:Simple PayPal Payment 的值
$amount:價格:Simple PayPal Payment 的值
$currency:貨幣代碼:Simple PayPal Payment 的值
$payname:此付款的唯一名稱:Simple PayPal Payment 的值

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.03) 或搜尋安裝

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

原文外掛簡介

Integrates PayPal checkout into WordPress.

Paste PayPal checkout button to Single Post and Single Page by short code.
Paste PayPal checkout button to Single Post and Single Page by block.
Paste PayPal checkout button to Archive Page and Home Page by widget.
Complete payment without screen transition.
Can customize the PayPal checkout button.
Can specify the text or html before payment and after payment.
Can remove html elements to after payment.
Prepared a filter hook for processing immediately after billing.

Tutorial Video

Sample of how to use the filter hook

Show button

echo do_shortcode('[simplepaypalpayment size="medium" amount=20 currency="USD" email="[email protected]" payname="testpay"]');

shortcode
Attribute : Description
locale : Supported locale codes
size : Button styles
color : Button styles
shape : Button styles
label : Button styles
amount : Price
currency : Currency Codes
before : Display before payment
after : Display after payment
remove : HTML elements to remove after payment
remove2 : HTML elements to remove after payment
email : Email
payname : Unique name for this payment
Filter hook & Function

/** ==================================================
* Filter of Simple PayPal Payment
*
* @param string $data data.
* @param string $payment_data payment_data.
* @param string $email email.
* @param int $amount amount.
* @param string $currency currency.
* @param string $payname payname.
*/
function paypal_charge( $data, $payment_data, $email, $amount, $currency, $payname ) {

/* Please write the process to be done when billing succeeds. */
if ( 'testpay' === $payname ) {
update_option( 'testpay_paypal', 'paypal' . $payname . $amount . $currency );
}

}
add_filter( 'simple_paypal_payment_charge', 'paypal_charge', 10, 6 );

Filter hook
Variable : Description : From
$data : Payment information by JSON : Value of PayPal
$payment_data : Payment information by JSON : Value of PayPal
$email : Email : Value of Simple PayPal Payment
$amount : Price : Value of Simple PayPal Payment
$currency : Currency Codes : Value of Simple PayPal Payment
$payname : Unique name for this payment : Value of Simple PayPal Payment

延伸相關外掛

文章
Filter
Apply Filters
Mastodon