PayU-EMEA / openpayu_php

OpenPayu SDK
http://developers.payu.com
Apache License 2.0
187 stars 86 forks source link

OAuth cache is not used with trusted_merchant #102

Open peterpp opened 5 years ago

peterpp commented 5 years ago

If I use trusted_merchant OAuth, caching is not used at all. Therefore, every request with the same email and ext_customer_id makes new call to the API and returns new access token. Each token is used just once and then forgotten. The problem is in OpenPayU_Oauth::getAccessToken – there is a condition for trusted_merchant to skip the cache.

In my opinion, OAuth cache should be more universal LRU cache that will allow to store all kinds of access tokens.