anouarabdsslm / laravel-paypalpayment

Laravel paypal payment package , help you process credit card payment using paypal api
Apache License 2.0
337 stars 198 forks source link

Dynamic methods should not be called staticaly #159

Open AlterwebStudio opened 6 years ago

AlterwebStudio commented 6 years ago

In the example methods, PaypalPayment methods are called staticaly but methods are defined as dynamic in the class. I modified paywithCreditCard() and paywithPaypal() methods to create new instance of PayPaylPayment class first, then I made methods to call dynamicaly. Anyway I don't think it's the best way how to solve it (at least beacase it has its own ServiceProvider called automaticaly by laravel service providers in boostrap). Any suggestions how to solve this correctly?