Skip to content

2.2.0 - OAuth provider extracted to tomsommer/oauth2-onpay

Choose a tag to compare

@tomsommer tomsommer released this 07 Sep 16:51
· 11 commits to master since this release

The OAuth provider moves out into its own package.

composer require tomsommer/onpay-php-sdk:^2.2

Why

OnPayProvider was an implementation detail of this SDK's auth, which meant anyone integrating OnPay who wanted OAuth but not the whole API client had nothing to find. It is now tomsommer/oauth2-onpay, a standalone League provider client that can be used on its own.

Standing alone means it owns what the SDK used to do for it: the gateway_id path segment and its validation now live in the provider, so OnPayAPI passes gatewayId and the two hosts rather than a pre-built authorization URL.

Breaking changes

  • OnPay\OnPayProvider is gone. getProvider() now returns Tomsommer\OAuth2\Client\Provider\OnPay, which is a League\OAuth2\Client\Provider\AbstractProvider exactly as before.
  • An invalid gateway_id now reports gatewayId must be a non-empty alphanumeric value (it said gateway_id before). The validation rule itself is unchanged.

Nothing else moved. OnPay\OnPayAPI, OnPay\StaticToken, OnPay\API\*, the constructor signature and the pkce_method option all behave as they did in 2.1.0.