[CC-3628] Remove deprecated code#231
Open
Ryouzanpaku wants to merge 12 commits into
Open
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>
536ef80 to
e07cd38
Compare
…step should be green even if tests failed.
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
This PR removes all deprecated payment types, deprecated API methods, and the examples folder as part of a major release cleanup.
CC-3628 Remove deprecated payment types:
Sofort,Giropay,InstallmentSecured,InvoiceSecured,Invoice,SepaDirectDebitSecured, andHirePurchasepayment type classesIdStringsand factory switch cases inResourceServiceCC-777 Remove examples folder:
examples/directory (was previously maintained separately)CC-3663 Remove all deprecated API methods:
Unzer::authorize(),charge(),chargeAuthorization(),chargePayment()— replaced byperformAuthorization(),performCharge(),performChargeOnPayment()fetchInstallmentPlans()andInstalmentPlansresource classsetKey()fromUnzer(validation inlined into constructor)HttpService::send()—ResourceServicenow usessendRequest(ApiRequest)exclusivelyBasketandBasketItemproperties (amountTotalGross,amountTotalDiscount,amountTotalVat,amountPerUnit, etc.)activateRecurring()alias inPaypal;CanRecurtrait simplifiedCanAuthorize::authorize()andCanDirectCharge::charge()traits to delegate to new methodsIntegration test fixes:
authorize()/charge()/chargeAuthorization()/setKey()calls across integration test suiteShipmentTest(InvoiceSecured), V1BasketTestInvoiceSecured,SepaDirectDebitSecured,InstallmentSecuredPaypageV2Testassertions to match actual API response (resources not null after create)OpenBankingTestandWeroTestBug fixes:
expiresAtserialization inV2/Paypage::expose()— API requires ISO-8601 with milliseconds and UTCZsuffix (Y-m-d\TH:i:s.v\Z), notDATE_ATOMV3/Basket(identical to parent)Basket::getNote()unit test — default isnull, not empty stringTest plan
Documentation
Upgrade guide for v5.0.0: draft PR | preview
Resolves CC-3628 | CC-777 | CC-3663
🤖 Generated with Claude Code