Skip to content

Prepare version 3.1.0, add Trust API#68

Open
barnett wants to merge 7 commits into
masterfrom
cursor/php-sdk-release-prep-314d
Open

Prepare version 3.1.0, add Trust API#68
barnett wants to merge 7 commits into
masterfrom
cursor/php-sdk-release-prep-314d

Conversation

@barnett
Copy link
Copy Markdown
Member

@barnett barnett commented May 26, 2026

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
Changes affect payment, recipient, and compliance-related gateways and default environment behavior; pagination fixes alter runtime HTTP patterns but are covered by new unit tests.

Overview
Prepares a 3.1.0 release that broadens API coverage and tightens pagination behavior without removing existing entry points.

Adds Trust / verification support via a new VerificationGateway (search, expire, trigger, watchlist helpers) and a Gateway::trust() alias. Balances gain all, paymentrails, and paypal helpers; balance search can hit the root or a path segment, with searchPage so paging keeps the segment. Top-level payment lookup is added on PaymentGateway::find. Recipient offline payments are listable with paging that preserves recipientId.

Several models map more documented API fields (batch quote/tags, payment tax/return/withholding fields, recipient tags, recipient account contact/card/mailing fields, invoice payment metadata, offline payment activity/tax flags). RecipientAccountGateway::update now returns a RecipientAccount instead of a Recipient.

ResourceCollection is updated for PHP 8.1 iterator compatibility, safer empty access, and paging only when a pager is configured—so one-off verification mutation responses do not auto-fetch further “search” pages. Default config environment is now production. Unit tests cover pagination context preservation and verification paging rules.

Reviewed by Cursor Bugbot for commit 1fa03a5. 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>
Copy link
Copy Markdown

@cursor cursor Bot left a comment

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 79f4020. Configure here.

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
Copy link
Copy Markdown

@heyflowmo heyflowmo left a comment

Choose a reason for hiding this comment

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

looks good

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