Skip to content

Version 6.3.0

Choose a tag to compare

@MichaelBengtsson MichaelBengtsson released this 03 Jun 09:14
· 8 commits to main since this release
1a85aa5

Added

  • Add typed response support for Online Payments v3.1 under the new Paymentorder\V3 namespace
  • Add Client::setApiVersion() and getApiVersion(); when an API version is set, the Content-Type header becomes application/json;version=<version> (default behaviour unchanged)
  • Add v3.1 request classes Paymentorder\V3\Request\{Purchase, Verify, UnscheduledPurchase, UpdateOrder, GetPaymentorder, TransactionCapture, TransactionCancel, TransactionReversal}
  • Add top-level v3.1 response DTO Paymentorder\V3\Resource\PaymentOrder (factory-resolved from the paymentOrder JSON key)
  • Add post-purchase response wrapper Paymentorder\V3\Resource\Response\PaymentorderResponse with getPaymentOrder(), getOperations(), and a getLatestFinancialTransaction() convenience helper
  • Add typed Paid resource (with Details sub-object) and FinancialTransactions resource (with FinancialTransaction items in a FinancialTransactionsListCollection)
  • Add link-only sub-resource DTOs: OrderItems, Urls, PayeeInfo, Payer, History, Failed, Aborted, Cancelled, Reversed, FailedAttempts, PostPurchaseFailedAttempts, Metadata, all sharing LinkResourceTrait
  • Add Paymentorder\V3\Resource\Response\CallbackPayload for typed parsing of v3.1 webhook bodies
  • Add the field countryCode to the class SwedbankPay\Api\Service\Paymentorder\Resource\PaymentorderPayer with methods PaymentorderPayer::setCountryCode() and ::getCountryCode() to allow passing the customer's country code to the API.

Fixed

  • ResourceFactory::findFileByNamespace() now resolves resource classes via the active autoloader (class_exists) instead of a path-based file_exists check, fixing resolution when the SDK is consumed through tooling that prefixes namespaces (e.g. PHP-Scoper) without rewriting the on-disk directory layout
  • Fix an issue where SwedbankPay\Api\Service\Paymentorder\Resource\PaymentorderPayer::getLastName() was incorrectly returning the first name.