Repository navigation
[CC-3628] Remove deprecated code - #231
Draft
Ryouzanpaku wants to merge 21 commits into
Draft
Ryouzanpaku wants to merge 21 commits into
Ryouzanpaku wants to merge 21 commits into
Conversation
… examples, and deprecated API methods - Remove examples folder (CC-777) - Remove InstallmentSecured, InvoiceSecured, Invoice, SepaDirectDebitSecured, HirePurchase payment types and all related source/test files (CC-3628) - Remove all deprecated methods: authorize(), charge(), chargeAuthorization(), chargePayment(), fetchInstallmentPlans(), setKey() (CC-3663) - Replace HttpService::send() with sendRequest(ApiRequest) in ResourceService - Update BasketItem and Basket to V2 API only (remove V1 properties) - Fix test helpers to use performAuthorization() and performCharge() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ate source delegation - Update CanAuthorize::authorize() and CanDirectCharge::charge() traits to delegate to performAuthorization()/performCharge() instead of removed methods - Update Payment::charge() and Authorization::charge() to delegate to performChargeOnPayment() - Add Charge import to Authorization.php - Fix ChargeAfterAuthorizationTest to use performChargeOnPayment() - Update CanAuthorizeTest and CanDirectChargeTest to mock new API methods with data providers - Fix AuthorizationTest::chargeShouldCallChargeAuthorizationOnUnzerObject to mock performChargeOnPayment Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- EPS, Ideal, PIS, SepaDirectDebit, Wechatpay: replace authorize() with performAuthorization() - Przelewy24: replace authorize() with performAuthorization(), setKey() with useLegacyKey() - RecurringPaymentTest: remove tests for deleted activateRecurring() trait method and SepaDirectDebitSecured type; replace card.activateRecurring() with unzer.activateRecurringPayment() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tor parameter The V1 constructor had (orderId, amountTotal, currencyCode, basketItems). The V2 migration dropped amountTotal, shifting currencyCode to arg 2 and breaking integration tests that still passed an amount there. Restore the parameter as ?float $totalValueGross mapped to setTotalValueGross(), and update the two call sites that were passing a string in that position. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ameter Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ys are now valid Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace authorize()/charge() with performAuthorization()/performCharge() in integration tests - Remove tests for deleted payment types: InvoiceSecured, SepaDirectDebitSecured - Delete ShipmentTest (depended on InvoiceSecured) and V1 BasketTest (V2/V3 coverage exists) - Fix Paypage expiresAt format to ISO-8601 with ms+UTC Z suffix (Y-m-d\TH:i:s.v\Z) - Remove duplicate constructor from V3/Basket (identical to parent) - Drop setNote() from createBasket() helper — sandbox does not return note on GET - Fix Basket unit test: getNote() default is null, not empty string - Add UnzerOne key setup to OpenBankingTest and WeroTest - Fix PaypageV2Test: resources is not null after create; assert metadataId instead Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Ryouzanpaku
force-pushed
the
CC-3628/remove-deprecated-payment-methods
branch
from
May 12, 2026 09:02
536ef80 to
e07cd38
Compare
…step should be green even if tests failed.
sixer1182
requested changes
May 18, 2026
sixer1182
left a comment
Member
There was a problem hiding this comment.
Please check my comments and the failed integration tests.
Ryouzanpaku
marked this pull request as draft
June 25, 2026 08:49
Resolve conflicts: drop PISTest (removed on main), keep the replacement methods in BasketV2/V3 tests with main's amounts, take main's Paypage resource assertions, keep main's performCharge/performSca null tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015dBvhivgsdFR9LnoQcg3o1
Invoice (ivc) stays in 5.0.0: restore the class, IdStrings::INVOICE, the type factory case, InvoiceTest and the invoice cancel tests. PIS (pis) is removed in 5.0.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015dBvhivgsdFR9LnoQcg3o1
- Basket creates baskets on /v3/baskets (bearer auth). Baskets with an id from before v3 (no UUID) are read and updated on /v2/baskets. - fetchBasket no longer falls back to the v1 endpoint. - V3\Basket is kept as an alias of Basket. - Move the v2 basket and basket item properties from the V2 traits into Basket and BasketItem (review comment on PR #231). - Fix ResourceService::send() to use the resource's API version when no version is passed (it used Unzer::API_VERSION for every resource). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015dBvhivgsdFR9LnoQcg3o1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015dBvhivgsdFR9LnoQcg3o1
…actoring) Invoice secured is deprecated but still available in PAPI, so it stays in 5.0.0: restore the class, IdStrings constants, type factory cases and tests. CanDirectChargeWithCustomer::charge() now uses performCharge(), because Unzer::charge() is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015dBvhivgsdFR9LnoQcg3o1
Resolve the CHANGELOG conflict: the PHP 8.1 removal from main goes into the 5.0.0 section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015dBvhivgsdFR9LnoQcg3o1
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015dBvhjNKDvt96S59ZDhH8n
Both types were deprecated in favour of PaylaterInvoice. Removes the classes, the IdStrings constants ivc, ivs, ivg, ivf, their factory cases in ResourceService and the related unit and integration tests (incl. ShipmentTest, which only used InvoiceSecured). CHANGELOG updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015dBvhgEZKYXe2biVeR1fTL
…remove-deprecated-payment-methods # Conflicts: # src/Interfaces/PaymentServiceInterface.php # src/Resources/PaymentTypes/Sofort.php # src/Services/PaymentService.php # src/Unzer.php # test/unit/Services/PaymentServiceTest.php Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Major release cleanup for PHP SDK 5.0.0: removes deprecated payment types, deprecated API methods and the examples folder, and switches baskets to the v3 endpoint.
CC-3628 Remove Sofort and Giropay
SofortandGiropaypayment types, theirIdStringsconstants and factory cases.CC-3663 Remove deprecated code
PIS,Invoice,InvoiceSecured(incl. the invoice-guaranteed and invoice-factoring ids),SepaDirectDebitSecuredandInstallmentSecured(plusfetchInstallmentPlans()and theInstalmentPlansresource). Replacement for invoice:PaylaterInvoice.Unzer::authorize(),charge(),chargeAuthorization(),chargePayment()(useperformAuthorization(),performCharge(),performChargeOnPayment()) andUnzer::setKey().HttpService::send();ResourceServiceusessendRequest(ApiRequest). The request uses the resource's API version when no version is passed.Basket/BasketItemfields,Payment::getCancellation(),CanRecur::activateRecurring(),Paypage\Urls::$favicon.Basketcreates baskets on/v3/baskets(bearer auth). Baskets with a pre-v3 id (no UUID) are read and updated on/v2/baskets. No more v1 fallback infetchBasket().V3\Basketis kept as an alias.V2\BasketProperties/V2\BasketItemPropertiestraits intoBasketandBasketItem(review comment).CC-777 Remove examples folder
Tests
ShipmentTest, which only usedInvoiceSecured).Bug fixes
expiresAtserialization inV2/Paypage::expose()(ISO-8601 with milliseconds andZ).Documentation
CHANGELOG entry for 5.0.0. Upgrade guide: unzercorp/connectivity-docs#651 (needs an update: remove Invoice and InvoiceSecured, add PIS, basket v3).
Resolves CC-3628 | CC-777 | CC-3663
🤖 Generated with Claude Code
https://claude.ai/code/session_015dBvhivgsdFR9LnoQcg3o1