unicodeveloper / laravel-paystack

:credit_card: :package: :moneybag: Laravel 6, 7, 8, 9, 10 and 11 Package for Paystack
https://paystack.co
MIT License
605 stars 312 forks source link

Code refactor - ServiceProvider to allow mocking client #44

Closed toondaey closed 6 years ago

toondaey commented 6 years ago

Client Mocking

The service provider has been refactored in order for the paystack api client \GuzzleHttp\Client to be mockable. In order words, the client has been moved to the \Unicodeveloper\Paystack\PaystackServiceProvider from whence the $secretToken and $baseUrl have been embedded within.

Service Provider Test

A test for \Unicodeveloper\Paystack\PaystackServiceProvider has also been added.