Skip to content
2 changes: 1 addition & 1 deletion .github/workflows/build-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
"7.1" { $downloadUrl = "https://downloads.php.net/~windows/releases/archives/php-7.1.33-Win32-VC14-x64.zip" }
"7.4" { $downloadUrl = "https://downloads.php.net/~windows/releases/php-7.4.33-Win32-vc15-x64.zip" }
"8.1" { $downloadUrl = "https://downloads.php.net/~windows/releases/php-8.1.34-Win32-vs16-x64.zip" }
"8.4" { $downloadUrl = "https://downloads.php.net/~windows/releases/php-8.4.20-Win32-vs17-x64.zip" }
"8.4" { $downloadUrl = "https://downloads.php.net/~windows/releases/php-8.4.21-Win32-vs17-x64.zip" }
default { throw "Unsupported PHP version: $phpVersion" }
}

Expand Down
56 changes: 56 additions & 0 deletions lib/Checkout/Accounts/AccountsClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class AccountsClient extends Client
const PAYMENT_INSTRUMENTS_PATH = "payment-instruments";
const MEMBERS_PATH = "members";
const RESERVE_RULES_PATH = "reserve-rules";
const REQUIREMENTS_PATH = "requirements";

private $filesApiClient;

Expand Down Expand Up @@ -353,4 +354,59 @@ public function retrieveFile($entityId, $fileId)
$this->sdkAuthorization()
);
}

/**
* Get entity requirements
*
* Retrieve the list of pending requirements for a sub-entity.
*
* @param string $entityId The sub-entity's ID (Required)
* @return array
* @throws CheckoutApiException
*/
public function getEntityRequirements($entityId)
{
return $this->apiClient->get(
$this->buildPath(self::ACCOUNTS_PATH, self::ENTITIES_PATH, $entityId, self::REQUIREMENTS_PATH),
$this->sdkAuthorization()
);
}

/**
* Get entity requirement details
*
* Retrieve detailed information about a specific requirement.
*
* @param string $entityId The sub-entity's ID (Required)
* @param string $requirementId The requirement ID (Required)
* @return array
* @throws CheckoutApiException
*/
public function getEntityRequirementDetails($entityId, $requirementId)
{
return $this->apiClient->get(
$this->buildPath(self::ACCOUNTS_PATH, self::ENTITIES_PATH, $entityId, self::REQUIREMENTS_PATH, $requirementId),
$this->sdkAuthorization()
);
}

/**
* Resolve entity requirement
*
* Submit a response to resolve a pending requirement.
*
* @param string $entityId The sub-entity's ID (Required)
* @param string $requirementId The requirement ID (Required)
* @param EntityRequirementUpdateRequest $request The requirement resolution request (Required)
* @return array
* @throws CheckoutApiException
*/
public function resolveEntityRequirement($entityId, $requirementId, EntityRequirementUpdateRequest $request)
{
return $this->apiClient->put(
$this->buildPath(self::ACCOUNTS_PATH, self::ENTITIES_PATH, $entityId, self::REQUIREMENTS_PATH, $requirementId),
$request,
$this->sdkAuthorization()
);
}
}
18 changes: 18 additions & 0 deletions lib/Checkout/Accounts/EntityRequirementUpdateRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace Checkout\Accounts;

/**
* Request body used to resolve a requirement.
*/
class EntityRequirementUpdateRequest
{
/**
* @var mixed
* [Required]
* The response to the requirement. The expected shape depends on the requirement
* and is defined by the JSON Schema returned in the requirement details response.
* Common shapes include a file reference, a primitive value, or a structured object.
*/
public $value;
}
14 changes: 14 additions & 0 deletions lib/Checkout/CheckoutApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use Checkout\Issuing\IssuingClient;
use Checkout\Metadata\MetadataClient;
use Checkout\NetworkTokens\NetworkTokensClient;
use Checkout\OnboardingSimulator\OnboardingSimulatorClient;
use Checkout\Payments\ApplePay\ApplePayClient;
use Checkout\Payments\GooglePay\GooglePayClient;
use Checkout\Payments\Contexts\PaymentContextsClient;
Expand Down Expand Up @@ -88,6 +89,8 @@ final class CheckoutApi extends CheckoutApmApi

private $googlePayClient;

private $onboardingSimulatorClient;

public function __construct(CheckoutConfiguration $configuration)
{
$baseApiClient = $this->getBaseApiClient($configuration);
Expand Down Expand Up @@ -146,6 +149,7 @@ public function __construct(CheckoutConfiguration $configuration)
$this->standaloneAccountUpdaterClient = new StandaloneAccountUpdaterClient($baseApiClient, $configuration);
$this->applePayClient = new ApplePayClient($baseApiClient, $configuration);
$this->agenticCommerceClient = new AgenticCommerceClient($baseApiClient, $configuration);
$this->onboardingSimulatorClient = new OnboardingSimulatorClient($baseApiClient, $configuration);
$this->complianceRequestsClient = new ComplianceRequestsClient($baseApiClient, $configuration);
$this->googlePayClient = new GooglePayClient($baseApiClient, $configuration);
}
Expand Down Expand Up @@ -428,7 +432,17 @@ public function getGooglePayClient()
return $this->googlePayClient;
}

/**Client for account onboarding simulator endpoints (sandbox testing).
*
* @return OnboardingSimulatorClient
*/
public function getOnboardingSimulatorClient()
{
return $this->onboardingSimulatorClient;
}

/**
*
* @param CheckoutConfiguration $configuration
* @return ApiClient
*/
Expand Down
83 changes: 83 additions & 0 deletions lib/Checkout/Disputes/CompellingEvidence.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?php

namespace Checkout\Disputes;

class CompellingEvidence
{
/**
* Value can be either "Merchandise" or "Services".
* [Required]
* @var string $merchandise_or_service
*/
public $merchandise_or_service;

/**
* Description of the merchandise or service that this transaction was for.
* [Required]
* min 1 characters
* max 5000 characters
* @var string $merchandise_or_service_desc
*/
public $merchandise_or_service_desc;

/**
* The date and time the merchandise or service was provided, in UTC format.
* [Required]
* Format: date-time
* @var string $merchandise_or_service_provided_date
*/
public $merchandise_or_service_provided_date;

/**
* Status of the order. Only valid if merchandise_or_service is equal to "Merchandise".
* [Optional]
* @var string|null $shipping_delivery_status
*/
public $shipping_delivery_status;

/**
* Tracking of the order. Only valid if merchandise_or_service is equal to "Merchandise".
* [Optional]
* max 50 characters
* @var string|null $tracking_information
*/
public $tracking_information;

Check warning on line 44 in lib/Checkout/Disputes/CompellingEvidence.php

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this field "$tracking_information" to match the regular expression ^[a-z][a-zA-Z0-9]*$.

See more on https://sonarcloud.io/project/issues?id=checkout_checkout-sdk-php&issues=AZ5zO3EfGLloVduTZeE4&open=AZ5zO3EfGLloVduTZeE4&pullRequest=339

/**
* User ID is synonymous to Customer Account/log in ID.
* [Optional]
* max 50 characters
* @var string|null $user_id
*/
public $user_id;

Check warning on line 52 in lib/Checkout/Disputes/CompellingEvidence.php

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this field "$user_id" to match the regular expression ^[a-z][a-zA-Z0-9]*$.

See more on https://sonarcloud.io/project/issues?id=checkout_checkout-sdk-php&issues=AZ5zO3EfGLloVduTZeE5&open=AZ5zO3EfGLloVduTZeE5&pullRequest=339

/**
* IpAddress used in the transaction. Should be either IPV4 or IPV6.
* [Optional]
* @var string|null $ip_address
*/
public $ip_address;

/**
* Device used in the transaction.
* [Optional]
* min 15 characters
* max 64 characters
* @var string|null $device_id
*/
public $device_id;

Check warning on line 68 in lib/Checkout/Disputes/CompellingEvidence.php

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this field "$device_id" to match the regular expression ^[a-z][a-zA-Z0-9]*$.

See more on https://sonarcloud.io/project/issues?id=checkout_checkout-sdk-php&issues=AZ5zO3EfGLloVduTZeE7&open=AZ5zO3EfGLloVduTZeE7&pullRequest=339

/**
* The shipping address provided for this transaction.
* [Optional]
* @var array|null $shipping_address
*/
public $shipping_address;

Check warning on line 75 in lib/Checkout/Disputes/CompellingEvidence.php

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this field "$shipping_address" to match the regular expression ^[a-z][a-zA-Z0-9]*$.

See more on https://sonarcloud.io/project/issues?id=checkout_checkout-sdk-php&issues=AZ5zO3EfGLloVduTZeE8&open=AZ5zO3EfGLloVduTZeE8&pullRequest=339

/**
* List of historical transactions. At least two transactions.
* [Required]
* @var array $historical_transactions
*/
public $historical_transactions;

Check warning on line 82 in lib/Checkout/Disputes/CompellingEvidence.php

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this field "$historical_transactions" to match the regular expression ^[a-z][a-zA-Z0-9]*$.

See more on https://sonarcloud.io/project/issues?id=checkout_checkout-sdk-php&issues=AZ5zO3EfGLloVduTZeE9&open=AZ5zO3EfGLloVduTZeE9&pullRequest=339
}
37 changes: 37 additions & 0 deletions lib/Checkout/Disputes/DisputeEvidenceRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace Checkout\Disputes;

use Checkout\Disputes\CompellingEvidence;

class DisputeEvidenceRequest
{
/**
Expand Down Expand Up @@ -83,4 +85,39 @@
* @var string
*/
public $proof_of_delivery_or_service_date_text;

/**
* Supporting evidence files for arbitration where no review is requested.
* [Optional]
* @var string|null $arbitration_no_review_files
*/
public $arbitration_no_review_files;

/**
* Supporting evidence text for arbitration where no review is requested.
* [Optional]
* @var string|null $arbitration_no_review_text
*/
public $arbitration_no_review_text;

Check warning on line 101 in lib/Checkout/Disputes/DisputeEvidenceRequest.php

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this field "$arbitration_no_review_text" to match the regular expression ^[a-z][a-zA-Z0-9]*$.

See more on https://sonarcloud.io/project/issues?id=checkout_checkout-sdk-php&issues=AZ5zO3E7GLloVduTZeE_&open=AZ5zO3E7GLloVduTZeE_&pullRequest=339

/**
* Supporting evidence files for arbitration where a review is required.
* [Optional]
* @var string|null $arbitration_review_required_files
*/
public $arbitration_review_required_files;

/**
* Supporting evidence text for arbitration where a review is required.
* [Optional]
* @var string|null $arbitration_review_required_text
*/
public $arbitration_review_required_text;

/**
* Compelling evidence for the dispute.
* [Optional]
* @var CompellingEvidence|null $compelling_evidence
*/
public $compelling_evidence;

Check warning on line 122 in lib/Checkout/Disputes/DisputeEvidenceRequest.php

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this field "$compelling_evidence" to match the regular expression ^[a-z][a-zA-Z0-9]*$.

See more on https://sonarcloud.io/project/issues?id=checkout_checkout-sdk-php&issues=AZ5zO3E7GLloVduTZeFC&open=AZ5zO3E7GLloVduTZeFC&pullRequest=339
}
14 changes: 14 additions & 0 deletions lib/Checkout/Forward/Requests/DestinationRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,18 @@ class DestinationRequest
*/
public $signature;

/**
* The query parameters to include in the forward request. (Optional)
*
* @var array
*/
public $query;

/**
* Placeholder variables to substitute in the body. (Optional)
*
* @var array
*/
public $variables;

}
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ public function __construct()
*/
public $account_holder;

/**
* @var BankDetails
*/
public $bank_details;

/**
* @var BankDetails
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ public function __construct()
*/
public $account_holder;

/**
* @var \Checkout\Instruments\Create\UpdateCustomerRequest
*/
public $customer;

}
17 changes: 17 additions & 0 deletions lib/Checkout/Instruments/InstrumentsClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class InstrumentsClient extends Client
{
const INSTRUMENTS_PATH = "instruments";
const VALIDATION_PATH = "validation/bank-accounts";
const REVOKE_PATH = "revoke";

public function __construct(ApiClient $apiClient, CheckoutConfiguration $configuration)
{
Expand Down Expand Up @@ -71,6 +72,22 @@ public function delete($instrumentId): array
), $this->sdkAuthorization());
}

/**
* Revoke an instrument, preventing it from being used for future transactions.
*
* @param $instrumentId
* @return array
* @throws CheckoutApiException
*/
public function revoke($instrumentId): array
{
return $this->apiClient->patch($this->buildPath(
self::INSTRUMENTS_PATH,
$instrumentId,
self::REVOKE_PATH
), null, $this->sdkAuthorization());
}

/**
* @param $country_code
* @param $currency
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function __construct()
/**
* @var BankDetails
*/
public $bank_details;
public $bank;

/**
* @var UpdateCustomerRequest
Expand Down
10 changes: 10 additions & 0 deletions lib/Checkout/Issuing/Cards/Create/CardRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,14 @@ protected function __construct($type)
* @var bool
*/
public $activate_card;

/**
* @var array
*/
public $metadata;

/**
* @var string
*/
public $revocation_date;
}
15 changes: 15 additions & 0 deletions lib/Checkout/Issuing/Cards/Create/VirtualCardRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,19 @@
* @var boolean
*/
public $is_single_use;

/**
* @var array
*/
public $return_credentials;

Check warning on line 22 in lib/Checkout/Issuing/Cards/Create/VirtualCardRequest.php

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this field "$return_credentials" to match the regular expression ^[a-z][a-zA-Z0-9]*$.

See more on https://sonarcloud.io/project/issues?id=checkout_checkout-sdk-php&issues=AZ5zTjkABxk6ZGD-BYYk&open=AZ5zTjkABxk6ZGD-BYYk&pullRequest=339

/**
* @var array
*/
public $controls;

/**
* @var array
*/
public $control_profiles;
}
Loading
Loading