Skip to content

Prepare version 3.1.0, add Trust API#68

Merged
barnett merged 9 commits into
masterfrom
cursor/php-sdk-release-prep-314d
Jun 2, 2026
Merged

Prepare version 3.1.0, add Trust API#68
barnett merged 9 commits into
masterfrom
cursor/php-sdk-release-prep-314d

Conversation

@barnett

@barnett barnett commented May 26, 2026

Copy link
Copy Markdown
Member

Fixes #66

Prepare the PHP SDK for a non-breaking endpoint coverage release.

Summary

  • Bump SDK minor version to 3.1.0.
  • Add Trust verification gateway helpers and trust alias.
  • Add documented endpoint helpers/path construction so SDK surface audit covers all public API operations.
  • Add top-level payment lookup support.
  • Fix RecipientAccountGateway::update() to return RecipientAccount instead of Recipient.
  • Add documented response attributes across batch, payment, recipient, recipient account, offline payment, and invoice payment models.
  • Add PHP 8.1 iterator compatibility to ResourceCollection without dropping existing PHP version compatibility.
  • Set default configuration environment to production.

Open PR/issue review

Compatibility notes

  • Existing public methods remain available.
  • New coverage is additive through helpers, aliases, and model fields.
  • Minimum PHP requirement remains >=5.4 to avoid breaking existing users.

Note

Medium Risk
Pagination and default production environment change runtime behavior for some callers; changes are mostly additive but affect how collections fetch next pages and which API host is used when env was unset.

Overview
Releases 3.1.0 as an additive API-coverage update: new Trust/verification gateway (verification() and trust()), balance helpers (all, paymentrails, paypal), top-level PaymentGateway::find, and recipient offline payment listing with paging.

Pagination and collections are tightened so foreach over results keeps the right path context (batchId, balance segment, recipient id) and only auto-pages when a pager is configured; PHP 8.1 iterator compatibility is added via #[\ReturnTypeWillChange] without raising the minimum PHP version.

Models gain documented API fields (e.g. batch quoteExpiredAt/tags, expanded Payment withholding/return fields, invoice payment and recipient account fields). RecipientAccountGateway::update now returns a RecipientAccount. Default Configuration environment is production. Unit tests cover pagination and model defaults.

Reviewed by Cursor Bugbot for commit 584b365. Bugbot is set up for automated code reviews on this repo. Configure here.

cursoragent and others added 2 commits May 26, 2026 03:12
Co-authored-by: barnett <barnett@trolley.com>
Co-authored-by: barnett <barnett@trolley.com>
@barnett barnett changed the title Prepare version 3.1.0, add Trust functionality Prepare version 3.1.0, add Trust API May 26, 2026
Comment thread lib/Trolley/InvoicePayment.php Outdated
Comment thread lib/Trolley/OfflinePayment.php Outdated
Comment thread lib/Trolley/RecipientAccount.php Outdated
Comment thread lib/Trolley/InvoicePayment.php
Comment thread lib/Trolley/Payment.php
Comment thread lib/Trolley/RecipientGateway.php
Comment thread lib/Trolley/BalanceGateway.php Outdated
cursoragent and others added 2 commits May 27, 2026 02:40
Co-authored-by: barnett <barnett@trolley.com>
Co-authored-by: barnett <barnett@trolley.com>
Comment thread lib/Trolley/VerificationGateway.php Outdated
Co-authored-by: barnett <barnett@trolley.com>
Comment thread lib/Trolley/VerificationGateway.php
Co-authored-by: barnett <barnett@trolley.com>
Comment thread lib/Trolley/BalanceGateway.php Outdated
Co-authored-by: barnett <barnett@trolley.com>
@heyflowmo heyflowmo self-requested a review May 27, 2026 17:10
heyflowmo
heyflowmo previously approved these changes May 27, 2026

@heyflowmo heyflowmo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

Co-authored-by: barnett <barnett@trolley.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 67fc30c. Configure here.

Comment thread lib/Trolley/BatchGateway.php Outdated
Strip batchId from query params in paymentsInternal before the API request, matching other pagination helpers.

Co-authored-by: Cursor <cursoragent@cursor.com>

@heyflowmo heyflowmo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

@barnett barnett merged commit dea09f1 into master Jun 2, 2026
2 checks passed
@barnett barnett deleted the cursor/php-sdk-release-prep-314d branch June 2, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix issue for update in RecipientAccountGateway.php

3 participants