Skip to content

Releases: CHIPAsia/chip-php-sdk

v2.0.2

Choose a tag to compare

@github-actions github-actions released this 18 May 05:08
ebc23ed

Added

  • Expand PurchaseBuilder fluent API with all missing CHIP Collect fields
  • Add top-level Purchase builder methods: clientId, sendReceipt, skipCapture, forceRecurring, reference, issued, due, creatorAgent, platform, tags
  • Add PurchaseDetails builder methods: notes, debt, subtotalOverride, totalTaxOverride, totalDiscountOverride, totalOverride, requestClientDetails, timezone, dueStrict, emailMessage, shippingOptions, paymentMethodDetails, hasUpsellProducts, singleAttempt, metadata
  • Add ClientDetails builder methods: clientPersonalCode, clientStreetAddress, clientCountry, clientCity, clientZipCode, clientState, clientShippingStreetAddress, clientShippingCountry, clientShippingCity, clientShippingZipCode, clientShippingState, clientCc, clientBcc, clientLegalName, clientBrandName, clientRegistrationNumber, clientTaxNumber, clientBankAccount, clientBankCode
  • Extend addProduct() with optional $discount, $taxPercent, $category, $totalPriceOverride parameters

v2.0.1

Choose a tag to compare

@github-actions github-actions released this 14 May 07:23

Fixed

  • Fix v2.0.0 examples to use resource-based API ($chip->purchases->create() instead of $chip->createPurchase())
  • Exclude non-production files from Composer dist via .gitattributes (/examples, /tests, CI configs, dev tooling)

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 14 May 06:31
f05c6b9

Added

  • Add custom exception hierarchy for API error handling (ChipApiException, AuthenticationException, NotFoundException, ValidationException, ClientException, ServerException)
  • Add PSR-3 logger injection support for request/response observability
  • Add configurable request timeout via constructor $config array
  • Add PurchaseBuilder fluent API for constructing purchase objects
  • Add PHPStan (level 8) and PHP-CS-Fixer configuration
  • Add GitHub Actions CI workflow (tests on PHP 8.1–8.3, static analysis, code style)
  • Add GitHub Actions PR summary automation via Ollama Cloud
  • Add GitHub Actions changelog validation and release automation
  • Expand test coverage: model mapping tests, exception handling tests, logger integration, timeout configuration, billing API tests, webhook verification tests
  • Add new endpoints and models: Account (balance, turnover), PublicKey, Statements, Client CRUD, Webhook list/update, Purchase resend invoice
  • Add ClientRecurringToken, ClientRecurringTokenList, CompanyStatement, CompanyStatementList, WebhookList models
  • Add Chip\Http\ClientInterface internal HTTP abstraction with GuzzleClient implementation
  • Add RetryClient decorator with exponential backoff for 429/5xx responses
  • Add resource classes: PurchasesResource, ClientsResource, WebhooksResource, PaymentMethodsResource, AccountResource, StatementsResource, PublicKeyResource, BillingResource
  • Add fromArray() static factory methods to all models replacing JsonMapper
  • Add pagination iterators (iterate(), iterateTemplates(), iterateClients()) for list endpoints

Changed

  • Bump PHP requirement from >=7.2.0 to ^8.1
  • Rewrite ChipApi from trait-based architecture to resource-based architecture ($chip->purchases->create() instead of $chip->createPurchase())
  • Replace JsonMapper with typed fromArray() static factory methods on all models
  • Add automatic retry with exponential backoff for 429 and 5xx responses
  • Rewrite ChipApi::request() to catch Guzzle HTTP exceptions and throw domain-specific exceptions
  • Upgrade PHPUnit to ^10.5, PHPStan to ^2.1, PHP-CS-Fixer to ^3.95
  • Rewrite README with badges, quick-start, API reference, error handling docs
  • Rewrite MIGRATION.md with resource API migration guide and pagination docs
  • Add CONTRIBUTING.md with development workflow guidelines
  • Update CLAUDE.md with new commands and architecture details

Removed

  • Remove netresearch/jsonmapper dependency
  • Remove Chip\Traits\Api\* traits (Purchase, PaymentMethod, Client, Webhook, Billing, PublicKey, Account, Statements)

Fixed

  • Fix implicitly nullable parameter warnings in Purchase trait by using explicit nullable types (?int)
  • Fix existing tests to pass correct types (string IDs, Purchase objects)
  • Add property and return types to billing models and traits for PHPStan level 8 compliance
  • Fix composer.json missing required description field for strict validation
  • Fix model properties to match OpenAPI spec: Product::quantity, Product::tax_percent are now string|null; Purchase::issued is now string|null; Purchase::status_history is now array

v1.2.1

Choose a tag to compare

@wzul wzul released this 14 May 07:14

Full Changelog: v1.2.0...v1.2.1

v1.2.0

Choose a tag to compare

@wzul wzul released this 14 May 07:05

Full Changelog: v1.1.3...v1.2.0

v1.1.3

Choose a tag to compare

@wzul wzul released this 21 Mar 07:27
f1ee9cc
  • Add logos parameter in response body for payment method API

v1.1.2

Choose a tag to compare

@wzul wzul released this 29 May 10:21
587a3ba
  • Add billing endpoint

v1.1.1

Choose a tag to compare

@wzul wzul released this 24 May 08:29
f489d70
  • Add Webhook delete function
  • Update readme to higher PHP version requirement

v1.1.0

Choose a tag to compare

@wzul wzul released this 06 Apr 04:30
bea7edf
  • Bump PHP version requirement to 8.0
  • Ensure non-null value are included

v1.0.1

Choose a tag to compare

@wzul wzul released this 10 Mar 08:47
195e549
add force_recurring (#4)