so trying have eccomerce site handle both paypal , stripe payments. however, not sure how done. this have. class billingprovider extends serviceprovider { /** * bootstrap application services. * * @return void */ public function boot() { // } /** * register application services. * * @return void */ public function register() { $this->app->bind('app\contracts\billinginterface','app\services\billing\paypalbilling'); } } this works fine if need paypal. however, need both paypal , stripe. any idea how can go implementing this? when typehint can either paypal or stripe. public function stripe(request $request, billinginterface $bill){// handle stripe payment.} public function paypal(request $request, billinginterface $bill){// handle paypal payment.} imho, there many ways it. first of all, take contextual binding of service ...
Comments
Post a Comment