Worldpay / worldpay-lib-php

PHP Library for Worldpay REST API
https://online.worldpay.com
MIT License
43 stars 32 forks source link

You must enable SSL check in production mode #19

Open vineetdikonia opened 5 years ago

vineetdikonia commented 5 years ago

Earlier I was working on the sendbox mode and everything worked fine for me. Now I just moved on the live and updated the CLIENT_KEY and SECRET_KEY but getting "You must enable SSL check in production mode" issue. I already configured SSL on my site and site working perfectly with https.

Can anyone suggest the solution?

nuxtor commented 5 years ago

Is anyone found reason for this error ?

SalehMahmood commented 5 years ago

Yeah, make sure that you use the Test service key and the key must start with T when you create a Worldpay instance .e.g $worldpay = new Worldpay('T_S_xxxxxxxxxxxxxxxxx').

I found a check in ~/lib/Connection.php in line no 106 if (substr($this->service_key, 0, 1) != 'T'). If the service key doesn't start with T, it's gonna think that you're in production mode.