執行為聯屬會員傭金被應用到聯屬會員以便稍後清除。
參數
變量 | 類型 | 注意 |
---|---|---|
affiliateId | int | |
referralId | int | 推薦人的id |
serviceId | int | 被推薦服務的id |
commissionAmount | float | 申請傭金數量 |
commissionDelayed | bool | 傭金會不會延遲 |
clearingDate | null | string |
payout | bool | 該傭金是否適用於附屬傭金 |
message | string | 如果payout 為假,將不會應用傭金的原因 |
響應
返回布爾值以覆蓋“skipCommission”或‘payout’。
示例代碼
<?php
//Skip applying the commission for affiliate 2
add_hook('AffiliateCommission', 1, function($vars) {
$return = [];
if ($vars['affiliateId'] == 2) {
$return['skipCommission'] = true;
}
return $return;
});
//Ensure commission is applied for affiliate 3
add_hook('AffiliateCommission', 1, function($vars) {
$return = [];
if ($vars['affiliateId'] == 3) {
$return['payout'] = true;
}
return $return;
});
相關用法
- PHP WHMCS AffiliateClickthru用法及代碼示例
- PHP WHMCS AffiliateActivation用法及代碼示例
- PHP WHMCS AffiliateActivate用法及代碼示例
- PHP WHMCS AffiliateWithdrawalRequest用法及代碼示例
- PHP WHMCS AfterRegistrarTransferFailed用法及代碼示例
- PHP WHMCS AfterModuleCreate用法及代碼示例
- PHP WHMCS AfterShoppingCartCheckout用法及代碼示例
- PHP WHMCS AfterRegistrarRequestDelete用法及代碼示例
- PHP WHMCS AfterModuleCustom用法及代碼示例
- PHP WHMCS AfterModuleTerminate用法及代碼示例
- PHP WHMCS AfterModuleProvisionAddOnFeatureFailed用法及代碼示例
- PHP WHMCS AfterProductUpgrade用法及代碼示例
- PHP WHMCS AfterModuleChangePackage用法及代碼示例
- PHP WHMCS AfterCronJob用法及代碼示例
- PHP WHMCS AfterModuleSuspendAddOnFeatureFailed用法及代碼示例
- PHP WHMCS AfterModuleCreateFailed用法及代碼示例
- PHP WHMCS AfterRegistrarRegistrationFailed用法及代碼示例
- PHP WHMCS AfterAddonUpgrade用法及代碼示例
- PHP WHMCS AfterRegistrarSaveContactDetails用法及代碼示例
- PHP WHMCS AfterModuleDeprovisionAddOnFeatureFailed用法及代碼示例
- PHP WHMCS AfterRegistrarGetContactDetails用法及代碼示例
- PHP WHMCS AfterModuleChangePackageFailed用法及代碼示例
- PHP WHMCS AfterModuleUnsuspend用法及代碼示例
- PHP WHMCS AfterModuleTerminateFailed用法及代碼示例
- PHP WHMCS AfterRegistrarGetNameservers用法及代碼示例
注:本文由純淨天空篩選整理自whmcs.com大神的英文原創作品 AffiliateCommission。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。