Interface
DisputeInterface is used as part of the WHMCS\Billing\Payment\Dispute object to ensure that all required methods are present for output. Utilise the factory method to initialise the DisputeInterface object that will be added to a DisputeCollection object in your custom gateway module.
public static function factory(string $id, float $amount, string $currencyCode, string $transactionId, Carbon $createdDate, Carbon $respondBy, string $reason, string $status): DisputeInterfaceFactory method for a Dispute to create the object with the minimum required information to display a dispute within WHMCS.
Parameters
| Type | Name | Description |
|---|---|---|
string | $id | |
float | $amount | |
string | $currencyCode | |
string | $transactionId | |
Carbon | $createdDate | |
Carbon | $respondBy | |
string | $reason | |
string | $status |
Returns DisputeInterface
public function setEvidence(array $evidence): DisputeInterfaceSet an array of evidence. The evidence array format requires each item have a name and value.
Sanitization contract: when an item's value is a string, it is echoed as raw HTML by the admin dispute view in order to preserve formatting markup. Any gateway-supplied (tainted) fields that the module interpolates into that string MUST therefore be encoded by the module before being passed in — for example with \WHMCS\Input\Sanitize::encode(). When value is an array of the shape ['url' => ..., 'filename' => ...], both fields are encoded at the view sink and no module-side encoding is required.
Parameters
| Type | Name | Description |
|---|---|---|
array | $evidence |
Returns self
public function setEvidenceType(string $evidenceKey, string $evidenceType): DisputeInterfaceOverride an evidence type from 'text' to one of 'file' or 'textarea'. Any $evidenceKey provided in setEvidence will default to the type of text.
Parameters
| Type | Name | Description |
|---|---|---|
string | $evidenceKey | |
string | $evidenceType |
Returns self
public function setGateway(string $gateway): DisputeInterfaceSet the gateway module filename for the dispute for additional loading when viewing a specific dispute.
Parameters
| Type | Name | Description |
|---|---|---|
string | $gateway |
Returns self
public function setIsClosable(bool $closable): DisputeInterfaceSet whether the dispute is closable. This will show the close button on a dispute when set to true.
Parameters
| Type | Name | Description |
|---|---|---|
bool | $closable |
Returns DisputeInterface
public function setIsSubmittable(bool $submittable): DisputeInterfaceSet whether the dispute is submittable. This will show the submit dispute button on a dispute when set to true.
Parameters
| Type | Name | Description |
|---|---|---|
bool | $submittable |
Returns DisputeInterface
public function setIsUpdatable(bool $updatable): DisputeInterfaceSet whether the dispute is updatable. This will show the update dispute button on a dispute when set to true allowing evidence to be submitted.
Parameters
| Type | Name | Description |
|---|---|---|
bool | $updatable |
Returns DisputeInterface
public function setTransactionId(string $transactionId): DisputeInterfaceSet the related transaction id for the dispute.
Parameters
| Type | Name | Description |
|---|---|---|
string | $transactionId |
Returns DisputeInterface