matscode / paystack-php-sdk

Paystack PHP SDK
https://matscode.github.io/paystack-php-sdk
GNU General Public License v3.0
4 stars 1 forks source link

Exception: Call to undefined method MatscodePaystackUtilityText::uniqueStr() #5

Open nelwa opened 12 months ago

nelwa commented 12 months ago

Hi,

When using the library I get this exception:

Exception: Call to undefined method MatscodePaystackUtilityText::uniqueStr()

/vendor/matscode/paystack-php-sdk/src/Resources/Transaction.php LINE: 27

Any thoughts?

ewudo commented 6 months ago

Hi there!

Replace this code
$this->setReference('REF-' . ($this->data['reference'] ?? Text::uniqueStr())); with this $this->setReference($this->data['reference'] ?? 'REF-' . uniqid());

matscode commented 6 months ago

Thank you for the reply @ewudo