Loading Instamojo Payment gateway SDK giving error |
here is the SDK url https://github.com/Instamojo/instamojo-php
this page has the example I used in my CI 4 Application below is my code PHP Code: $api = new \Instamojo\Instamojo::init('app', [ above code giving error : Code: "syntax error, unexpected 'init' (T_STRING), expecting variable (T_VARIABLE) or '$'" PHP Code: $authType = "app/user" /**Depend on app or user based authentication**/ It's expecting a string with a $ not 'app' PHP Code: $api = Instamojo\Instamojo::init($authType,[ pass it a string like it is showing in the documentation. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(09-29-2020, 03:50 PM)InsiteFX Wrote: Still it's giving same error.. I feel the issue is here: Instamojo::init Solved the Issue removing new will solve the issue wrong code: Code: $api = new \Instamojo\Instamojo::init('app', [ correct code: Code: $api = \Instamojo\Instamojo::init('app', [ |
Welcome Guest, Not a member yet? Register Sign In |