在結帳完成期間執行,這發生在訂單和發票創建之前。使用它來防止創建訂單並向用戶顯示錯誤。
參數
| 變量 | 類型 | 注意 |
|---|---|---|
| a | string | 值為 checkout 。 |
| submit | string | 值將是真實的。 |
| promocode | string | 如果輸入,則為促銷代碼。 |
| notes | string | 如果啟用,附加訂單說明 |
| paymentmethod | string | 選擇的付款方式 |
| ccinfo | string | new 或 useexisting 。 |
| cctype | string | |
| ccnumber | string | |
| ccexpirymonth | string | |
| ccexpiryyear | string | |
| cccvv | string | |
| custtype | string | 可能的值為 new 或 existing |
| clientId | int | 如果用戶在結帳期間經過身份驗證,則為非零值。 |
| loginemail | string | 僅當客戶端在結帳期間進行身份驗證時才存在。 |
| loginpassword | string | 僅當客戶端在結帳期間進行身份驗證時才存在。 |
| firstname | string | 當客戶是新客戶時存在的值。 |
| lastname | string | 當客戶是新客戶時存在的值。 |
| companyname | string | 新客戶時的值 |
| string | 新客戶時的值 | |
| address1 | string | 新客戶時的值 |
| address2 | string | 新客戶時的值 |
| city | string | 新客戶時的值 |
| state | string | 新客戶時的值 |
| country | string | 新客戶時的值;兩個字母的 ISO 代碼 |
| phonenumber | string | 新客戶時的值 |
| password | string | 新客戶時的值 |
| password2 | string | 新客戶時的值 |
| securityqid | string | 新客戶時的值 |
| securityqans | string | 新客戶時的值 |
| customfield | array | 新客戶時的值 |
響應
Return 接受 string 或 array 。對single 錯誤消息使用字符串或對多個錯誤消息使用字符串的array。
示例代碼
<?php
add_hook('ShoppingCartValidateCheckout', 1, function($vars) {
return [
'Error message feedback error 1',
'Error message feedback error 2',
];
});
相關用法
- PHP WHMCS ShoppingCartValidateDomain用法及代碼示例
- PHP WHMCS ShoppingCartValidateProductUpdate用法及代碼示例
- PHP WHMCS ShoppingCartValidateDomainsConfig用法及代碼示例
- PHP WHMCS ShoppingCartViewCartOutput用法及代碼示例
- PHP WHMCS ShoppingCartCheckoutCompletePage用法及代碼示例
- PHP WHMCS ShoppingCartConfigureProductAddonsOutput用法及代碼示例
- PHP WHMCS ShoppingCartCheckoutOutput用法及代碼示例
- PHP String wordwrap()用法及代碼示例
- PHP SimpleXMLElement children()用法及代碼示例
- PHP SplPriorityQueue isCorrupted()用法及代碼示例
- PHP SplObjectStorage key()用法及代碼示例
- PHP SplHeap extract()用法及代碼示例
- PHP String sprintf()用法及代碼示例
- PHP SplPriorityQueue insert()用法及代碼示例
- PHP SplFixedArray key()用法及代碼示例
- PHP String ucwords()用法及代碼示例
- PHP SplFileInfo getRealPath()用法及代碼示例
- PHP SplObjectStorage rewind()用法及代碼示例
- PHP SplFileInfo getPerms()用法及代碼示例
- PHP SplHeap top()用法及代碼示例
- PHP SplFileInfo getExtension()用法及代碼示例
- PHP String substr()用法及代碼示例
- PHP WHMCS SendAdminEmail用法及代碼示例
- PHP WHMCS SubmitTicketAnswerSuggestions用法及代碼示例
- PHP SplObjectStorage count()用法及代碼示例
注:本文由純淨天空篩選整理自whmcs.com大神的英文原創作品 ShoppingCartValidateCheckout。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
