Forum und email

CCVS API 函數

這些函數和 CCVS 的 API 作接口, 讓你可以直接在 PHP 程式中使用 CCVS。 CCVS 是 » RedHat's 用來解決處理信用卡交易的 '中間人' 方案。 它讓你使用一個 unix 程序跟數據機直接和信用卡的結算方 (clearing houses) 通話。 使用 PHP 的這個 CCVS 模組, 你可在 PHP 程式段中直接處理涉及信用卡的工作。下面 列出處理時的大致流程。

用令 PHP 支援 CCVS, 首先檢查一下你的 CCVS 安裝在哪一個目錄。 然後你要修改 --with-ccvs選項: 如果不給出 CCVS 安裝目錄, PHP 會到 CCVS 的預定目錄 (/usr/local/ccvs) 中尋找。 如 CCVS 不是安裝在標準的目錄 中的話, 選項便要修改如下:--with-ccvs=$ccvs_path , $ccvs_path 便是安裝 CCVS 的位置。 留意想支援 CCVS 則 $ccvs_path/lib 和 $ccvs_path/include 這兩個目錄要存在並目錄中分別要有 libccvs.a 和 cv_api.h 這兩個檔案。

除此之外, ccvsd 程序所運行時的配置要和你打算運行 PHP 的配置相同。 另外 兩者運行時的使用者名稱也要一樣才行。 (也就是說, 如果你用 'ccvs' 來安裝 CCVS, 那你的 PHP 程式也要用 'ccvs' 的身分來運行。)

更多有關 CCVS 的資料可在 » ???中取得。

這部分的說明文件仍在編寫中。 在我們完工前 RedHat 所保留的說明文件 仍是十分有用的, 盡管舊了點兒: » https://www.redhat.com/docs/manuals/ccvs/

Table of Contents

  • ccvs_add — Add data to a transaction
  • ccvs_auth — Perform credit authorization test on a transaction
  • ccvs_command — Performs a command which is peculiar to a single protocol, and thus is not available in the general CCVS API
  • ccvs_count — Find out how many transactions of a given type are stored in the system
  • ccvs_delete — Delete a transaction
  • ccvs_done — Terminate CCVS engine and do cleanup work
  • ccvs_init — Initialize CCVS for use
  • ccvs_lookup — Look up an item of a particular type in the database #
  • ccvs_new — Create a new, blank transaction
  • ccvs_report — Return the status of the background communication process
  • ccvs_return — Transfer funds from the merchant to the credit card holder
  • ccvs_reverse — Perform a full reversal on an already-processed authorization
  • ccvs_sale — Transfer funds from the credit card holder to the merchant
  • ccvs_status — Check the status of an invoice
  • ccvs_textvalue — Get text return value for previous function call
  • ccvs_void — Perform a full reversal on a completed transaction