Skip to content

v1.1.0

Choose a tag to compare

@nokimaro nokimaro released this 05 Apr 01:41
· 10 commits to master since this release
a742095

What's Changed

Bug Fixes

  • CreateOrderRequest: description is now a required constructor parameter. The API was returning HTTP 400 when this field was absent, despite the OpenAPI spec marking it as optional.

  • CreateRefundRequest: webhookUrl is now a required constructor parameter. The API requires this field — previously the SDK silently omitted it when null, causing silent 400 errors at runtime.

  • ApiExceptionMapper: Fixed error extraction to unwrap the API response envelope {type, object, error} before reading error details. Previously error messages were lost on non-2xx responses.

  • Transport: Fixed GET requests to apply authentication headers (were missing).

  • Client / EncryptionKeyClient: Moved encryption key retrieval to a dedicated EncryptionKeyClient using the correct endpoint. The previous implementation used SignatureClient with the wrong endpoint.

Internal

  • Added Json::decodeObject() helper for envelope-wrapped single-object responses.
  • Updated all unit tests to reflect corrected constructors and response fixtures.

Breaking Changes

  • CreateOrderRequest::__construct() — description is now the 2nd positional argument and is required (no default). Code using named arguments is unaffected if description was already passed; code omitting it will get a compile-time error.
  • CreateRefundRequest::__construct() — webhookUrl is now the 3rd positional argument and is required (no default).

Migration

// Before
new CreateOrderRequest(amount: $amount);
new CreateRefundRequest(amount: $amount, paymentId: $id);

// After
new CreateOrderRequest(amount: $amount, description: 'Your description');
new CreateRefundRequest(amount: $amount, paymentId: $id, webhookUrl: 'https://example.com/webhook');

What's Changed

  • fix: enforce empirically required fields and fix API integration issues by @nokimaro in #6

Full Changelog: v1.0.1...v1.1.0