2.2.0 - OAuth provider extracted to tomsommer/oauth2-onpay
The OAuth provider moves out into its own package.
composer require tomsommer/onpay-php-sdk:^2.2Why
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\OnPayProvideris gone.getProvider()now returnsTomsommer\OAuth2\Client\Provider\OnPay, which is aLeague\OAuth2\Client\Provider\AbstractProviderexactly as before.- An invalid
gateway_idnow reportsgatewayId must be a non-empty alphanumeric value(it saidgateway_idbefore). 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.