在结帐完成期间执行,这发生在订单和发票创建之前。使用它来防止创建订单并向用户显示错误。
参数
| 变量 | 类型 | 注意 |
|---|---|---|
| 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。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
