You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Try updating the application with composer (dependencies)
composer update
Publish configuration files
php artisan vendor:publish
Populate config/payubiz.php with credentials and enable production mode.
return [ /*|--------------------------------------------------------------------------| PayUbiz Authentication Secret|--------------------------------------------------------------------------|| Don't forget to set this. | */'merchant_id' =>'gtSsEw','secret_key' =>'eRyshYFb','test_mode' => true];
Integrating PayUbiz services with the application
The following example illustrates the usage of PayUbiz package
<?phpnamespaceTrending\Http\Controllers\File;useCarbon;usePayUbiz;useIlluminate\Http\Request;useTrending\Http\Controllers\Controller;/** * ----------------------------------------------------------------------------- * PayUbizTest - a class illustarting the usage of PayUbiz package * ----------------------------------------------------------------------------- * This class having the functionality to do payment using * PayUbiz services * * @since 1.0.0 * @version 1.0.0 * @author lakshmaji */class PayUbizTestextends AnotherClass{publicfunctiondoPayment(){// get input data$data =$this->request->all();// All of these parameters are mandatory!$params =array('txnid' =>$data['transaction_id'],'amount' =>$data['amount'],'productinfo' =>$data['product_info']','firstname' =>$data['user_name'],'email' =>$data['user_email']','phone' =>$data['mobile_number'],'surl' =>'http://localhost/payubiz_app_development/public/back','furl' =>'http://localhost/payubiz_app_development/public/back', );// Call to PayUbiz method$result = PayUbiz::initializePurchase($params);// Redirect to PayUbiz Payment Gateway servicesreturn$result;}/** * A method to process the results returned from the PayUbiz services * */publicfunctionprocessResultFromPayUbiz() {$result = PayUbiz::completePurchase($_POST);$params =$result->getParams();echo$result->getStatus()."\n";echo$result->getTransactionId()."\n";echo$result->getTransactionStatus()."\n";echo$result->getStatus()."\n"; }}// end of class PayUbizTest// end of file PayUbizTest.php