
內容簡介
將 Stripe 結帳整合到 WordPress
透過短碼將 Stripe 結帳按鈕貼到單篇文章和單頁面上
透過區塊將 Stripe 結帳按鈕貼到單篇文章和單頁面上
透過小工具將 Stripe 結帳按鈕貼到存檔頁和首頁上
在不轉換畫面的情況下完成付款
可以在付款前和付款後指定文本或 HTML
可以移除付款後的 HTML 元素
為立即帳單處理事宜準備了過濾器勾子(Filter Hook)
教學影片
使用過濾器勾子的範例
顯示按鈕
echo do_shortcode('[simplestripepayment amount=100 currency="USD" name="Test" description="Test Charge" email="[email protected]" payname="testpay"]';
短碼
屬性: 描述
amount: 價格
name: 公司或網站名稱
description: 購買之產品或服務之說明
currency: 貨幣代碼
label: 藍色按鈕所顯示的文字
before: 付款前顯示的內容
after: 付款後顯示的內容
remove: 付款後移除的 HTML 元素
remove2: 付款後移除的 HTML 元素
email: 電子郵件
payname: 此筆付款的唯一名稱
過濾器勾子和函數
/**==================================================
* Simple Stripe Payment 的過濾器
*
* @param string $token 付款資訊(以 JSON 格式)
* @param string $email 電子郵件
* @param int $amount 價格
* @param string $currency 貨幣代碼
* @param string $name 公司或網站名稱
* @param string $description 購買之產品或服務之說明
* @param string $payname 此筆付款的唯一名稱
*/
function stripe_charge( $token, $email, $amount, $currency, $name, $description, $payname ) {
/* 記得寫下當帳單成功時需要執行的流程 */
if ( 'testpay' === $payname ) {
update_option( 'testpay_stripe', 'stripe' . $payname . $amount . $currency );
}
}
add_filter( 'simple_stripe_payment_charge', 'stripe_charge', 10, 7 );
過濾器勾子
變數: 描述:來源
$token: JSON 格式的付款資訊:Stripe 值
$email: 電子郵件:Simple Stripe Payment 值
$amount: 價格:Simple Stripe Payment 值
$currency: 貨幣代碼:Simple Stripe Payment 值
$name: 公司或網站名稱:Simple Stripe Payment 值
$description: 購買之產品或服務之說明:Simple Stripe Payment 值
$payname: 此筆付款的唯一名稱:Simple Stripe Payment 值
外掛標籤
開發者團隊
原文外掛簡介
Integrates Stripe checkout into WordPress.
Paste Stripe checkout button to Single Post and Single Page by short code.
Paste Stripe checkout button to Single Post and Single Page by block.
Paste Stripe checkout button to Archive Page and Home Page by widget.
Complete payment without screen transition.
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('[simplestripepayment amount=100 currency="USD" name="Test" description="Test Charge" email="[email protected]" payname="testpay"]';
shortcode
Attribute : Description
amount : Price
name : The name of your company or website
description :A description of the product or service being purchased
currency : Currency Codes
label : The text to be shown on the blue button
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 Stripe Payment
*
* @param string $token token.
* @param string $email email.
* @param int $amount amount.
* @param string $currency currency.
* @param string $name name.
* @param string $description description.
* @param string $payname payname.
*/
function stripe_charge( $token, $email, $amount, $currency, $name, $description, $payname ) {
/* Please write the process to be done when billing succeeds. */
if ( 'testpay' === $payname ) {
update_option( 'testpay_stripe', 'stripe' . $payname . $amount . $currency );
}
}
add_filter( 'simple_stripe_payment_charge', 'stripe_charge', 10, 7 );
Filter hook
Variable : Description : From
$token : Payment information by JSON : Value of Stripe
$email : Email : Value of Simple Stripe Payment
$amount : Price : Value of Simple Stripe Payment
$currency : Currency Codes : Value of Simple Stripe Payment
$name : The name of your company or website : Value of Simple Stripe Payment
$description : A description of the product or service being purchased : Value of Simple Stripe Payment
$payname : Unique name for this payment : Value of Simple Stripe Payment
