Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.4.8] - 2025-03-13
### Added
- Provide `setClientJavaEnabled` and `setClientColorDepth` methods to set `customer_info[client_java_enabled]` and `customer_info[client_color_depth]` for the customer object.

## [3.4.7] - 2025-02-06
### Added
- Provide `setSelectedScheme` method to set `selected_scheme` for `initiatePayment`.
Expand Down
2 changes: 1 addition & 1 deletion src/AbstractApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ abstract class AbstractApi
/**
* PHP API version
*/
const PHP_API_VERSION = '3.4.7';
const PHP_API_VERSION = '3.4.8';

/**
* Event dispatcher
Expand Down
56 changes: 53 additions & 3 deletions src/Request/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,24 @@ class Customer extends AbstractSerializer
/**
* The customer's client supports javascript.
*
* @var string
* @var bool
*/
private $clientJavascriptEnabled;

/**
* The customer's client supports java.
*
* @var bool
*/
private $clientJavaEnabled;

/**
* The customer's client screen color depth.
*
* @var string
*/
private $clientColorDepth;

/**
* Client Session ID.
*
Expand Down Expand Up @@ -664,7 +678,7 @@ public function setClientScreenHeight($clientScreenWidth)
/**
* Set if client javascript enabled or not
*
* @param string $clientJavascriptEnabled
* @param bool $clientJavascriptEnabled
*
* @return $this
*/
Expand All @@ -675,6 +689,34 @@ public function setClientJavascriptEnabled($clientJavascriptEnabled)
return $this;
}

/**
* Set if client java enabled or not
*
* @param bool $clientJavaEnabled
*
* @return $this
*/
public function setClientJavaEnabled($clientJavaEnabled)
{
$this->clientJavaEnabled = $clientJavaEnabled;

return $this;
}

/**
* Set Client Screen Width
*
* @param string $clientColorDepth
*
* @return $this
*/
public function setClientColorDepth($clientColorDepth)
{
$this->clientColorDepth = $clientColorDepth;

return $this;
}

/**
* Set Client Session ID
*
Expand Down Expand Up @@ -798,10 +840,18 @@ public function serialize()
$output['client_screen_height'] = $this->clientScreenHeight;
}

if ($this->clientJavascriptEnabled) {
if ($this->clientJavascriptEnabled !== null) {
$output['client_javascript_enabled'] = $this->clientJavascriptEnabled;
}

if ($this->clientJavaEnabled !== null) {
$output['client_java_enabled'] = $this->clientJavaEnabled;
}

if ($this->clientColorDepth) {
$output['client_color_depth'] = $this->clientColorDepth;
}

if ($this->billingRef) {
$output['billing_ref'] = $this->billingRef;
}
Expand Down