
內容簡介
此為自訂的 WordPress 外掛程式,用以簡化 First Atlantic Commerce 所提供的寄宿頁面付款流程。
功能
可用主題自訂樣板檔,只需將樣板檔複製到子目錄中的主題資料夾 ‘fac-hosted-page-button’ 下
part-page.error.php
part-page.success.php
part-payment.button.error.php
part-payment.button.php
支援自訂動作鉤子
fac-hosted-page_button_after_page_error
fac-hosted-page_button_after_page_success
fac-hosted-page_button_before_payment_button
fac-hosted-page_button_after_payment_button
fac-hosted-page_button_before_payment_button_error
fac-hosted-page_button_after_payment_button_error
可透過頁面區段編輯自訂頁面
fac-hosted-page_button(slug)
回應頁面和付款連結按鈕的短碼
[fac-hosted-page_button_payment_button amount="" currency="" transaction_id="" text=""]
[fac-hosted-page_button_page [page="" message="" transaction_id="" code=""]]
輔助功能
fac_hosted_page_button_display_payment_button($attr)(透過呼叫短碼以顯示按鈕)
可自定義的常數
使用方式
可將付款按鈕短碼嵌入頁面 / 文章,或呼叫類似樣板程式碼的輔助函式,以達成顯示按鈕的效果。
例如:
付款連結按鈕
`
[fac-hosted-page_button_payment_button amount=”20.23″ currency=”BBD” transaction_id=”A-9191″ text=”立即付款”]
`
自訂結果頁面
`
[fac-hosted-page_button_page [“page”=”路徑/至/樣板.php” message=”回應訊息” transaction_id=”A-9191″ code=”200″]]
fac_hosted_page_button_display_payment_button([‘amount’=>200.34,’currency’=>’JMD’,….])
`
畫面截圖
在頁面中使用短碼
付款按鈕
預設感謝頁面
成功感謝頁面
版本變更
1.0.0-beta
發布外掛程式。
1.0.1-beta
更新相依性安全性
備註
可選擇為按鈕樣板和感謝頁面樣板添加其他事件的執行勾子
do_action('fac-hosted-page_button_after_page_error', string $transaction_id );
do_action('fac-hosted-page_button_after_page_success', string $transaction_id );
外掛安裝時會自動建立預設結果頁面和 URL
僅支援 First Atlantic Commerce 的 3DS 倡議。
外掛標籤
開發者團隊
📦 歷史版本下載
原文外掛簡介
Custom wordpress plugin to facilitate First Atlantic Commerce hosted page payments
Features
Customizable template files using theme. Just copy over to theme folder in sub directory called ‘fac-hosted-page-button’
part-page.error.php
part-page.success.php
part-payment.button.error.php
part-payment.button.php
Custom actions hooks
fac-hosted-page_button_after_page_error
fac-hosted-page_button_after_page_success
fac-hosted-page_button_before_payment_button
fac-hosted-page_button_after_payment_button
fac-hosted-page_button_before_payment_button_error
fac-hosted-page_button_after_payment_button_error
Editable Custom Page via Page Section
fac-hosted-page_button (slug)
Shortcodes for response page and payment link button
[fac-hosted-page_button_payment_button amount="" currency="" transaction_id="" text=""]
[fac-hosted-page_button_page [page="" message="" transaction_id="" code=""]]
Helper functions
fac_hosted_page_button_display_payment_button($attr)(Displays the button by calling the short code)
Define overriding constants
Usage
Either embed the payment button shortcode into a page/post or call the helper function with parameters similar to the template code.
E.g.
Payment Link Button
`
[fac-hosted-page_button_payment_button amount=”20.23″ currency=”BBD” transaction_id=”A-9191″ text=”Pay Now”]
`
Custom Results Pages
`
[fac-hosted-page_button_page [“page”=”path/to/template.php” message=”Response MEssage” transaction_id=”A-9191″ code=”200″]]
fac_hosted_page_button_display_payment_button([‘amount’=>200.34,’currency’=>’JMD’,….])
`
Screenshots
Use shortcode in page
Payment Button
Default Thank You Page
Successful Thank You Page
Changelog
1.0.0-beta
Plugin released.
1.0.1-beta
Dependency security updates
Notes
You can optionally add hooks for executing additional events on button template and thank you page template
do_action('fac-hosted-page_button_after_page_error', string $transaction_id );
do_action('fac-hosted-page_button_after_page_success', string $transaction_id );
A default results page and url is created on install
Recommend flushing permalinks settings to enable plugin’s return response url directives
Currently, the plugin supports First Atlantic Commerce’s 3DS initiatives by default.
