I keep getting the error blew and im not sure why.. Any ideas?
App\Actions\Payment\MakeACardPayment::__construct(): Argument #1 ($service) must be of type App\Contracts\PaymentInterface, string given, called in /srv/decafapp.com/decaf-laravel/app/Providers/ActionServiceProvider.php
//inside AppServiceProvider
App::bind(PaymentInterface::class,function(){
return new StripePaymentService();
});
//inside ActionServiceProvider
$this->app->bind(MakeACardPayment::class, function($app){
return new MakeACardPayment(PaymentInterface::class);
});
//included in config/app.php
App\Providers\AppServiceProvider::class,
App\Providers\ActionServiceProvider::class
//Make A CardPayment class
class MakeACardPayment
{
private $service;
public function __construct(PaymentInterface $service)
{
$this->service = $service;
}
public function execute($data)
{
$this->service->ChargeCard($data);
}
}
//stripe service
class StripePaymentService implements PaymentInterface
{
// no construct