Skip to content

Use prefixed SumUp SDK on PHP 8.2+#29

Merged
kilbot merged 12 commits into
mainfrom
feature/prefixed-sumup-sdk-hybrid
May 26, 2026
Merged

Use prefixed SumUp SDK on PHP 8.2+#29
kilbot merged 12 commits into
mainfrom
feature/prefixed-sumup-sdk-hybrid

Conversation

@kilbot

@kilbot kilbot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • removes the unused SumUp ecommerce SDK dependency
  • adds a prefixed official SumUp PHP SDK build for PHP 8.2+
  • keeps WordPress HTTP as the compatibility client for PHP 7.4-8.1
  • shows settings status explaining which client is active
  • documents the hybrid strategy in an ADR

Closes #28

Validation

  • composer run lint (fails on the repository's existing PHPCS baseline, including missing package/doc comments and legacy Gateway escaping/doc issues; no syntax/regression failures)
  • php tests/regression/pairing-request-includes-name.php
  • php tests/regression/activation-guard.php
  • php tests/regression/prefixed-sdk-autoload-is-conditional.php
  • php tests/regression/sdk-compatibility-message.php
  • php tests/regression/sdk-reader-normalization.php
  • php -l sumup-terminal-for-woocommerce.php
  • find includes -name '*.php' -print0 | xargs -0 -n1 php -l

Summary by CodeRabbit

  • New Features

    • Hybrid SumUp integration: uses bundled SDK on PHP 8.2+ with automatic fallback to compatibility client on older PHP
    • Admin UI displays SumUp SDK availability/status and compatibility messaging
  • Improvements

    • Bundled, prefixed SumUp SDK included and conditionally loaded based on PHP version
    • Activation/runtime PHP version guard to prevent incompatible installs
  • Documentation

    • Added ADR documenting the hybrid SDK/compatibility approach
  • Tests

    • New regression tests validating activation guard, conditional autoloading, SDK messages, and reader normalization

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: wcpos/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9ad625e9-4b20-494c-9e66-33f1d4abf1aa

📥 Commits

Reviewing files that changed from the base of the PR and between 0904aeb and c37e9ba.

📒 Files selected for processing (7)
  • includes/Services/WordPressHttpReaderApiClient.php
  • tools/generate-prefixed-sumup-autoload.php
  • tools/prefix-sumup-sdk-namespaces.php
  • vendor_prefixed/sumup-sdk/HttpClient/CurlClient.php
  • vendor_prefixed/sumup-sdk/Memberships/Memberships.php
  • vendor_prefixed/sumup-sdk/Readers/Readers.php
  • vendor_prefixed/sumup-sdk/RequestEncoder.php

📝 Walkthrough

<review_stack_artifact>

</review_stack_artifact>

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/prefixed-sumup-sdk-hybrid

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e51e4ccf9e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread includes/Gateway.php
Comment thread includes/Services/SdkReaderApiClient.php

kilbot commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the actionable review feedback in one commit.

Thread File Issue Decision Commit
PRRT_kwDOPQtztc6E6Ijb Gateway.php admin_options() called missing get_sdk_status_html() and could fatal on gateway settings load. Fixed by adding the SDK status renderer using the existing SdkAvailability status message. 0904aeb
PRRT_kwDOPQtztc6E6Ijd SdkReaderApiClient.php SDK checkout response kept camelCase keys, so client_transaction_id was not saved. Fixed by recursively normalizing decoded checkout response keys to snake_case and extending the regression test. 0904aeb

Excluded threads: none.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@includes/Gateway.php`:
- Around line 154-155: The call to $this->get_sdk_status_html() in class Gateway
is calling a non-existent method and will fatal; either implement a
get_sdk_status_html() method on the Gateway class (or its parent/trait) that
returns the expected HTML string, or replace the call with the correct existing
method name if misnamed (search for similar helpers), and ensure the new/renamed
method is declared in the same class or an imported trait so
includes/Gateway.php no longer references an undefined symbol.

In `@includes/Services/WordPressHttpReaderApiClient.php`:
- Around line 126-140: cancel_checkout currently treats a false response from
parent::post() as success because ! is_wp_error(false) is true; update
cancel_checkout (the method calling
parent::post("/merchants/{$this->get_merchant_id()}/readers/{$reader_id}/terminate"))
to explicitly check for a boolean false return before treating the call as
successful (e.g. if $response === false || is_wp_error($response) return false;
otherwise return true), ensuring both network failure (false) and WP_Error are
handled as failures.

In `@tools/generate-prefixed-sumup-autoload.php`:
- Line 76: file_put_contents call that writes $autoload to $root .
'/vendor_prefixed/sumup-sdk-autoload.php' can fail silently; check the return
value and fail fast: after calling file_put_contents($root .
'/vendor_prefixed/sumup-sdk-autoload.php', $autoload) verify it returned !==
false (and ideally matched strlen($autoload)), and if it failed throw an
exception or call exit(1) with a clear error via error_log/processLogger so the
script stops rather than leaving a stale/missing autoload file.

In `@tools/prefix-sumup-sdk-namespaces.php`:
- Around line 22-27: Guard file read/replace/write so a single failure won't
corrupt the vendored SDK: after calling file_get_contents($path) check for false
and skip/log the file; perform each preg_replace into temporary vars and verify
the return is not null (and check preg_last_error()) before applying the next
replacement; only call file_put_contents($path, $contents) when all replacements
succeeded and file_put_contents does not return false; use $path, $contents and
the three preg_replace calls as the unique references to locate and protect
these operations.

In `@vendor_prefixed/sumup-sdk/HttpClient/CurlClient.php`:
- Around line 83-87: The code calls curl_init() in CurlClient and immediately
passes its return ($ch) into curl_setopt() without checking for failure; update
the request path in the CurlClient implementation (the method that initializes
$ch) to check if $ch === false and throw the SDK's ConnectionException with a
clear message and diagnostic details (use curl_error() and curl_errno() when
available) before any curl_setopt() calls so failures are handled explicitly
instead of causing downstream warnings/errors.

In `@vendor_prefixed/sumup-sdk/Memberships/Memberships.php`:
- Around line 87-100: The current serialization omits explicit nulls for
resource.parent.id/resource.parent.type because it uses isset/http_build_query;
add explicit presence flags (e.g., public bool $resourceParentIdPresent = false
and public bool $resourceParentTypePresent = false) and update the
request-parameter assembly logic to include the resource.parent.id and
resource.parent.type keys when their corresponding Present flag is true (even if
the value is null), rather than relying on isset; apply the same change for the
other pair referenced at lines 184-195 so callers can represent “explicit null”
parent filters on the wire.

In `@vendor_prefixed/sumup-sdk/Readers/Readers.php`:
- Around line 102-105: The fromArray method in Readers::fromArray currently
ignores the input array and should fail-fast on unexpected keys; update
Readers::fromArray to check if the provided $data is empty (or contains only
allowed keys) and throw a clear exception (e.g., InvalidArgumentException) when
non-empty/unexpected keys are present so callers are not silently ignored;
reference the Readers::fromArray method and the $data parameter when adding the
guard and exception.

In `@vendor_prefixed/sumup-sdk/RequestEncoder.php`:
- Around line 21-23: The early return for arrays in RequestEncoder.php skips
normalization (the if (is_array($value)) { return $value; }) so nested
enums/objects are not processed; change this to route arrays through the
normalizer instead (e.g., return $this->normalize($value) or
self::normalize($value) depending on context) so each array element is
normalized; apply the same change to the other array-returning branch referenced
(lines ~44-51) so both code paths call the normalize method rather than
returning arrays raw.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: wcpos/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5d2489d6-c70c-43a9-86e6-36e24cae2867

📥 Commits

Reviewing files that changed from the base of the PR and between 83df53c and e51e4cc.

📒 Files selected for processing (183)
  • composer.json
  • docs/adr/0001-sumup-sdk-hybrid.md
  • includes/Gateway.php
  • includes/Services/ReaderApiClientFactory.php
  • includes/Services/ReaderApiClientInterface.php
  • includes/Services/ReaderService.php
  • includes/Services/SdkAvailability.php
  • includes/Services/SdkReaderApiClient.php
  • includes/Services/WordPressHttpReaderApiClient.php
  • php-scoper/composer.json
  • php-scoper/scoper.inc.php
  • sumup-terminal-for-woocommerce.php
  • tests/regression/activation-guard.php
  • tests/regression/prefixed-sdk-autoload-is-conditional.php
  • tests/regression/sdk-compatibility-message.php
  • tests/regression/sdk-reader-normalization.php
  • tools/generate-prefixed-sumup-autoload.php
  • tools/prefix-sumup-sdk-namespaces.php
  • vendor_prefixed/sumup-sdk-autoload.php
  • vendor_prefixed/sumup-sdk/ApiVersion.php
  • vendor_prefixed/sumup-sdk/Checkouts/Checkouts.php
  • vendor_prefixed/sumup-sdk/Customers/Customers.php
  • vendor_prefixed/sumup-sdk/Exception/ApiException.php
  • vendor_prefixed/sumup-sdk/Exception/ArgumentException.php
  • vendor_prefixed/sumup-sdk/Exception/ConfigurationException.php
  • vendor_prefixed/sumup-sdk/Exception/ConnectionException.php
  • vendor_prefixed/sumup-sdk/Exception/ErrorEnvelope.php
  • vendor_prefixed/sumup-sdk/Exception/SDKException.php
  • vendor_prefixed/sumup-sdk/Exception/UnexpectedApiException.php
  • vendor_prefixed/sumup-sdk/ExceptionMessages.php
  • vendor_prefixed/sumup-sdk/HttpClient/CurlClient.php
  • vendor_prefixed/sumup-sdk/HttpClient/GuzzleClient.php
  • vendor_prefixed/sumup-sdk/HttpClient/HttpClientInterface.php
  • vendor_prefixed/sumup-sdk/HttpClient/RequestHeaders.php
  • vendor_prefixed/sumup-sdk/HttpClient/RequestOptions.php
  • vendor_prefixed/sumup-sdk/HttpClient/Response.php
  • vendor_prefixed/sumup-sdk/Hydrator.php
  • vendor_prefixed/sumup-sdk/Members/Members.php
  • vendor_prefixed/sumup-sdk/Memberships/Memberships.php
  • vendor_prefixed/sumup-sdk/Merchants/Merchants.php
  • vendor_prefixed/sumup-sdk/Payouts/Payouts.php
  • vendor_prefixed/sumup-sdk/Readers/Readers.php
  • vendor_prefixed/sumup-sdk/Receipts/Receipts.php
  • vendor_prefixed/sumup-sdk/RequestEncoder.php
  • vendor_prefixed/sumup-sdk/ResponseDecoder.php
  • vendor_prefixed/sumup-sdk/Roles/Roles.php
  • vendor_prefixed/sumup-sdk/SdkInfo.php
  • vendor_prefixed/sumup-sdk/Services/SumUpService.php
  • vendor_prefixed/sumup-sdk/Shared/Shared.php
  • vendor_prefixed/sumup-sdk/SumUp.php
  • vendor_prefixed/sumup-sdk/Transactions/Transactions.php
  • vendor_prefixed/sumup-sdk/Types/Address.php
  • vendor_prefixed/sumup-sdk/Types/AddressLegacy.php
  • vendor_prefixed/sumup-sdk/Types/BadRequest.php
  • vendor_prefixed/sumup-sdk/Types/BadRequestErrors.php
  • vendor_prefixed/sumup-sdk/Types/BadRequestErrorsType.php
  • vendor_prefixed/sumup-sdk/Types/BasePerson.php
  • vendor_prefixed/sumup-sdk/Types/Branding.php
  • vendor_prefixed/sumup-sdk/Types/BusinessProfile.php
  • vendor_prefixed/sumup-sdk/Types/Card.php
  • vendor_prefixed/sumup-sdk/Types/CardExpiryMonth.php
  • vendor_prefixed/sumup-sdk/Types/CardResponse.php
  • vendor_prefixed/sumup-sdk/Types/CardResponseType.php
  • vendor_prefixed/sumup-sdk/Types/CardType.php
  • vendor_prefixed/sumup-sdk/Types/Checkout.php
  • vendor_prefixed/sumup-sdk/Types/CheckoutAccepted.php
  • vendor_prefixed/sumup-sdk/Types/CheckoutAcceptedNextStep.php
  • vendor_prefixed/sumup-sdk/Types/CheckoutCreateRequest.php
  • vendor_prefixed/sumup-sdk/Types/CheckoutCreateRequestCurrency.php
  • vendor_prefixed/sumup-sdk/Types/CheckoutCreateRequestPurpose.php
  • vendor_prefixed/sumup-sdk/Types/CheckoutCurrency.php
  • vendor_prefixed/sumup-sdk/Types/CheckoutStatus.php
  • vendor_prefixed/sumup-sdk/Types/CheckoutSuccess.php
  • vendor_prefixed/sumup-sdk/Types/CheckoutSuccessPaymentInstrument.php
  • vendor_prefixed/sumup-sdk/Types/ClassicMerchantIdentifiers.php
  • vendor_prefixed/sumup-sdk/Types/Company.php
  • vendor_prefixed/sumup-sdk/Types/CompanyIdentifier.php
  • vendor_prefixed/sumup-sdk/Types/CreateReaderCheckoutError.php
  • vendor_prefixed/sumup-sdk/Types/CreateReaderCheckoutErrorErrors.php
  • vendor_prefixed/sumup-sdk/Types/CreateReaderCheckoutRequest.php
  • vendor_prefixed/sumup-sdk/Types/CreateReaderCheckoutRequestAade.php
  • vendor_prefixed/sumup-sdk/Types/CreateReaderCheckoutRequestAffiliate.php
  • vendor_prefixed/sumup-sdk/Types/CreateReaderCheckoutRequestCardType.php
  • vendor_prefixed/sumup-sdk/Types/CreateReaderCheckoutRequestTotalAmount.php
  • vendor_prefixed/sumup-sdk/Types/CreateReaderCheckoutResponse.php
  • vendor_prefixed/sumup-sdk/Types/CreateReaderCheckoutResponseData.php
  • vendor_prefixed/sumup-sdk/Types/CreateReaderCheckoutUnprocessableEntity.php
  • vendor_prefixed/sumup-sdk/Types/CreateReaderTerminateError.php
  • vendor_prefixed/sumup-sdk/Types/CreateReaderTerminateErrorErrors.php
  • vendor_prefixed/sumup-sdk/Types/CreateReaderTerminateUnprocessableEntity.php
  • vendor_prefixed/sumup-sdk/Types/Customer.php
  • vendor_prefixed/sumup-sdk/Types/DetailsError.php
  • vendor_prefixed/sumup-sdk/Types/Device.php
  • vendor_prefixed/sumup-sdk/Types/ElvCardAccount.php
  • vendor_prefixed/sumup-sdk/Types/Error.php
  • vendor_prefixed/sumup-sdk/Types/ErrorExtended.php
  • vendor_prefixed/sumup-sdk/Types/ErrorForbidden.php
  • vendor_prefixed/sumup-sdk/Types/Event.php
  • vendor_prefixed/sumup-sdk/Types/EventStatus.php
  • vendor_prefixed/sumup-sdk/Types/EventType.php
  • vendor_prefixed/sumup-sdk/Types/FinancialPayout.php
  • vendor_prefixed/sumup-sdk/Types/FinancialPayoutStatus.php
  • vendor_prefixed/sumup-sdk/Types/FinancialPayoutType.php
  • vendor_prefixed/sumup-sdk/Types/HostedCheckout.php
  • vendor_prefixed/sumup-sdk/Types/Invite.php
  • vendor_prefixed/sumup-sdk/Types/Link.php
  • vendor_prefixed/sumup-sdk/Types/ListPersonsResponseBody.php
  • vendor_prefixed/sumup-sdk/Types/MandatePayload.php
  • vendor_prefixed/sumup-sdk/Types/MandatePayloadType.php
  • vendor_prefixed/sumup-sdk/Types/MandateResponse.php
  • vendor_prefixed/sumup-sdk/Types/MandateResponseStatus.php
  • vendor_prefixed/sumup-sdk/Types/Member.php
  • vendor_prefixed/sumup-sdk/Types/MemberStatus.php
  • vendor_prefixed/sumup-sdk/Types/Membership.php
  • vendor_prefixed/sumup-sdk/Types/MembershipResource.php
  • vendor_prefixed/sumup-sdk/Types/MembershipStatus.php
  • vendor_prefixed/sumup-sdk/Types/MembershipUser.php
  • vendor_prefixed/sumup-sdk/Types/MembershipUserClassic.php
  • vendor_prefixed/sumup-sdk/Types/Merchant.php
  • vendor_prefixed/sumup-sdk/Types/NotFound.php
  • vendor_prefixed/sumup-sdk/Types/NotFoundErrors.php
  • vendor_prefixed/sumup-sdk/Types/Ownership.php
  • vendor_prefixed/sumup-sdk/Types/PaymentInstrumentResponse.php
  • vendor_prefixed/sumup-sdk/Types/PaymentInstrumentResponseCard.php
  • vendor_prefixed/sumup-sdk/Types/PaymentInstrumentResponseCardType.php
  • vendor_prefixed/sumup-sdk/Types/PaymentInstrumentResponseType.php
  • vendor_prefixed/sumup-sdk/Types/Person.php
  • vendor_prefixed/sumup-sdk/Types/PersonalDetails.php
  • vendor_prefixed/sumup-sdk/Types/PersonalIdentifier.php
  • vendor_prefixed/sumup-sdk/Types/Problem.php
  • vendor_prefixed/sumup-sdk/Types/ProcessCheckout.php
  • vendor_prefixed/sumup-sdk/Types/ProcessCheckoutPaymentType.php
  • vendor_prefixed/sumup-sdk/Types/Product.php
  • vendor_prefixed/sumup-sdk/Types/Reader.php
  • vendor_prefixed/sumup-sdk/Types/ReaderDevice.php
  • vendor_prefixed/sumup-sdk/Types/ReaderDeviceModel.php
  • vendor_prefixed/sumup-sdk/Types/ReaderStatus.php
  • vendor_prefixed/sumup-sdk/Types/Receipt.php
  • vendor_prefixed/sumup-sdk/Types/ReceiptAcquirerData.php
  • vendor_prefixed/sumup-sdk/Types/ReceiptCard.php
  • vendor_prefixed/sumup-sdk/Types/ReceiptEvent.php
  • vendor_prefixed/sumup-sdk/Types/ReceiptEventStatus.php
  • vendor_prefixed/sumup-sdk/Types/ReceiptEventType.php
  • vendor_prefixed/sumup-sdk/Types/ReceiptMerchantData.php
  • vendor_prefixed/sumup-sdk/Types/ReceiptMerchantDataMerchantProfile.php
  • vendor_prefixed/sumup-sdk/Types/ReceiptMerchantDataMerchantProfileAddress.php
  • vendor_prefixed/sumup-sdk/Types/ReceiptReader.php
  • vendor_prefixed/sumup-sdk/Types/ReceiptTransaction.php
  • vendor_prefixed/sumup-sdk/Types/ReceiptTransactionProcessAs.php
  • vendor_prefixed/sumup-sdk/Types/Role.php
  • vendor_prefixed/sumup-sdk/Types/StatusResponse.php
  • vendor_prefixed/sumup-sdk/Types/StatusResponseData.php
  • vendor_prefixed/sumup-sdk/Types/StatusResponseDataConnectionType.php
  • vendor_prefixed/sumup-sdk/Types/StatusResponseDataState.php
  • vendor_prefixed/sumup-sdk/Types/StatusResponseDataStatus.php
  • vendor_prefixed/sumup-sdk/Types/Timestamps.php
  • vendor_prefixed/sumup-sdk/Types/TransactionBase.php
  • vendor_prefixed/sumup-sdk/Types/TransactionBaseCurrency.php
  • vendor_prefixed/sumup-sdk/Types/TransactionBasePaymentType.php
  • vendor_prefixed/sumup-sdk/Types/TransactionBaseStatus.php
  • vendor_prefixed/sumup-sdk/Types/TransactionCheckoutInfo.php
  • vendor_prefixed/sumup-sdk/Types/TransactionCheckoutInfoEntryMode.php
  • vendor_prefixed/sumup-sdk/Types/TransactionEvent.php
  • vendor_prefixed/sumup-sdk/Types/TransactionEventEventType.php
  • vendor_prefixed/sumup-sdk/Types/TransactionEventStatus.php
  • vendor_prefixed/sumup-sdk/Types/TransactionFull.php
  • vendor_prefixed/sumup-sdk/Types/TransactionFullLocation.php
  • vendor_prefixed/sumup-sdk/Types/TransactionFullPayoutType.php
  • vendor_prefixed/sumup-sdk/Types/TransactionFullProcessAs.php
  • vendor_prefixed/sumup-sdk/Types/TransactionFullSimplePaymentType.php
  • vendor_prefixed/sumup-sdk/Types/TransactionFullSimpleStatus.php
  • vendor_prefixed/sumup-sdk/Types/TransactionFullVerificationMethod.php
  • vendor_prefixed/sumup-sdk/Types/TransactionHistory.php
  • vendor_prefixed/sumup-sdk/Types/TransactionHistoryCardType.php
  • vendor_prefixed/sumup-sdk/Types/TransactionHistoryPayoutType.php
  • vendor_prefixed/sumup-sdk/Types/TransactionHistoryType.php
  • vendor_prefixed/sumup-sdk/Types/TransactionMixinHistory.php
  • vendor_prefixed/sumup-sdk/Types/TransactionMixinHistoryPayoutPlan.php
  • vendor_prefixed/sumup-sdk/Types/TransactionsHistoryLink.php
  • vendor_prefixed/sumup-sdk/Types/Unauthorized.php
  • vendor_prefixed/sumup-sdk/Types/UnauthorizedErrors.php
  • vendor_prefixed/sumup-sdk/Types/UnauthorizedErrorsType.php
  • vendor_prefixed/sumup-sdk/Version.php

Comment thread includes/Gateway.php
Comment thread includes/Services/WordPressHttpReaderApiClient.php
Comment thread tools/generate-prefixed-sumup-autoload.php Outdated
Comment thread tools/prefix-sumup-sdk-namespaces.php
Comment thread vendor_prefixed/sumup-sdk/HttpClient/CurlClient.php
Comment thread vendor_prefixed/sumup-sdk/Memberships/Memberships.php
Comment thread vendor_prefixed/sumup-sdk/Readers/Readers.php
Comment thread vendor_prefixed/sumup-sdk/RequestEncoder.php
@wcpos-bot

wcpos-bot Bot commented May 26, 2026

Copy link
Copy Markdown

Addressed the current readiness audit feedback in one commit.

Thread File Issue Decision Commit
PRRT_kwDOPQtztc6E6QVk WordPressHttpReaderApiClient.php cancel_checkout() treated parent::post() returning false as success. Fixed: return false for false or WP_Error; return true otherwise. c37e9ba
PRRT_kwDOPQtztc6E6QV7 generate-prefixed-sumup-autoload.php Autoload generation did not check file_put_contents(). Fixed: fail fast on failed or short writes. c37e9ba
PRRT_kwDOPQtztc6E6QWA prefix-sumup-sdk-namespaces.php Namespace prefix tool did not guard read, regex, or write failures. Fixed: guard file reads, each preg_replace() plus preg_last_error(), and writes before mutating files. c37e9ba
PRRT_kwDOPQtztc6E6QWh CurlClient.php curl_init() failure was not checked before curl_setopt(). Fixed: throw SDK ConnectionException when cURL handle creation fails. c37e9ba
PRRT_kwDOPQtztc6E6QW0 Memberships.php Nullable parent filters were documented but could not be represented on the wire. Fixed after verification: add explicit presence flags and serialize null parent filters as present empty query values. c37e9ba
PRRT_kwDOPQtztc6E6QW9 Readers.php Empty terminate DTO ignored non-empty array input. Fixed: reject unexpected payload fields. c37e9ba
PRRT_kwDOPQtztc6E6QXD RequestEncoder.php Top-level arrays skipped normalization for nested enums/objects. Fixed: route array inputs through normalize(). c37e9ba

Excluded threads: none.

kilbot commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the current readiness audit feedback in c37e9ba.

Thread File Issue Decision Commit
PRRT_kwDOPQtztc6E6QVk WordPressHttpReaderApiClient.php cancel_checkout() treated parent::post() false as success. Fixed by returning false for false or WP_Error and true otherwise. c37e9ba
PRRT_kwDOPQtztc6E6QV7 generate-prefixed-sumup-autoload.php Autoload generation did not check write failure or short writes. Fixed by checking file_put_contents() and failing fast. c37e9ba
PRRT_kwDOPQtztc6E6QWA prefix-sumup-sdk-namespaces.php Prefixing script could continue after read, regex, or write failures. Fixed by guarding reads, each regex result plus preg_last_error(), and writes. c37e9ba
PRRT_kwDOPQtztc6E6QWh CurlClient.php curl_init() was used before checking for false. Fixed by throwing SDK ConnectionException before curl_setopt() if init fails. c37e9ba
PRRT_kwDOPQtztc6E6QW0 Memberships.php Explicit null parent filters were documented but not serializable. Fixed after verifying SumUp documents nullable parent filters; added presence flags and serialization. c37e9ba
PRRT_kwDOPQtztc6E6QW9 Readers.php Terminate checkout DTO silently ignored unexpected payload fields. Fixed by rejecting non-empty arrays in fromArray(). c37e9ba
PRRT_kwDOPQtztc6E6QXD RequestEncoder.php Top-level array payloads skipped nested enum/object normalization. Fixed by routing arrays through RequestEncoder::normalize(). c37e9ba

Excluded threads: none.

@kilbot kilbot merged commit 2934f58 into main May 26, 2026
6 checks passed
@kilbot kilbot deleted the feature/prefixed-sumup-sdk-hybrid branch May 26, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Research whether Terminal API code should use the official SumUp PHP SDK

2 participants