worldpay class not working with namespace in WordPress


I am trying to create Worldpay gateway with help of Worldpay library and my own extending code. Here is my code which I tried and failed to work on.


use libWorldpay;

    //Form Submit Actions, Here i have called Worldpay class to create object.
 $worldpay = new Worldpay('Key');   //line no:  25
}  ?>
<script src=""></script>
<form  action="" method="post"> 


I have tried to find similar question and answer. I found this. Eventhough i can’t make it work, when form is submitted to the same page. Here is the error message how it looks like.

Fatal error: Class ‘libWorldpay’ not found in /var/www/wp/kvcodes/wp-content/plugins/kvcodes-worldpay/WorldPay.php on line 25

How do I fix this issue, when form is submitted.

, Kvvaradha 1 year 2020-01-19T08:38:53-05:00 0 Answers 74 views 0

Leave an answer